## 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

Field Summary
`float` `east`
`float` `north`
`float` `south`
`float` `west`

Constructor Summary
`QuadTreeRect(float n, float w, float s, float e)`

Method Summary
`double` `borderDistance(float lat, float lon)` A utility method to figure out the closest distance of a border to a point.
`boolean` `pointWithinBounds(float lat, float lon)`
`boolean` `within(float n, float w, float s, float e)`
`boolean` `within(QuadTreeRect rect)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### north

    public float north

### south

    public float south

### west

    public float west

### east

    public float east

Constructor Detail

### QuadTreeRect

    public QuadTreeRect(float n,
                        float w,
                        float s,
                        float e)

Method Detail

### 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