public class JTSHelper
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static org.locationtech.jts.geom.CoordinateFilter |
COORDINATE_SWITCHING_FILTER |
static java.lang.String |
WKT_POINT |
static java.lang.String |
WKT_POLYGON |
| Modifier | Constructor and Description |
|---|---|
protected |
JTSHelper() |
| Modifier and Type | Method and Description |
|---|---|
static org.locationtech.jts.geom.Envelope |
createEnvelopeFromLowerUpperCorner(java.lang.String lowerCorner,
java.lang.String upperCorner) |
static org.locationtech.jts.geom.Geometry |
createGeometryFromWKT(java.lang.String wkt,
int srid)
Creates a JTS Geometry from an WKT representation.
|
static org.locationtech.jts.geom.Geometry |
createPolygonFromEnvelope(double[] envelope,
int srid) |
static org.locationtech.jts.geom.Geometry |
createPolygonFromEnvelope(double minx,
double miny,
double maxx,
double maxy,
int srid) |
static java.lang.String |
createWKTPointFromCoordinateString(java.lang.String coordinates)
Creates a WKT Point string form coordinate string.
|
static java.lang.String |
createWKTPolygonFromEnvelope(java.lang.String lowerCorner,
java.lang.String upperCorner)
Creates a WKT Polygon representation from lower and upper corner values.
|
static java.lang.String |
getCoordinatesString(org.locationtech.jts.geom.Geometry geom)
Get the coordinates of a Geometry as String.
|
protected static java.lang.StringBuilder |
getCoordinateString(java.lang.StringBuilder builder,
org.locationtech.jts.geom.Coordinate coordinate) |
static org.locationtech.jts.geom.GeometryFactory |
getGeometryFactory(org.locationtech.jts.geom.Geometry geometry) |
static org.locationtech.jts.geom.GeometryFactory |
getGeometryFactoryForSRID(int srid) |
static org.locationtech.jts.io.WKTReader |
getWKTReaderForSRID(int srid) |
static boolean |
isNotEmpty(org.locationtech.jts.geom.Geometry geometry) |
static <G extends org.locationtech.jts.geom.Geometry> |
switchCoordinateAxisOrder(G geometry)
Switches the coordinates of a JTS Geometry.
|
public static final java.lang.String WKT_POLYGON
public static final java.lang.String WKT_POINT
public static final org.locationtech.jts.geom.CoordinateFilter COORDINATE_SWITCHING_FILTER
public static org.locationtech.jts.geom.Geometry createGeometryFromWKT(java.lang.String wkt,
int srid)
throws org.locationtech.jts.io.ParseException
wkt - WKT representation of the geometrysrid - the SRID of the newly created geometryorg.locationtech.jts.io.ParseException - If an error occurspublic static org.locationtech.jts.io.WKTReader getWKTReaderForSRID(int srid)
public static java.lang.String getCoordinatesString(org.locationtech.jts.geom.Geometry geom)
geom - Geometry to get coordinatesprotected static java.lang.StringBuilder getCoordinateString(java.lang.StringBuilder builder,
org.locationtech.jts.geom.Coordinate coordinate)
public static java.lang.String createWKTPolygonFromEnvelope(java.lang.String lowerCorner,
java.lang.String upperCorner)
lowerCorner - Lower corner coordinatesupperCorner - Upper corner coordinatespublic static org.locationtech.jts.geom.Envelope createEnvelopeFromLowerUpperCorner(java.lang.String lowerCorner,
java.lang.String upperCorner)
public static org.locationtech.jts.geom.Geometry createPolygonFromEnvelope(double[] envelope,
int srid)
public static org.locationtech.jts.geom.Geometry createPolygonFromEnvelope(double minx,
double miny,
double maxx,
double maxy,
int srid)
public static <G extends org.locationtech.jts.geom.Geometry> G switchCoordinateAxisOrder(G geometry)
G - the geometry typegeometry - Geometry to switch coordinates.public static org.locationtech.jts.geom.GeometryFactory getGeometryFactory(org.locationtech.jts.geom.Geometry geometry)
public static org.locationtech.jts.geom.GeometryFactory getGeometryFactoryForSRID(int srid)
public static java.lang.String createWKTPointFromCoordinateString(java.lang.String coordinates)
coordinates - Coordinate stringpublic static boolean isNotEmpty(org.locationtech.jts.geom.Geometry geometry)
Copyright © 2015–2018 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.