Package dev.morphia.geo
Class MultiPolygon
- java.lang.Object
-
- dev.morphia.geo.MultiPolygon
-
- All Implemented Interfaces:
Geometry
public class MultiPolygon extends java.lang.Object implements Geometry
This class represents a set of polygons, which will saved into MongoDB as per the GeoJSON specification. The factory for creating a MultiPolygon is theGeoJson.multiPolygon
method.- See Also:
GeoJson.multiPolygon(Polygon...)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mongodb.client.model.geojson.MultiPolygon
convert()
Converts this type to the driver typecom.mongodb.client.model.geojson.MultiPolygon
convert(CoordinateReferenceSystem crs)
Converts this type to the driver typeboolean
equals(java.lang.Object o)
java.util.List<Polygon>
getCoordinates()
Returns a list of coordinates for this Geometry type.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getCoordinates
public java.util.List<Polygon> getCoordinates()
Description copied from interface:Geometry
Returns a list of coordinates for this Geometry type. For something like a Point, this will be a pair of lat/long coordinates, but for more complex types this will be a list of other Geometry objects. Used for serialisation to MongoDB.- Specified by:
getCoordinates
in interfaceGeometry
- Returns:
- a List containing either Geometry objects, or a pair of coordinates as doubles
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
convert
public com.mongodb.client.model.geojson.MultiPolygon convert()
Description copied from interface:Geometry
Converts this type to the driver type
-
convert
public com.mongodb.client.model.geojson.MultiPolygon convert(CoordinateReferenceSystem crs)
Description copied from interface:Geometry
Converts this type to the driver type
-
-