com.bbn.openmap.util.quadtree
Class QuadTreeRect
java.lang.Object
com.bbn.openmap.util.quadtree.QuadTreeRect
- All Implemented Interfaces:
- java.io.Serializable
- public class QuadTreeRect
- extends java.lang.Object
- implements java.io.Serializable
- See Also:
- Serialized Form
Constructor Summary |
QuadTreeRect(float n,
float w,
float s,
float e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
north
public float north
south
public float south
west
public float west
east
public float east
QuadTreeRect
public QuadTreeRect(float n,
float w,
float s,
float e)
within
public boolean within(QuadTreeRect rect)
within
public boolean within(float n,
float w,
float s,
float e)
pointWithinBounds
public boolean pointWithinBounds(float lat,
float lon)
borderDistance
public double borderDistance(float lat,
float lon)
- A utility method to figure out the closest distance of a border
to a point. If the point is inside the rectangle, return 0.
- Parameters:
lat
- up-down location in QuadTree Grid (latitude, y)lon
- left-right location in QuadTree Grid (longitude, x)
- Returns:
- closest distance to the point.
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details