public class GeoJsonPolygon extends org.springframework.data.geo.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<org.springframework.data.geo.Point> points)
Creates new
GeoJsonPolygon from the given Points. |
GeoJsonPolygon(org.springframework.data.geo.Point first,
org.springframework.data.geo.Point second,
org.springframework.data.geo.Point third,
org.springframework.data.geo.Point fourth,
org.springframework.data.geo.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<org.springframework.data.geo.Point> points)
|
GeoJsonPolygon |
withInnerRing(org.springframework.data.geo.Point first,
org.springframework.data.geo.Point second,
org.springframework.data.geo.Point third,
org.springframework.data.geo.Point fourth,
org.springframework.data.geo.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(org.springframework.data.geo.Point first,
org.springframework.data.geo.Point second,
org.springframework.data.geo.Point third,
org.springframework.data.geo.Point fourth,
org.springframework.data.geo.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<org.springframework.data.geo.Point> points)
GeoJsonPolygon from the given Points.points - must not be null.public GeoJsonPolygon withInnerRing(org.springframework.data.geo.Point first, org.springframework.data.geo.Point second, org.springframework.data.geo.Point third, org.springframework.data.geo.Point fourth, org.springframework.data.geo.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<org.springframework.data.geo.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>>public boolean equals(@Nullable Object o)
equals in class org.springframework.data.geo.Polygonpublic int hashCode()
hashCode in class org.springframework.data.geo.PolygonCopyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.