public class GeoUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GeoUtils.Bounds
地理坐标矩形区域
|
static class |
GeoUtils.Circle
地理坐标圆形
|
static class |
GeoUtils.Point
地理坐标点
|
static class |
GeoUtils.PointType
坐标点类型
|
static class |
GeoUtils.Polygon
地理坐标多边形区域
|
| Constructor and Description |
|---|
GeoUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
contains(GeoUtils.Circle circle,
GeoUtils.Point point)
判断点是否在圆形范围内
|
static boolean |
contains(GeoUtils.Polygon polygon,
GeoUtils.Point point)
判断点是否在多边形区域内
|
static boolean |
contains(GeoUtils.Polygon polygon,
GeoUtils.Point point,
boolean on) |
static double |
distance(GeoUtils.Point p1,
GeoUtils.Point p2) |
static GeoUtils.Bounds |
rectangle(GeoUtils.Point point,
long distance) |
public static double distance(GeoUtils.Point p1, GeoUtils.Point p2)
p1 - 坐标点1p2 - 坐标点2public static GeoUtils.Bounds rectangle(GeoUtils.Point point, long distance)
point - 坐标点distance - 距离(米)public static boolean contains(GeoUtils.Polygon polygon, GeoUtils.Point point)
polygon - 多边形区域point - 待判断点public static boolean contains(GeoUtils.Polygon polygon, GeoUtils.Point point, boolean on)
public static int contains(GeoUtils.Circle circle, GeoUtils.Point point)
circle - 圆形区域point - 待判断点Copyright © 2020. All rights reserved.