static final class Polygon2D.Edge
extends java.lang.Object
low
, which is the minimum latitude of the edge.
max
stores the maximum latitude of this edge or any children.Modifier and Type | Field and Description |
---|---|
(package private) double |
lat1 |
(package private) double |
lat2 |
(package private) Polygon2D.Edge |
left
left child edge, or null
|
(package private) double |
lon1 |
(package private) double |
lon2 |
(package private) double |
low
min of this edge
|
(package private) double |
max
max latitude of this edge or any children
|
(package private) Polygon2D.Edge |
right
right child edge, or null
|
Constructor and Description |
---|
Edge(double lat1,
double lon1,
double lat2,
double lon2,
double low,
double max) |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
contains(double latitude,
double longitude)
Returns true if the point crosses this edge subtree an odd number of times
|
(package private) boolean |
crosses(double minLat,
double maxLat,
double minLon,
double maxLon)
Returns true if the box crosses any edge in this edge subtree
|
final double lat1
final double lat2
final double lon1
final double lon2
final double low
double max
Polygon2D.Edge left
Polygon2D.Edge right
Edge(double lat1, double lon1, double lat2, double lon2, double low, double max)
boolean contains(double latitude, double longitude)
See https://www.ecse.rpi.edu/~wrf/Research/Short_Notes/pnpoly.html for more information.
boolean crosses(double minLat, double maxLat, double minLon, double maxLon)