org.khelekore.prtree.DataComparators Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of georewrite Show documentation
Show all versions of georewrite Show documentation
重写geoserver发送到h2的sql,以实现自定义数据源
package org.khelekore.prtree;
import java.util.Comparator;
class DataComparators implements NodeComparators {
private final MBRConverter converter;
public DataComparators (MBRConverter converter) {
this.converter = converter;
}
public Comparator getMinComparator (final int axis) {
return new Comparator () {
public int compare (T t1, T t2) {
double d1 = converter.getMin (axis, t1);
double d2 = converter.getMin (axis, t2);
return Double.compare (d1, d2);
}
};
}
public Comparator getMaxComparator (final int axis) {
return new Comparator () {
public int compare (T t1, T t2) {
double d1 = converter.getMax (axis, t1);
double d2 = converter.getMax (axis, t2);
return Double.compare (d1, d2);
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy