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 org.locationtech.jts.geom.Geometry |
convertGeoJsonToJtsGeometry(org.geojson.GeoJsonObject geoJsonGeom)
Convert a org.geojson.Xxxx geometry to a JTS geometry.
|
static org.locationtech.jts.geom.GeometryFactory |
getGeometryFactory() |
static org.locationtech.jts.geom.LineString |
getInteriorSegment(org.locationtech.jts.geom.Geometry geomerty,
org.locationtech.jts.geom.Coordinate first,
org.locationtech.jts.geom.Coordinate second)
Returns the chunk of the given geometry between the two given coordinates.
|
static org.locationtech.jts.geom.LineString |
makeLineString(double... coords) |
static org.locationtech.jts.geom.Geometry |
parseWkt(String wkt) |
static double |
segmentFraction(double x0,
double y0,
double x1,
double y1,
double xp,
double yp,
double xscale)
Adapted from org.locationtech.jts.geom.LineSegment
Combines segmentFraction and projectionFactor methods.
|
static P2<org.locationtech.jts.geom.LineString> |
splitGeometryAtFraction(org.locationtech.jts.geom.Geometry geometry,
double fraction)
Splits the input geometry into two LineStrings at a fraction of the distance covered.
|
static P2<org.locationtech.jts.geom.LineString> |
splitGeometryAtPoint(org.locationtech.jts.geom.Geometry geometry,
org.locationtech.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 org.locationtech.jts.geom.LineString makeLineString(double... coords)
public static org.locationtech.jts.geom.GeometryFactory getGeometryFactory()
public static P2<org.locationtech.jts.geom.LineString> splitGeometryAtPoint(org.locationtech.jts.geom.Geometry geometry, org.locationtech.jts.geom.Coordinate nearestPoint)
public static P2<org.locationtech.jts.geom.LineString> splitGeometryAtFraction(org.locationtech.jts.geom.Geometry geometry, double fraction)
public static org.locationtech.jts.geom.LineString getInteriorSegment(org.locationtech.jts.geom.Geometry geomerty, org.locationtech.jts.geom.Coordinate first, org.locationtech.jts.geom.Coordinate second)
public static double segmentFraction(double x0, double y0, double x1, double y1, double xp, double yp, double xscale)
public static org.locationtech.jts.geom.Geometry convertGeoJsonToJtsGeometry(org.geojson.GeoJsonObject geoJsonGeom) throws UnsupportedGeometryException
geoJsonGeom
- UnsupportedGeometryException
public static org.locationtech.jts.geom.Geometry parseWkt(String wkt)
Copyright © 2019. All rights reserved.