public class GeometryUtils extends Object
Modifier and Type | Field and Description |
---|---|
static org.opengis.referencing.crs.CoordinateReferenceSystem |
WGS84_XY
A shared copy of the WGS84 CRS with longitude-first axis order.
|
Constructor and Description |
---|
GeometryUtils() |
Modifier and Type | Method and Description |
---|---|
static com.vividsolutions.jts.geom.Geometry |
convertGeoJsonToJtsGeometry(org.geojson.GeoJsonObject geoJsonGeom)
Convert a org.geojson.Xxxx geometry to a JTS geometry.
|
static com.vividsolutions.jts.geom.GeometryFactory |
getGeometryFactory() |
static com.vividsolutions.jts.geom.LineString |
getInteriorSegment(com.vividsolutions.jts.geom.Geometry geomerty,
com.vividsolutions.jts.geom.Coordinate first,
com.vividsolutions.jts.geom.Coordinate second)
Returns the chunk of the given geometry between the two given coordinates.
|
static com.vividsolutions.jts.geom.LineString |
makeLineString(double... coords) |
static double |
segmentFraction(double x0,
double y0,
double x1,
double y1,
double xp,
double yp,
double xscale)
Adapted from com.vividsolutions.jts.geom.LineSegment
Combines segmentFraction and projectionFactor methods.
|
static P2<com.vividsolutions.jts.geom.LineString> |
splitGeometryAtFraction(com.vividsolutions.jts.geom.Geometry geometry,
double fraction)
Splits the input geometry into two LineStrings at a fraction of the distance covered.
|
static P2<com.vividsolutions.jts.geom.LineString> |
splitGeometryAtPoint(com.vividsolutions.jts.geom.Geometry geometry,
com.vividsolutions.jts.geom.Coordinate nearestPoint)
Splits the input geometry into two LineStrings at the given point.
|
public static final org.opengis.referencing.crs.CoordinateReferenceSystem WGS84_XY
public static com.vividsolutions.jts.geom.LineString makeLineString(double... coords)
public static com.vividsolutions.jts.geom.GeometryFactory getGeometryFactory()
public static P2<com.vividsolutions.jts.geom.LineString> splitGeometryAtPoint(com.vividsolutions.jts.geom.Geometry geometry, com.vividsolutions.jts.geom.Coordinate nearestPoint)
public static P2<com.vividsolutions.jts.geom.LineString> splitGeometryAtFraction(com.vividsolutions.jts.geom.Geometry geometry, double fraction)
public static com.vividsolutions.jts.geom.LineString getInteriorSegment(com.vividsolutions.jts.geom.Geometry geomerty, com.vividsolutions.jts.geom.Coordinate first, com.vividsolutions.jts.geom.Coordinate second)
public static double segmentFraction(double x0, double y0, double x1, double y1, double xp, double yp, double xscale)
public static com.vividsolutions.jts.geom.Geometry convertGeoJsonToJtsGeometry(org.geojson.GeoJsonObject geoJsonGeom) throws UnsupportedGeometryException
geoJsonGeom
- UnsupportedGeometryException
Copyright © 2018. All rights reserved.