Package com.mongodb.client.model.geojson
Class Point
- java.lang.Object
-
- com.mongodb.client.model.geojson.Geometry
-
- com.mongodb.client.model.geojson.Point
-
public final class Point extends Geometry
A representation of a GeoJSON Point.- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description Point(CoordinateReferenceSystem coordinateReferenceSystem, Position coordinate)Construct an instance with the given coordinate and coordinate reference system.Point(Position coordinate)Construct an instance with the given coordinate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)PositiongetCoordinates()Gets the GeoJSON coordinates of this point.PositiongetPosition()Gets the position of this point.GeoJsonObjectTypegetType()Gets the GeoJSON object type.inthashCode()StringtoString()-
Methods inherited from class com.mongodb.client.model.geojson.Geometry
getCoordinateReferenceSystem, toJson
-
-
-
-
Constructor Detail
-
Point
public Point(Position coordinate)
Construct an instance with the given coordinate.- Parameters:
coordinate- the non-null coordinate of the point
-
Point
public Point(@Nullable CoordinateReferenceSystem coordinateReferenceSystem, Position coordinate)
Construct an instance with the given coordinate and coordinate reference system.- Parameters:
coordinateReferenceSystem- the coordinate reference systemcoordinate- the non-null coordinate of the point
-
-
Method Detail
-
getType
public GeoJsonObjectType getType()
Description copied from class:GeometryGets the GeoJSON object type.
-
getCoordinates
public Position getCoordinates()
Gets the GeoJSON coordinates of this point.- Returns:
- the coordinates
-
getPosition
public Position getPosition()
Gets the position of this point.- Returns:
- the position
-
-