public final class Polygon extends Object
double[]
coordinates, or use fromGeoJSON(java.lang.String)
if you have a polygon already encoded as a
GeoJSON string.
NOTES:
spatial-extras
module
Modifier and Type | Field and Description |
---|---|
double |
maxLat
maximum latitude of this polygon's bounding box area
|
double |
maxLon
maximum longitude of this polygon's bounding box area
|
double |
minLat
minimum latitude of this polygon's bounding box area
|
double |
minLon
minimum longitude of this polygon's bounding box area
|
Constructor and Description |
---|
Polygon(double[] polyLats,
double[] polyLons,
Polygon... holes)
Creates a new Polygon from the supplied latitude/longitude array, and optionally any holes.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static Polygon[] |
fromGeoJSON(String geojson)
Parses a standard GeoJSON polygon string.
|
Polygon[] |
getHoles()
Returns a copy of the internal holes array
|
double[] |
getPolyLats()
Returns a copy of the internal latitude array
|
double[] |
getPolyLons()
Returns a copy of the internal longitude array
|
int |
hashCode() |
String |
toString() |
public final double minLat
public final double maxLat
public final double minLon
public final double maxLon
public Polygon(double[] polyLats, double[] polyLons, Polygon... holes)
public double[] getPolyLats()
public double[] getPolyLons()
public Polygon[] getHoles()
public static Polygon[] fromGeoJSON(String geojson) throws ParseException
ParseException
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.