Package com.navmii.sdk.util
Class Util
- java.lang.Object
-
- com.navmii.sdk.util.Util
-
public final class Util extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MapRectangle
getBoundingRectangle(MapCoordinates[] points)
Returns the bounding rectangle for the specified set of points.static double
getDistanceBetween(double lon0, double lat0, double lon1, double lat1)
Returns distance between coordinatesstatic boolean
isPointOnRoute(MapCoordinates coord, java.util.List<MapCoordinates> route, double accuracy)
Check if a point is on or near a polyline, with specified accuracy in meters.static boolean
isPointWithinPolygon(MapCoordinates coord, java.util.List<MapCoordinates> polygon)
Check the point is inside the polygon
-
-
-
Method Detail
-
getBoundingRectangle
public static MapRectangle getBoundingRectangle(MapCoordinates[] points)
Returns the bounding rectangle for the specified set of points.- Parameters:
points
- The points.- Returns:
- The bounding rectangle.
-
getDistanceBetween
public static double getDistanceBetween(double lon0, double lat0, double lon1, double lat1)
Returns distance between coordinates- Returns:
- distance in meters
-
isPointWithinPolygon
public static boolean isPointWithinPolygon(MapCoordinates coord, java.util.List<MapCoordinates> polygon)
Check the point is inside the polygon
-
isPointOnRoute
public static boolean isPointOnRoute(MapCoordinates coord, java.util.List<MapCoordinates> route, double accuracy)
Check if a point is on or near a polyline, with specified accuracy in meters.
-
-