public class GeoRelationUtils extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
pointInRectPrecise(double lat,
double lon,
double minLat,
double maxLat,
double minLon,
double maxLon)
Determine if a bbox (defined by minLat, maxLat, minLon, maxLon) contains the provided point (defined by lat, lon)
NOTE: this is a basic method that does not handle dateline or pole crossing.
|
static boolean |
rectCrosses(double aMinLat,
double aMaxLat,
double aMinLon,
double aMaxLon,
double bMinLat,
double bMaxLat,
double bMinLon,
double bMaxLon)
Computes whether two rectangles cross
|
static boolean |
rectIntersects(double aMinLat,
double aMaxLat,
double aMinLon,
double aMaxLon,
double bMinLat,
double bMaxLat,
double bMinLon,
double bMaxLon)
Computes whether a rectangle intersects another rectangle (crosses, within, touching, etc)
|
static boolean |
rectWithin(double aMinLat,
double aMaxLat,
double aMinLon,
double aMaxLon,
double bMinLat,
double bMaxLat,
double bMinLon,
double bMaxLon)
Computes whether the first (a) rectangle is wholly within another (b) rectangle (shared boundaries allowed)
|
public static boolean pointInRectPrecise(double lat, double lon, double minLat, double maxLat, double minLon, double maxLon)
public static boolean rectWithin(double aMinLat, double aMaxLat, double aMinLon, double aMaxLon, double bMinLat, double bMaxLat, double bMinLon, double bMaxLon)
public static boolean rectCrosses(double aMinLat, double aMaxLat, double aMinLon, double aMaxLon, double bMinLat, double bMaxLat, double bMinLon, double bMaxLon)
public static boolean rectIntersects(double aMinLat, double aMaxLat, double aMinLon, double aMaxLon, double bMinLat, double bMaxLat, double bMinLon, double bMaxLon)
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.