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
ConstructorDescriptionGeoJsonPoint
(double x, double y) CreatesGeoJsonPoint
for given coordinates.GeoJsonPoint
(Point point) CreatesGeoJsonPoint
for givenPoint
. -
Method Summary
-
Constructor Details
-
GeoJsonPoint
public GeoJsonPoint(double x, double y) CreatesGeoJsonPoint
for given coordinates.- Parameters:
x
- longitude between -180 and 180 (inclusive).y
- latitude between -90 and 90 (inclusive).
-
GeoJsonPoint
CreatesGeoJsonPoint
for givenPoint
.Point.getX()
translates to longitude,Point.getY()
to latitude.- Parameters:
point
- must not be null.
-
-
Method Details
-
getType
Description copied from interface:GeoJson
String value representing the type of theGeoJson
object. -
getCoordinates
Obtain the coordinates (x/longitude, y/latitude) array.- Specified by:
getCoordinates
in interfaceGeoJson<List<Double>>
- Returns:
- the coordinates putting
x/longitude
first, andy/latitude
second. - See Also:
-