Package dev.morphia.geo
Class LineString
- java.lang.Object
-
- dev.morphia.geo.LineString
-
- All Implemented Interfaces:
Geometry
public class LineString extends java.lang.Object implements Geometry
Represents a GeoJSON LineString type. Will be persisted into the database according to the specification. The factory for creating a LineString is theGeoJson.lineStringmethod.- See Also:
GeoJson.lineString(Point...)
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.mongodb.client.model.geojson.LineStringconvert()Converts this type to the driver typecom.mongodb.client.model.geojson.LineStringconvert(CoordinateReferenceSystem crs)Converts this type to the driver typebooleanequals(java.lang.Object o)java.util.List<Point>getCoordinates()Returns a list of coordinates for this Geometry type.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getCoordinates
public java.util.List<Point> getCoordinates()
Description copied from interface:GeometryReturns 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:
getCoordinatesin interfaceGeometry- Returns:
- a List containing either Geometry objects, or a pair of coordinates as doubles
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
convert
public com.mongodb.client.model.geojson.LineString convert()
Description copied from interface:GeometryConverts this type to the driver type
-
convert
public com.mongodb.client.model.geojson.LineString convert(CoordinateReferenceSystem crs)
Description copied from interface:GeometryConverts this type to the driver type
-
-