public class WikiBrainSpatialUtils extends Object
Modifier and Type | Field and Description |
---|---|
static double |
EARTH_CIRCUMFERENCE |
static double |
EARTH_RADIUS
Radius of earth, in meters.
|
Constructor and Description |
---|
WikiBrainSpatialUtils() |
Modifier and Type | Method and Description |
---|---|
static double[] |
get3DPoints(com.vividsolutions.jts.geom.Point p) |
static com.vividsolutions.jts.geom.Point |
getCenter(com.vividsolutions.jts.geom.Geometry g)
Returns the effective centroid of the geometry.
|
static com.vividsolutions.jts.geom.Point |
getPoint(double lat,
double lon) |
static double |
haversine(double lon1,
double lat1,
double lon2,
double lat2)
Approximation of the distance between two geographic points that treats the
earth as a sphere.
|
static double |
haversine(com.vividsolutions.jts.geom.Point p1,
com.vividsolutions.jts.geom.Point p2) |
static com.vividsolutions.jts.geom.Geometry |
jsonToGeometry(com.google.gson.JsonObject json) |
public static final double EARTH_RADIUS
public static final double EARTH_CIRCUMFERENCE
public static com.vividsolutions.jts.geom.Geometry jsonToGeometry(com.google.gson.JsonObject json)
public static com.vividsolutions.jts.geom.Point getCenter(com.vividsolutions.jts.geom.Geometry g)
g
- public static double[] get3DPoints(com.vividsolutions.jts.geom.Point p)
public static double haversine(com.vividsolutions.jts.geom.Point p1, com.vividsolutions.jts.geom.Point p2)
public static double haversine(double lon1, double lat1, double lon2, double lat2)
lon1
- lat1
- lon2
- lat2
- public static com.vividsolutions.jts.geom.Point getPoint(double lat, double lon)
Copyright © 2015. All rights reserved.