Class GeoJsonPoint
java.lang.Object
org.springframework.data.geo.Point
org.springframework.data.mongodb.core.geo.GeoJsonPoint
- All Implemented Interfaces:
Serializable,GeoJson<List<Double>>
- Since:
- 1.7
- Author:
- Christoph Strobl
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGeoJsonPoint(double x, double y) CreatesGeoJsonPointfor given coordinates.GeoJsonPoint(Point point) CreatesGeoJsonPointfor givenPoint. -
Method Summary
-
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
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:
-