public class JTSUtil
extends java.lang.Object
The CRF is expected to be WGS84 (~EPSG:4326 ~ GPS coordinates) in both directions.
| Constructor and Description |
|---|
JTSUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Bounds |
getBounds(org.locationtech.jts.geom.Geometry geometry) |
static Bounds |
toBounds(org.locationtech.jts.geom.Coordinate... coordinates) |
static Bounds |
toBounds(org.locationtech.jts.geom.Point topLeft,
org.locationtech.jts.geom.Point bottomRight) |
static LeafletLayer |
toLayer(org.locationtech.jts.geom.Geometry geom)
Translates a JTS
Geometry to a LeafletLayer. |
static LeafletLayer |
toLayer(java.lang.String wellKnownText) |
static java.util.Collection<LeafletLayer> |
toLayers(org.locationtech.jts.geom.Geometry geom)
Translates between a JTS
Geometry and one or more
LeafletLayers |
static Point |
toLeafletPoint(org.locationtech.jts.geom.Point location) |
static Point[] |
toLeafletPointArray(org.locationtech.jts.geom.LineString path) |
static org.locationtech.jts.geom.LinearRing |
toLinearRing(LPolyline polyline) |
static org.locationtech.jts.geom.LineString |
toLineString(LPolyline polyline) |
static org.locationtech.jts.geom.LineString |
toLineString(Point[] points) |
static LMarker |
toLMarker(org.locationtech.jts.geom.Point point)
Translates between a
Point and a
LMarker |
static org.locationtech.jts.geom.Point |
toPoint(LMarker lMarker) |
static org.locationtech.jts.geom.Point |
toPoint(Point p) |
static Point[] |
toPointArray(org.locationtech.jts.geom.Coordinate[] coords)
Translates between an array of v-leaflet
Points and JTS
Coordinates |
static LPolygon |
toPolygon(org.locationtech.jts.geom.LinearRing linearRing)
Translates between a JTS
LinearRing and a v-leaflet
LPolygon |
static org.locationtech.jts.geom.Polygon |
toPolygon(LPolygon polygon) |
static LPolygon |
toPolygon(org.locationtech.jts.geom.Polygon polygon)
Translates between a JTS
Polygon and a v-leaflet LPolygon |
static LPolyline |
toPolyline(org.locationtech.jts.geom.LineString lineString)
Translates between a JTS
LineString and a v-leaflet
Polyline |
public static LeafletLayer toLayer(org.locationtech.jts.geom.Geometry geom)
Geometry to a LeafletLayer. If given
geometry maps to multiple LeafletLayers they are returned in a
LLayerGroup.geom - GeometryGeometrypublic static java.util.Collection<LeafletLayer> toLayers(org.locationtech.jts.geom.Geometry geom)
Geometry and one or more
LeafletLayersgeom - GeometryGeometrypublic static LMarker toLMarker(org.locationtech.jts.geom.Point point)
Point and a
LMarkerpoint - the point to be translated into markerpublic static LPolyline toPolyline(org.locationtech.jts.geom.LineString lineString)
LineString and a v-leaflet
PolylinelineString - the linestring to be converted into polylineLineStringpublic static LPolygon toPolygon(org.locationtech.jts.geom.Polygon polygon)
Polygon and a v-leaflet LPolygonpolygon - the JTS polygon to be translated into polygon layerPolygonpublic static LPolygon toPolygon(org.locationtech.jts.geom.LinearRing linearRing)
LinearRing and a v-leaflet
LPolygonlinearRing - the JTS linearring to be translated to polygon layerLinearRingpublic static Point[] toPointArray(org.locationtech.jts.geom.Coordinate[] coords)
Points and JTS
Coordinatescoords - the coordinate array to be translated into v-leaflet projects internal Point data typeCoordinatespublic static Point[] toLeafletPointArray(org.locationtech.jts.geom.LineString path)
public static org.locationtech.jts.geom.LineString toLineString(Point[] points)
public static org.locationtech.jts.geom.LineString toLineString(LPolyline polyline)
public static org.locationtech.jts.geom.LinearRing toLinearRing(LPolyline polyline)
public static org.locationtech.jts.geom.Polygon toPolygon(LPolygon polygon)
public static org.locationtech.jts.geom.Point toPoint(Point p)
public static org.locationtech.jts.geom.Point toPoint(LMarker lMarker)
public static Point toLeafletPoint(org.locationtech.jts.geom.Point location)
public static Bounds getBounds(org.locationtech.jts.geom.Geometry geometry)
public static Bounds toBounds(org.locationtech.jts.geom.Coordinate... coordinates)
public static Bounds toBounds(org.locationtech.jts.geom.Point topLeft, org.locationtech.jts.geom.Point bottomRight)
public static LeafletLayer toLayer(java.lang.String wellKnownText) throws org.locationtech.jts.io.ParseException
org.locationtech.jts.io.ParseException