public class GeoJsonPoint extends org.springframework.data.geo.Point implements GeoJson<List<Double>>
Constructor and Description |
---|
GeoJsonPoint(double x,
double y)
Creates
GeoJsonPoint for given coordinates. |
GeoJsonPoint(org.springframework.data.geo.Point point)
Creates
GeoJsonPoint for given Point . |
Modifier and Type | Method and Description |
---|---|
List<Double> |
getCoordinates()
Obtain the coordinates (x/longitude, y/latitude) array.
|
String |
getType()
String value representing the type of the
GeoJson object. |
public GeoJsonPoint(double x, double y)
GeoJsonPoint
for given coordinates.x
- longitude between -180 and 180 (inclusive).y
- latitude between -90 and 90 (inclusive).public GeoJsonPoint(org.springframework.data.geo.Point point)
GeoJsonPoint
for given Point
.
Point.getX()
translates to longitude, Point.getY()
to latitude.
point
- must not be null.public String getType()
GeoJson
GeoJson
object.getType
in interface GeoJson<List<Double>>
public List<Double> getCoordinates()
getCoordinates
in interface GeoJson<List<Double>>
x/longitude
first, and y/latitude
second.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.