Package com.mongodb.client.model.geojson
Class Polygon
- java.lang.Object
-
- com.mongodb.client.model.geojson.Geometry
-
- com.mongodb.client.model.geojson.Polygon
-
@Deprecated(since="2021-05-27") public final class Polygon extends Geometry
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.A representation of a GeoJSON Polygon.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description Polygon(CoordinateReferenceSystem coordinateReferenceSystem, PolygonCoordinates coordinates)
Deprecated.Construct an instance with the given coordinates and coordinate reference system.Polygon(PolygonCoordinates coordinates)
Deprecated.Construct an instance with the given coordinates.Polygon(java.util.List<Position> exterior, java.util.List<Position>... holes)
Deprecated.Construct an instance with the given coordinates.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Deprecated.PolygonCoordinates
getCoordinates()
Deprecated.Gets the GeoJSON coordinates of the polygonjava.util.List<Position>
getExterior()
Deprecated.Gets the exterior coordinates.java.util.List<java.util.List<Position>>
getHoles()
Deprecated.Get the holes in this polygon.GeoJsonObjectType
getType()
Deprecated.Gets the GeoJSON object type.int
hashCode()
Deprecated.java.lang.String
toString()
Deprecated.-
Methods inherited from class com.mongodb.client.model.geojson.Geometry
getCoordinateReferenceSystem, toJson
-
-
-
-
Constructor Detail
-
Polygon
public Polygon(java.util.List<Position> exterior, java.util.List<Position>... holes)
Deprecated.Construct an instance with the given coordinates.- Parameters:
exterior
- the exterior ring of the polygonholes
- optional interior rings of the polygon
-
Polygon
public Polygon(PolygonCoordinates coordinates)
Deprecated.Construct an instance with the given coordinates.- Parameters:
coordinates
- the coordinates
-
Polygon
public Polygon(@Nullable CoordinateReferenceSystem coordinateReferenceSystem, PolygonCoordinates coordinates)
Deprecated.Construct an instance with the given coordinates and coordinate reference system.- Parameters:
coordinateReferenceSystem
- the coordinate reference systemcoordinates
- the coordinates
-
-
Method Detail
-
getType
public GeoJsonObjectType getType()
Deprecated.Description copied from class:Geometry
Gets the GeoJSON object type.
-
getCoordinates
public PolygonCoordinates getCoordinates()
Deprecated.Gets the GeoJSON coordinates of the polygon- Returns:
- the coordinates, which must have at least one element
-
getExterior
public java.util.List<Position> getExterior()
Deprecated.Gets the exterior coordinates.- Returns:
- the exterior coordinates
-
getHoles
public java.util.List<java.util.List<Position>> getHoles()
Deprecated.Get the holes in this polygon.- Returns:
- the possibly-empty list of holes
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-