public class QuadTreeRect
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
float |
east |
float |
north |
float |
south |
float |
west |
Constructor and Description |
---|
QuadTreeRect(float n,
float w,
float s,
float e) |
Modifier and Type | Method and Description |
---|---|
double |
borderDistance(float lat,
float lon)
A utility method to figure out the closest distance of a border to a
point.
|
double |
borderDistanceSqr(double lat,
double lon)
Notice the change from borderDistance() to borderDistanceSqr() since
distance squared must be used throughout, which is now given by:
|
boolean |
pointWithinBounds(float lat,
float lon) |
boolean |
within(float n,
float w,
float s,
float e) |
boolean |
within(QuadTreeRect rect) |
public float north
public float south
public float west
public float east
public boolean within(QuadTreeRect rect)
public boolean within(float n, float w, float s, float e)
public boolean pointWithinBounds(float lat, float lon)
public double borderDistance(float lat, float lon)
lat
- up-down location in QuadTree Grid (latitude, y)lon
- left-right location in QuadTree Grid (longitude, x)public double borderDistanceSqr(double lat, double lon)
lat
- lon
- Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details