本文整理了Java中com.vividsolutions.jts.geom.Geometry.compareTo()
方法的一些代码示例,展示了Geometry.compareTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.compareTo()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Geometry
类名称:Geometry
方法名:compareTo
[英]Returns whether this Geometry
is greater than, equal to, or less than another Geometry
.
If their classes are different, they are compared using the following ordering:
Geometry
s have the same class, their first elements are compared. If those are the same, the second elements are compared, etc.Geometry
是否大于、等于或小于另一个Geometry
。Geometry
具有相同的类,则比较它们的第一个元素。如果这些元素相同,则比较第二个元素,以此类推。代码示例来源:origin: org.geotools/gt-render
public int compareTo(Object o) {
return geometry.compareTo(o);
}
代码示例来源:origin: org.geotools/gt-render
public int compareTo(Object o, CoordinateSequenceComparator comp) {
return geometry.compareTo(o, comp);
}
代码示例来源:origin: NationalSecurityAgency/datawave
@Override
public int compareTo(Geometry other) {
int cmp;
if (geometry == null) {
if (other == null || other.geometry == null) {
cmp = 0;
}
cmp = -1;
}
cmp = geometry.compareTo(other.geometry);
if (0 == cmp) {
return compareMetadata(other);
}
return cmp;
}
代码示例来源:origin: org.wowtools/h2
@Override
protected int compareSecure(Value v, CompareMode mode) {
Geometry g = ((ValueGeometry) v).getGeometryNoCopy();
return getGeometryNoCopy().compareTo(g);
}
代码示例来源:origin: com.eventsourcing/h2
@Override
protected int compareSecure(Value v, CompareMode mode) {
Geometry g = ((ValueGeometry) v).getGeometryNoCopy();
return getGeometryNoCopy().compareTo(g);
}
代码示例来源:origin: com.vividsolutions/jts-core
public int compare(Object obj0, Object obj1) {
EdgeRing r0 = (EdgeRing) obj0;
EdgeRing r1 = (EdgeRing) obj1;
return r0.getRing().getEnvelope().compareTo(r1.getRing().getEnvelope());
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-gis
/**
* Recopie de GeometryCollection.
*/
protected int compareToSameClass(final Object _o, final CoordinateSequenceComparator _comp) {
final GISCollection gc = (GISCollection) _o;
final int n1 = getNumGeometries();
final int n2 = gc.getNumGeometries();
int i = 0;
while (i < n1 && i < n2) {
final Geometry thisGeom = getGeometryN(i);
final Geometry otherGeom = gc.getGeometryN(i);
final int holeComp = thisGeom.compareTo(otherGeom, _comp);
if (holeComp != 0) {
return holeComp;
}
i++;
}
if (i < n1) {
return 1;
}
if (i < n2) {
return -1;
}
return 0;
}
内容来源于网络,如有侵权,请联系作者删除!