Class GeoJsonPoint
java.lang.Object
org.springframework.data.geo.Point
org.springframework.data.mongodb.core.geo.GeoJsonPoint
- All Implemented Interfaces:
Serializable,GeoJson<List<Double>>
public class GeoJsonPoint
extends org.springframework.data.geo.Point
implements GeoJson<List<Double>>
- Since:
- 1.7
- Author:
- Christoph Strobl
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGeoJsonPoint(double x, double y) CreatesGeoJsonPointfor given coordinates.GeoJsonPoint(org.springframework.data.geo.Point point) CreatesGeoJsonPointfor givenPoint. -
Method Summary
Methods inherited from class org.springframework.data.geo.Point
equals, getX, getY, hashCode, toString
-
Constructor Details
-
GeoJsonPoint
public GeoJsonPoint(double x, double y) CreatesGeoJsonPointfor given coordinates.- Parameters:
x- longitude between -180 and 180 (inclusive).y- latitude between -90 and 90 (inclusive).
-
GeoJsonPoint
public GeoJsonPoint(org.springframework.data.geo.Point point) CreatesGeoJsonPointfor givenPoint.Point.getX()translates to longitude,Point.getY()to latitude.- Parameters:
point- must not be null.
-
-
Method Details
-
getType
Description copied from interface:GeoJsonString value representing the type of theGeoJsonobject. -
getCoordinates
Obtain the coordinates (x/longitude, y/latitude) array.- Specified by:
getCoordinatesin interfaceGeoJson<List<Double>>- Returns:
- the coordinates putting
x/longitudefirst, andy/latitudesecond. - See Also:
-