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.| 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 |
|---|---|
boolean |
equals(Object o) |
List<GeoJsonLineString> |
getCoordinates()
The value of the coordinates member is always an
Iterable. |
String |
getType()
String value representing the type of the
GeoJson object. |
int |
hashCode() |
GeoJsonPolygon |
withInnerRing(GeoJsonLineString lineString)
Creates a new
GeoJsonPolygon with an inner ring defined be the given GeoJsonLineString. |
GeoJsonPolygon |
withInnerRing(List<Point> points)
|
GeoJsonPolygon |
withInnerRing(Point first,
Point second,
Point third,
Point fourth,
Point... others)
Creates a new
GeoJsonPolygon with an inner ring defined be the given Points. |
clone, 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 empty.public GeoJsonPolygon(List<Point> points)
GeoJsonPolygon from the given Points.points - must not be null.public GeoJsonPolygon withInnerRing(Point first, Point second, Point third, Point fourth, Point... others)
GeoJsonPolygon with an inner ring defined be 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 empty.GeoJsonPolygon.public GeoJsonPolygon withInnerRing(List<Point> points)
points - must not be null.GeoJsonPolygon.public GeoJsonPolygon withInnerRing(GeoJsonLineString lineString)
GeoJsonPolygon with an inner ring defined be the given GeoJsonLineString.lineString - must not be null.GeoJsonPolygon.public String getType()
GeoJsonGeoJson object.getType in interface GeoJson<List<GeoJsonLineString>>public List<GeoJsonLineString> getCoordinates()
GeoJsonIterable. The structure for the elements within is
determined by GeoJson.getType() of geometry.getCoordinates in interface GeoJson<List<GeoJsonLineString>>Copyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.