public class JtsHelper extends Object
| Constructor and Description |
|---|
JtsHelper()
|
| Modifier and Type | Method and Description |
|---|---|
static GeometryCollection |
collection(List
Create a GeometryCollection of the specified list of geometries.
|
static Envelope |
expandBy(Envelope
Create a copy of this envelope whose extend is in each direction bigger as much as width * ratio or height * ratio respectively.
|
static Envelope |
getEnvelope(Collection
Calculate the bounding box of the given collection of geometries.
|
static Polygon |
toGeometry(Envelope
Convert an envelope to a polygon.
|
static LinearRing |
toLinearRing(List
Create a LinearRing from two lists of coordinates.
|
static LinearRing |
toLinearRing(TDoubleList
Create a LinearRing from two lists of coordinates.
|
static LineString |
toLineString(List
Create a LineString from the denoted list of coordinates.
|
static LineString |
toLineString(TDoubleList
Create a LineString from the denoted list of coordinates.
|
public static LineStringtoLineString(List <Double > xs, List <Double > ys)
xs - the x values.
ys - the y values.
public static LineStringtoLineString(TDoubleList xs, TDoubleList ys)
xs - the x values.
ys - the y values.
public static LinearRingtoLinearRing(List <Double > xs, List <Double > ys, boolean doublePoint)
xs - the list of x-coordinates.
ys - the list of y-coordinates.
doublePoint - whether the first point is explicitly contained in the lists a second time as the last point.
public static LinearRingtoLinearRing(TDoubleList xs, TDoubleList ys, boolean doublePoint)
xs - the list of x-coordinates.
ys - the list of y-coordinates.
doublePoint - whether the first point is explicitly contained in the lists a second time as the last point.
public static PolygontoGeometry(Envelope envelope)
envelope - the envelope to convert.
public static EnvelopeexpandBy(Envelope envelope, double ratio)
envelope - the envelope to extend.
ratio - the ratio with which to extend.
public static EnvelopegetEnvelope(Collection <Geometry > geometries)
geometries - the geometries to calculate a bounding box for.
public static GeometryCollectioncollection(List <Geometry > geometries)
geometries - the list of geometries