Package dev.morphia.geo
Interface Geometry
-
- All Known Implementing Classes:
LineString,MultiLineString,MultiPoint,MultiPolygon,Point,Polygon
public interface GeometryInterface to denote which entities are classes that will serialise into a MongoDB GeoJson object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.mongodb.client.model.geojson.Geometryconvert()Converts this type to the driver typecom.mongodb.client.model.geojson.Geometryconvert(CoordinateReferenceSystem crs)Converts this type to the driver typejava.util.List<?>getCoordinates()Returns a list of coordinates for this Geometry type.
-
-
-
Method Detail
-
getCoordinates
java.util.List<?> getCoordinates()
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.- Returns:
- a List containing either Geometry objects, or a pair of coordinates as doubles
-
convert
com.mongodb.client.model.geojson.Geometry convert()
Converts this type to the driver type- Returns:
- the driver type
-
convert
com.mongodb.client.model.geojson.Geometry convert(CoordinateReferenceSystem crs)
Converts this type to the driver type- Parameters:
crs- the CRS to use- Returns:
- the driver type
-
-