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 FormConstructor and Description |
---|
GeoJsonPolygon(List<Point> points)
Creates new
GeoJsonPolygon from the given Point s. |
GeoJsonPolygon(Point first,
Point second,
Point third,
Point fourth,
Point... others)
Creates new
GeoJsonPolygon from the given Point s. |
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, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
forEach, spliterator
public GeoJsonPolygon(Point first, Point second, Point third, Point fourth, Point... others)
GeoJsonPolygon
from the given Point
s.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 Point
s.points
- must not be null.public String getType()
GeoJson
GeoJson
object.getType
in interface GeoJson<List<GeoJsonLineString>>
http://geojson.org/geojson-spec.html#geojson-objects
public List<GeoJsonLineString> getCoordinates()
GeoJson
Iterable
. 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-objects
Copyright © 2011-2015–2015 Pivotal Software, Inc.. All rights reserved.