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
LeafletLayer s |
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
Point s and JTS
Coordinate s |
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
- Geometry
Geometry
public static java.util.Collection<LeafletLayer> toLayers(org.locationtech.jts.geom.Geometry geom)
Geometry
and one or more
LeafletLayer
sgeom
- Geometry
Geometry
public static LMarker toLMarker(org.locationtech.jts.geom.Point point)
Point
and a
LMarker
point
- the point to be translated into markerpublic static LPolyline toPolyline(org.locationtech.jts.geom.LineString lineString)
LineString
and a v-leaflet
Polyline
lineString
- the linestring to be converted into polylineLineString
public static LPolygon toPolygon(org.locationtech.jts.geom.Polygon polygon)
Polygon
and a v-leaflet LPolygon
polygon
- the JTS polygon to be translated into polygon layerPolygon
public static LPolygon toPolygon(org.locationtech.jts.geom.LinearRing linearRing)
LinearRing
and a v-leaflet
LPolygon
linearRing
- the JTS linearring to be translated to polygon layerLinearRing
public static Point[] toPointArray(org.locationtech.jts.geom.Coordinate[] coords)
Point
s and JTS
Coordinate
scoords
- the coordinate array to be translated into v-leaflet projects internal Point data typeCoordinate
spublic 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