public class Utils extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.locationtech.jts.geom.GeometryFactory |
getGeometryFactory()
Gets the cached
GeometryFactory instance. |
static org.locationtech.jts.geom.Geometry |
removeCollinearVertices(org.locationtech.jts.geom.Geometry g)
Removes collinear vertices from the provided
Geometry. |
static org.locationtech.jts.geom.LineString |
removeCollinearVertices(org.locationtech.jts.geom.LineString ls)
Removes collinear points from the provided linestring.
|
static org.locationtech.jts.geom.Polygon |
removeCollinearVertices(org.locationtech.jts.geom.Polygon polygon)
Removes collinear vertices from the provided
Polygon. |
static org.locationtech.jts.geom.GeometryFactory |
setPrecision(double scale)
Sets the precision to be used by the cached
GeometryFactory. |
public static org.locationtech.jts.geom.GeometryFactory getGeometryFactory()
GeometryFactory instance.public static org.locationtech.jts.geom.GeometryFactory setPrecision(double scale)
GeometryFactory.
For an explanation of the scale factor see PrecisionModel.scale - the desired precision expressed as a scale factorGeometryFactory instancepublic static org.locationtech.jts.geom.LineString removeCollinearVertices(org.locationtech.jts.geom.LineString ls)
ls - the LineString to be simplified.LineString with collinear points removed.public static org.locationtech.jts.geom.Polygon removeCollinearVertices(org.locationtech.jts.geom.Polygon polygon)
Polygon.polygon - the instance of a Polygon to remove collinear vertices from.Polygon without collinear vertices.public static org.locationtech.jts.geom.Geometry removeCollinearVertices(org.locationtech.jts.geom.Geometry g)
Geometry.
For the moment this implementation only accepts, Polygon, LinearRing and LineString.
It return null in case the geometry is not of these types.
g - the instance of a Geometry to remove collinear vertices from.Geometry without collinear vertices.Copyright © 2009–2018. All rights reserved.