Class GeoJsonPolygon
java.lang.Object
org.springframework.data.elasticsearch.core.geo.GeoJsonPolygon
- All Implemented Interfaces:
GeoJson<Iterable<GeoJsonLineString>>
GeoJson
representation of a polygon. Copied from Spring Data Mongodb
- Since:
- 4.1
- Author:
- Christoph Strobl, Mark Paluch, Peter-Josef Meisch
- See Also:
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
The value of the coordinates member is always anIterable
.getType()
String value representing the type of theGeoJson
object.int
hashCode()
static GeoJsonPolygon
Creates newGeoJsonPolygon
from the givenPoint
s.static GeoJsonPolygon
of
(GeoJsonLineString geoJsonLineString) Creates newGeoJsonPolygon
from the givenGeoJsonLineString
.static GeoJsonPolygon
Creates newGeoJsonPolygon
from the givenGeoPoint
s.static GeoJsonPolygon
Creates newGeoJsonPolygon
from the givenPoint
s.static GeoJsonPolygon
ofGeoPoints
(List<GeoPoint> geoPoints) Creates newGeoJsonPolygon
from the givenGeoPoint
s.toString()
withInnerRing
(List<Point> points) withInnerRing
(GeoJsonLineString lineString) Creates a newGeoJsonPolygon
with an inner ring defined be the givenGeoJsonLineString
.Creates a newGeoJsonPolygon
with an inner ring defined be the givenGeoPoint
s.Creates a newGeoJsonPolygon
with an inner ring defined be the givenPoint
s.withInnerRingOfGeoPoints
(List<GeoPoint> geoPoints)
-
Field Details
-
TYPE
- See Also:
-
-
Method Details
-
of
Creates newGeoJsonPolygon
from the givenGeoJsonLineString
.- Parameters:
geoJsonLineString
- must not be null.
-
of
Creates newGeoJsonPolygon
from the givenPoint
s.- Parameters:
points
- must not be null.
-
ofGeoPoints
Creates newGeoJsonPolygon
from the givenGeoPoint
s.- Parameters:
geoPoints
- must not be null.
-
of
public static GeoJsonPolygon of(Point first, Point second, Point third, Point fourth, Point... others) Creates newGeoJsonPolygon
from the givenPoint
s.- Parameters:
first
- must not be null.second
- must not be null.third
- must not be null.fourth
- must not be nullothers
- can be empty.
-
of
public static GeoJsonPolygon of(GeoPoint first, GeoPoint second, GeoPoint third, GeoPoint fourth, GeoPoint... others) Creates newGeoJsonPolygon
from the givenGeoPoint
s.- Parameters:
first
- must not be null.second
- must not be null.third
- must not be null.fourth
- must not be nullothers
- can be empty.
-
withInnerRing
public GeoJsonPolygon withInnerRing(Point first, Point second, Point third, Point fourth, Point... others) Creates a newGeoJsonPolygon
with an inner ring defined be the givenPoint
s.- Parameters:
first
- must not be null.second
- must not be null.third
- must not be null.fourth
- must not be null.others
- can be empty.- Returns:
- new
GeoJsonPolygon
.
-
withInnerRing
public GeoJsonPolygon withInnerRing(GeoPoint first, GeoPoint second, GeoPoint third, GeoPoint fourth, GeoPoint... others) Creates a newGeoJsonPolygon
with an inner ring defined be the givenGeoPoint
s.- Parameters:
first
- must not be null.second
- must not be null.third
- must not be null.fourth
- must not be null.others
- can be empty.- Returns:
- new
GeoJsonPolygon
.
-
withInnerRing
- Parameters:
points
- must not be null.- Returns:
- new
GeoJsonPolygon
.
-
withInnerRingOfGeoPoints
- Parameters:
geoPoints
- must not be null.- Returns:
- new
GeoJsonPolygon
.
-
withInnerRing
Creates a newGeoJsonPolygon
with an inner ring defined be the givenGeoJsonLineString
.- Parameters:
lineString
- must not be null.- Returns:
- new
GeoJsonPolygon
. - Since:
- 1.10
-
getType
Description copied from interface:GeoJson
String value representing the type of theGeoJson
object.- Specified by:
getType
in interfaceGeoJson<Iterable<GeoJsonLineString>>
- Returns:
- will never be null.
- See Also:
-
getCoordinates
Description copied from interface:GeoJson
The value of the coordinates member is always anIterable
. The structure for the elements within is determined byGeoJson.getType()
of geometry.- Specified by:
getCoordinates
in interfaceGeoJson<Iterable<GeoJsonLineString>>
- Returns:
- will never be null.
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-