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 Details

    • 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 system
      coordinate - the non-null coordinate of the point
  • Method Details

    • getType

      public GeoJsonObjectType getType()
      Description copied from class: Geometry
      Gets the GeoJSON object type.
      Specified by:
      getType in class Geometry
      Returns:
      the 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Geometry
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Geometry
    • toString

      public String toString()
      Overrides:
      toString in class Object