public class GeoJsonPolygon extends Polygon implements GeoJson<List<GeoJsonLineString>>
GeoJson representation of Polygon. Unlike Polygon the GeoJsonPolygon requires a
closed border. Which means that the first and last Point have to have same coordinate pairs.http://geojson.org/geojson-spec.html#polygon,
Serialized Form| Constructor and Description |
|---|
GeoJsonPolygon(List<Point> points)
Creates new
GeoJsonPolygon from the given Points. |
GeoJsonPolygon(Point first,
Point second,
Point third,
Point fourth,
Point... others)
Creates new
GeoJsonPolygon from the given Points. |
| Modifier and Type | Method and Description |
|---|---|
List<GeoJsonLineString> |
getCoordinates()
The value of the coordinates member is always an
Iterable. |
String |
getType()
String value representing the type of the
GeoJson object. |
equals, getPoints, hashCode, iterator, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic GeoJsonPolygon(Point first, Point second, Point third, Point fourth, Point... others)
GeoJsonPolygon from the given Points.first - must not be null.second - must not be null.third - must not be null.fourth - must not be null.others - can be null.public GeoJsonPolygon(List<Point> points)
GeoJsonPolygon from the given Points.points - must not be null.public String getType()
GeoJsonGeoJson object.getType in interface GeoJson<List<GeoJsonLineString>>http://geojson.org/geojson-spec.html#geojson-objectspublic List<GeoJsonLineString> getCoordinates()
GeoJsonIterable. The structure for the elements within is
determined by GeoJson.getType() of geometry.getCoordinates in interface GeoJson<List<GeoJsonLineString>>http://geojson.org/geojson-spec.html#geometry-objectsCopyright © 2011-2015–2016 Pivotal Software, Inc.. All rights reserved.