// remove repeated points, to simplify returned geometry as much as possible Coordinate[] noRepeatCoords = noRepeatCoordList.toCoordinateArray(); return noRepeatCoords; } private Coordinate[] reducePointwise(CoordinateSequence coordinates) { Coordinate[] coordReduce = new Coordinate[coordinates.size()]...
Add Geometry Inspector sorting by Area or Length Assets9 28 Aug 00:32 jnh5y jts-1.17.1 69ce3db Compare JTS Release 1.17.1 Version 1.17.1 Release Date: August 27, 2020 Java Version: 1.8 Functionality Improvements AddWKBReaderandWKBWritersupport forPOINT EMPTY(#567) ...
params.setSimplifyFactor(0.01); params.setMitreLimit(5); 4.进行缓冲区分析:使用JTS库的API,调用LineString对象的buffer方法,传入BufferParameters对象进行缓冲区分析。例如,使用以下代码对LineString对象进行缓冲区分析,并得到一个新的Polygon对象: java Polygon bufferPolygon = (Polygon) lineString.buffer(10, para...
Emty多边形由点几何生成EN在开始前先告诉大家为何需要使用 Direct2D ,虽然 WPF 也是基于 DX 进行渲染,...
org.locationtech.jts.simplify:org.locationtech.jts.triangulate</packages> </group> <group> Core - Other <packages>org.locationtech.jts:org.locationtech.jts.*</packages> </group> <group> I/O - Common <packages>org.locationtech.jts.io.*</packages> </group> </groups> <doclint>${doclint}<...
public static Geometry simplifyTP(Geometry g, double distance) { return TopologyPreservingSimplifier.simplify(g, distance); } Example #3Source File: GeometryUtils.java From mrgeo with Apache License 2.0 4 votes @SuppressWarnings("squid:S1166") // Exception caught and handled static com...
@SqlType(GEOMETRY_TYPE_NAME) publicstaticSlicesimplifyGeometry(@SqlType(GEOMETRY_TYPE_NAME)Sliceinput,@SqlType(DOUBLE)doubledistanceTolerance) { if(isNaN(distanceTolerance)){ thrownewPrestoException(INVALID_FUNCTION_ARGUMENT,"distanceTolerance is NaN"); ...
getResultGeometry(); } 代码示例来源:origin: com.vividsolutions/jts public static Geometry simplify(Geometry geom, double distanceTolerance) { DouglasPeuckerSimplifier tss = new DouglasPeuckerSimplifier(geom); tss.setDistanceTolerance(distanceTolerance); return tss.getResultGeometry(); }...
getGeometryN(i); // keeping the id. any better suggestion? addFeature(layerName, attributes, subGeometry, id); } return; } // clip geometry if (geometry instanceof Point) { if (!clipCovers(geometry)) { return; } } else { geometry = clipGeometry(geometry); } // simplify non-points...
DouglasPeuckerSimplifier.simplify(originalPolygon, tolerance); //This one works as expected - see simplify-tp.jpg for details Geometry simplifiedPolygonTopologyPreserving = TopologyPreservingSimplifier.simplify(originalPolygon, tolerance); logDetails(simplifiedPolygonDouglasPeucker, "Douglas Peucker ...