public class MapTools extends Object
| Constructor and Description |
|---|
MapTools() |
| Modifier and Type | Method and Description |
|---|---|
static double |
getPoint2LineDistance(Point p,
Point lineStartPoint,
Point lineEndPoint)
Calculate point to line distance (meter)
|
static double |
getPoint2PointDistance(Point p1,
Point p2)
Calculate point to point distance (meter)
|
static boolean |
inCircleArea(Point p,
Point centerPoint,
double radius)
To determine whether a point in a circle
|
static boolean |
inPolygonArea(Point p,
Point[] area)
To determine whether a point in a polygon
|
static boolean |
inRectangleArea(Point p,
Point upLeftPoint,
Point downRightPoint)
To determine whether a point in a rectangle
|
static boolean |
yawing(Point p,
Point[] line,
double distance)
To determine whether a point is yawing
|
public static double getPoint2PointDistance(Point p1, Point p2)
p1 - one of 2 pointsp2 - one of 2 pointspublic static double getPoint2LineDistance(Point p, Point lineStartPoint, Point lineEndPoint)
p - pointlineStartPoint - line start pointlineEndPoint - line end pointpublic static boolean inCircleArea(Point p, Point centerPoint, double radius)
p - The point to determinecenterPoint - Circle center pointradius - Circle radiuspublic static boolean inRectangleArea(Point p, Point upLeftPoint, Point downRightPoint)
p - The point to determineupLeftPoint - Rectangle up left pointdownRightPoint - Rectangle down right pointpublic static boolean inPolygonArea(Point p, Point[] area)
p - The point to determinearea - PolygonCopyright © 2019. All rights reserved.