|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A GeoArray is a interface that represents a set of Geo information. Rather than keeping a set of Geo[] around and managing the memory for all of those objects, the GeoArray provides an object that just holds onto the coordinates of those points.
Nested Class Summary | |
static class |
GeoArray.Adapter
An abstract parent implementation class of GeoArray that handles common methods. |
static class |
GeoArray.Double
An implementation of GeoArray and GeoArray.Mutable that contains double-precision values. |
static class |
GeoArray.Float
An implementation of GeoArray and GeoArray.Mutable that contains float-precision values. |
static interface |
GeoArray.Mutable
A Mutable GeoArray is one where the points can be modified. |
Method Summary | |
double |
area()
Compute the area of the GeoArray polygon on the surface of a unit sphere given an enumeration of its point. |
void |
closeArray()
Ensure that the Geo array starts and ends with the same values. |
boolean |
equals(int index,
Geo comp)
|
Geo |
get(int i)
Get a Geo represented by the index i. |
Geo |
get(int i,
Geo ret)
Load the values for Geo at index i into ret. |
int |
getSize()
Get the number of Geo points represented by this array. |
void |
removeDups()
Modify, if needed, the Geo array with the duplicates removed. |
double[] |
toLLDegrees()
Convert the GeoArray to an array of decimal degree values, alternating lat, lon, lat, lon. |
double[] |
toLLRadians()
Convert the GeoArray to an array of radian values, alternating lat, lon, lat, lon. |
Geo[] |
toPointArray()
Convert the GeoArray to an array of Geos. |
Method Detail |
public Geo get(int i)
i
-
public Geo get(int i, Geo ret)
i
- ret
-
public int getSize()
public Geo[] toPointArray()
public double[] toLLDegrees()
public double[] toLLRadians()
public boolean equals(int index, Geo comp)
index
- the index of the Geo in the GeoArray to compare.comp
- the Geo to compare to the indexed value.
public double area()
public void closeArray()
public void removeDups()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |