本文整理了Java中org.locationtech.jts.geom.Geometry.isSimple()
方法的一些代码示例,展示了Geometry.isSimple()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry.isSimple()
方法的具体详情如下:
包路径:org.locationtech.jts.geom.Geometry
类名称:Geometry
方法名:isSimple
[英]Tests whether this Geometry is simple. The SFS definition of simplicity follows the general rule that a Geometry is simple if it has no points of self-tangency, self-intersection or other anomalous points.
Simplicity is defined for each Geometry subclass as follows:
isSimple
tests for this condition and reports false
if it is not met. (This is a looser test than checking for validity).Geometry
s are always simple.isSimple
测试此条件,如果不满足,则报告false
。(这是一个比检查有效性更宽松的测试)。Geometry
总是很简单的。代码示例来源:origin: geotools/geotools
public static boolean isSimple(Geometry arg0) {
if (arg0 == null) return false;
Geometry _this = arg0;
return _this.isSimple();
}
代码示例来源:origin: geotools/geotools
public boolean isSimple() {
return geometry.isSimple();
}
代码示例来源:origin: geotools/geotools
@DescribeProcess(
title = "Simple Test",
description =
"Tests if a geometry is topologically simple. Points, polygons, closed line strings, and linear rings are always simple. Other geometries are considered simple if no two points are identical."
)
@DescribeResult(description = "True if the input is simple")
public static boolean isSimple(
@DescribeParameter(name = "geom", description = "Input geometry") Geometry geom) {
return geom.isSimple();
}
代码示例来源:origin: orbisgis/h2gis
/**
* @param geometry Geometry instance
* @return True if the provided geometry has no points of self-tangency, self-intersection or other anomalous points.
*/
public static Boolean isSimple(Geometry geometry) {
if(geometry==null) {
return null;
}
return geometry.isSimple();
}
}
代码示例来源:origin: locationtech/jts
public static boolean isSimple(Geometry g) { return g.isSimple(); }
public static boolean isValid(Geometry g) { return g.isValid(); }
代码示例来源:origin: Geomatys/geotoolkit
/**
* Returns true if this object does not cross itself.
*/
@Override
public final boolean isSimple() {
org.locationtech.jts.geom.Geometry jtsGeom = getJTSGeometry();
return jtsGeom.isSimple();
}
代码示例来源:origin: org.opengeo/geodb
/**
* Returns (TRUE) if this Geometry has no anomalous geometric points, such as self intersection
* or self tangency.
*/
public static boolean ST_IsSimple ( byte[] wkb ) {
if ( wkb == null ) {
return false;
}
Geometry g = gFromWKB(wkb);
return g.isSimple();
}
代码示例来源:origin: jdeolive/geodb
/**
* Returns (TRUE) if this Geometry has no anomalous geometric points, such as self intersection
* or self tangency.
*/
public static boolean ST_IsSimple ( byte[] wkb ) {
if ( wkb == null ) {
return false;
}
Geometry g = gFromWKB(wkb);
return g.isSimple();
}
代码示例来源:origin: orbisgis/h2gis
/**
* @param geometry Geometry instance
* @return True if the provided geometry is a ring; null otherwise
*/
public static Boolean isRing(Geometry geometry) {
if(geometry==null){
return null;
}
if (geometry instanceof MultiLineString) {
MultiLineString mString = ((MultiLineString) geometry);
return mString.isClosed() && mString.isSimple();
} else if (geometry instanceof LineString) {
LineString line = (LineString) geometry;
return line.isClosed() && geometry.isSimple();
}
return null;
}
}
代码示例来源:origin: locationtech/jts
public void testMultiPolygonIsSimple2() throws Exception {
Geometry g = reader.read("MULTIPOLYGON("
+ "((10 10, 10 20, 20 20, 20 15, 10 10)), "
+ "((60 60, 70 70, 80 60, 60 60)) )");
assertTrue(g.isSimple());
}
代码示例来源:origin: locationtech/jts
public void testPointIsSimple() throws Exception {
Geometry g = reader.read("POINT (10 10)");
assertTrue(g.isSimple());
}
代码示例来源:origin: locationtech/jts
public void testPolygonIsSimple() throws Exception {
Geometry g = reader.read("POLYGON((10 10, 10 20, 202 0, 20 15, 10 10))");
assertTrue(g.isSimple());
}
代码示例来源:origin: locationtech/jts
public void testMultiPolygonIsSimple1() throws Exception {
Geometry g = reader.read("MULTIPOLYGON (((10 10, 10 20, 20 20, 20 15, 10 10)), ((60 60, 70 70, 80 60, 60 60)))");
assertTrue(g.isSimple());
}
内容来源于网络,如有侵权,请联系作者删除!