|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.javadocmd.simplelatlng.window.LatLngWindow<CircularWindow>
com.javadocmd.simplelatlng.window.CircularWindow
public class CircularWindow
A circular window. Has the benefit of performing well around poles
and regardless of the size of the window. contains() checks
are slower with a CircularWindow than with a RectangularWindow, however.
| Constructor Summary | |
|---|---|
CircularWindow(LatLng center,
double radiusInDegrees)
Constructs a circular window. |
|
CircularWindow(LatLng center,
double radius,
LengthUnit unit)
Constructs a circular window that will contain all points within the specified radius. |
|
| Method Summary | |
|---|---|
boolean |
contains(LatLng point)
Tests to see if the given point falls within this window. |
LatLng |
getCenter()
Returns the center point of the window. |
double |
getRadius()
Gets the radius of this window in degrees. |
double |
getRadius(LengthUnit unit)
Gets the radius of this window in a length unit. |
boolean |
overlaps(CircularWindow window)
Test if this window overlaps the given window. |
void |
setCenter(LatLng center)
Sets the center of this window. |
void |
setRadius(double radius)
Sets the radius of this window. |
String |
toString()
|
| Methods inherited from class com.javadocmd.simplelatlng.window.LatLngWindow |
|---|
filter, filterCopy, latitudeDeltaToLength, lengthToLatitudeDelta, lengthToLongitudeDelta, longitudeDeltaToLength |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CircularWindow(LatLng center,
double radiusInDegrees)
center - the center point.radiusInDegrees - the radius of the circle given in
degrees of angle required to create the circle. This angle is
measured from an axis that joins the center of the Earth
to our circle's center point on the surface.
public CircularWindow(LatLng center,
double radius,
LengthUnit unit)
center - the center point.radius - the radius of the circle given in length units.unit - the unit to use for the radius.| Method Detail |
|---|
public boolean contains(LatLng point)
LatLngWindow
contains in class LatLngWindow<CircularWindow>point - the point to test.
public boolean overlaps(CircularWindow window)
LatLngWindow
overlaps in class LatLngWindow<CircularWindow>window - the window to test against this one.
public LatLng getCenter()
LatLngWindow
getCenter in class LatLngWindow<CircularWindow>public void setCenter(LatLng center)
center - the center point; may not be null.public double getRadius()
public double getRadius(LengthUnit unit)
unit - the unit in which to receive the result.
public void setRadius(double radius)
radius - radius in degrees.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||