use of com.vividsolutions.jts.geom.Point in project dhis2-core by dhis2.
the class GeoUtils method getGeoJsonPoint.
/**
* Get GeometryJSON point.
*
* @param longitude the longitude.
* @param latitude the latitude.
* @return the GeoJSON representation of the given point.
*/
public static Point getGeoJsonPoint(double longitude, double latitude) throws IOException {
Point point = null;
GeometryJSON gtjson = new GeometryJSON();
point = gtjson.readPoint(new StringReader("{\"type\":\"Point\", \"coordinates\":[" + longitude + "," + latitude + "]}"));
return point;
}
Aggregations