Class Point

  • All Implemented Interfaces:
    Geometry

    @Deprecated(since="2.0",
                forRemoval=true)
    public class Point
    extends Object
    implements Geometry
    Deprecated, for removal: This API element is subject to removal in a future version.
    use the driver-provided types instead
    Represents a GeoJSON Point type. Will be persisted into the database according to the specification. Therefore because of this, this entity will never have its own ID or store the its Class name.

    The builder for creating a Point is the GeoJson.pointBuilder method, or the helper GeoJson.point factory method.

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      com.mongodb.client.model.geojson.Point convert()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Converts this type to the driver type
      com.mongodb.client.model.geojson.Point convert​(CoordinateReferenceSystem crs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Converts this type to the driver type
      boolean equals​(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      List<Double> getCoordinates()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns a list of coordinates for this Geometry type.
      double getLatitude()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the latitude of this point.
      double getLongitude()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the longitude of this point.
      int hashCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Method Detail

      • getCoordinates

        public List<Double> getCoordinates()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Geometry
        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.
        Specified by:
        getCoordinates in interface Geometry
        Returns:
        a List containing either Geometry objects, or a pair of coordinates as doubles
      • getLatitude

        public double getLatitude()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Return the latitude of this point.
        Returns:
        the Point's latitude
      • getLongitude

        public double getLongitude()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Return the longitude of this point.
        Returns:
        the Point's longitude
      • hashCode

        public int hashCode()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        hashCode in class Object
      • equals

        public boolean equals​(Object o)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        equals in class Object
      • toString

        public String toString()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Overrides:
        toString in class Object
      • convert

        public com.mongodb.client.model.geojson.Point convert()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Geometry
        Converts this type to the driver type
        Specified by:
        convert in interface Geometry
        Returns:
        this Point converted to a driver Point
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.
      • convert

        public com.mongodb.client.model.geojson.Point convert​(@Nullable
                                                              CoordinateReferenceSystem crs)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Description copied from interface: Geometry
        Converts this type to the driver type
        Specified by:
        convert in interface Geometry
        Parameters:
        crs - the CRS to use
        Returns:
        this Point converted to a driver Point
        Developer note.
        This is an internal item. Its function and presence are subject to change without warning. Its use is highly discouraged.