Class GeoJsonPolygon

java.lang.Object
org.springframework.data.geo.Polygon
org.springframework.data.mongodb.core.geo.GeoJsonPolygon
All Implemented Interfaces:
Serializable, Iterable<org.springframework.data.geo.Point>, org.springframework.data.geo.Shape, GeoJson<List<GeoJsonLineString>>

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.
Since:
1.7
Author:
Christoph Strobl, Mark Paluch
See Also:
  • Constructor Details

    • GeoJsonPolygon

      public 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.
      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.
    • GeoJsonPolygon

      public GeoJsonPolygon(List<org.springframework.data.geo.Point> points)
      Creates new GeoJsonPolygon from the given Points.
      Parameters:
      points - must not be null.
  • Method Details