Package com.mongodb.client.model.geojson
Class Geometry
- java.lang.Object
-
- com.mongodb.client.model.geojson.Geometry
-
- Direct Known Subclasses:
GeometryCollection
,LineString
,MultiLineString
,MultiPoint
,MultiPolygon
,Point
,Polygon
public abstract class Geometry extends java.lang.Object
An abstract class for representations of GeoJSON geometry objects.- Since:
- 3.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
CoordinateReferenceSystem
getCoordinateReferenceSystem()
Gets the coordinate reference system, which may be nullabstract GeoJsonObjectType
getType()
Gets the GeoJSON object type.int
hashCode()
java.lang.String
toJson()
Converts to GeoJSON representation
-
-
-
Method Detail
-
getType
public abstract GeoJsonObjectType getType()
Gets the GeoJSON object type.- Returns:
- the type
-
toJson
public java.lang.String toJson()
Converts to GeoJSON representation- Returns:
- the GeoJSON representation
-
getCoordinateReferenceSystem
@Nullable public CoordinateReferenceSystem getCoordinateReferenceSystem()
Gets the coordinate reference system, which may be null- Returns:
- the possibly-null coordinate reference system
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-