public class GeoUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
EARTH_RADIUS
地球半径
|
static double |
EE |
| Constructor and Description |
|---|
GeoUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
contains(GeoCircle circle,
GeoPoint point)
判断点是否在圆形范围内
|
static boolean |
contains(GeoPolygon polygon,
GeoPoint point)
判断点是否在多边形区域内
|
static boolean |
contains(GeoPolygon polygon,
GeoPoint point,
boolean on) |
static double |
distance(GeoPoint p1,
GeoPoint p2) |
static double |
rad(double d) |
static GeoBound |
rectangle(GeoPoint point,
long distance) |
public static final double EARTH_RADIUS
public static final double EE
public static double rad(double d)
d - 值public static double distance(GeoPoint p1, GeoPoint p2)
p1 - 坐标点1p2 - 坐标点2public static GeoBound rectangle(GeoPoint point, long distance)
point - 坐标点distance - 距离(米)public static boolean contains(GeoPolygon polygon, GeoPoint point)
polygon - 多边形区域point - 待判断点public static boolean contains(GeoPolygon polygon, GeoPoint point, boolean on)
Copyright © 2022. All rights reserved.