Module spring.data.elasticsearch
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
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe value of the coordinates member is always anIterable.getType()String value representing the type of theGeoJsonobject.inthashCode()static GeoJsonPolygonCreates newGeoJsonPolygonfrom the givenPoints.static GeoJsonPolygonof(GeoJsonLineString geoJsonLineString) Creates newGeoJsonPolygonfrom the givenGeoJsonLineString.static GeoJsonPolygonCreates newGeoJsonPolygonfrom the givenGeoPoints.static GeoJsonPolygonCreates newGeoJsonPolygonfrom the givenPoints.static GeoJsonPolygonofGeoPoints(List<GeoPoint> geoPoints) Creates newGeoJsonPolygonfrom the givenGeoPoints.toString()withInnerRing(List<Point> points) withInnerRing(GeoJsonLineString lineString) Creates a newGeoJsonPolygonwith an inner ring defined be the givenGeoJsonLineString.Creates a newGeoJsonPolygonwith an inner ring defined be the givenGeoPoints.Creates a newGeoJsonPolygonwith an inner ring defined be the givenPoints.withInnerRingOfGeoPoints(List<GeoPoint> geoPoints)
-
Field Details
-
TYPE
- See Also:
-
-
Method Details
-
of
Creates newGeoJsonPolygonfrom the givenGeoJsonLineString.- Parameters:
geoJsonLineString- must not be null.
-
of
Creates newGeoJsonPolygonfrom the givenPoints.- Parameters:
points- must not be null.
-
ofGeoPoints
Creates newGeoJsonPolygonfrom the givenGeoPoints.- Parameters:
geoPoints- must not be null.
-
of
public static GeoJsonPolygon of(Point first, Point second, Point third, Point fourth, Point... others) Creates newGeoJsonPolygonfrom the givenPoints.- 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 newGeoJsonPolygonfrom the givenGeoPoints.- 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 newGeoJsonPolygonwith an inner ring defined be the givenPoints.- 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 newGeoJsonPolygonwith an inner ring defined be the givenGeoPoints.- 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 newGeoJsonPolygonwith an inner ring defined be the givenGeoJsonLineString.- Parameters:
lineString- must not be null.- Returns:
- new
GeoJsonPolygon. - Since:
- 1.10
-
getType
Description copied from interface:GeoJsonString value representing the type of theGeoJsonobject.- Specified by:
getTypein interfaceGeoJson<Iterable<GeoJsonLineString>>- Returns:
- will never be null.
- See Also:
-
getCoordinates
Description copied from interface:GeoJsonThe value of the coordinates member is always anIterable. The structure for the elements within is determined byGeoJson.getType()of geometry.- Specified by:
getCoordinatesin interfaceGeoJson<Iterable<GeoJsonLineString>>- Returns:
- will never be null.
- See Also:
-
equals
-
hashCode
public int hashCode() -
toString
-