本文整理了Java中com.vividsolutions.jts.geom.Point.compareTo()
方法的一些代码示例,展示了Point.compareTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Point.compareTo()
方法的具体详情如下:
包路径:com.vividsolutions.jts.geom.Point
类名称:Point
方法名:compareTo
暂无
代码示例来源:origin: stackoverflow.com
Collections.sort(line, new Comparator<Point>() {
public int compare(Point v, Point w) {
return v.compareTo(w);
}
});
代码示例来源:origin: org.geotools/gt-render
public int compareTo(Object o, CoordinateSequenceComparator comp) {
return point.compareTo(o, comp);
}
代码示例来源:origin: org.geotools/gt-render
public int compareTo(Object o) {
return point.compareTo(o);
}
代码示例来源:origin: bcdev/beam
@Test
public void testCreatePlainFeature() {
SimpleFeatureType sft = PlainFeatureFactory.createPlainFeatureType("MyPoint",
Point.class,
DefaultGeographicCRS.WGS84);
final GeometryFactory gf = new GeometryFactory();
final Point point = gf.createPoint(new Coordinate(0.5, 0.6));
final SimpleFeature feature1 = PlainFeatureFactory.createPlainFeature(sft, "_1", point, "fill:#0033AA");
assertEquals("_1", feature1.getID());
assertEquals(point, feature1.getDefaultGeometry());
assertEquals(point, feature1.getAttribute(PlainFeatureFactory.ATTRIB_NAME_GEOMETRY));
assertEquals("fill:#0033AA", feature1.getAttribute(PlainFeatureFactory.ATTRIB_NAME_STYLE_CSS));
SimpleFeature feature2 = PlainFeatureFactory.createPlainFeature(sft, "_2", null, "fill:#0033AA");
assertNotNull(feature2.getDefaultGeometry());
assertTrue(gf.createPoint(new Coordinate()).compareTo(feature2.getDefaultGeometry()) == 0);
final SimpleFeature feature3 = PlainFeatureFactory.createPlainFeature(sft, "_3", point, null);
assertEquals(null, feature3.getAttribute(PlainFeatureFactory.ATTRIB_NAME_STYLE_CSS));
}
}
内容来源于网络,如有侵权,请联系作者删除!