|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.GeoBounds
public class GeoBounds
Represents a set of rectangular latitude/longitude bounds
Constructor Summary | |
---|---|
GeoBounds()
Constructor |
|
GeoBounds(java.util.Collection<GeoPointProvider> gppList)
Constructor |
|
GeoBounds(double radiusM,
GeoPointProvider... gpp)
Constructor |
|
GeoBounds(GeoBounds gb)
Copy constructor |
|
GeoBounds(GeoPointProvider... gpp)
Constructor |
|
GeoBounds(GeoPolygon gp)
Constructor |
|
GeoBounds(java.lang.String gbs,
char sep)
Constructor |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of this GeoBounds |
void |
extendByCircle(double radiusM,
double lat,
double lon)
Extend the bounds by the specified point/radius circle |
void |
extendByCircle(double radiusM,
GeoPointProvider... gpp)
Extend the bounds by the specified point/radius circle |
void |
extendByCircle(double radiusM,
GeoPointProvider gpp)
Extend the bounds by the specified point/radius circle |
void |
extendByPoint(java.util.Collection<GeoPointProvider> gppList)
Extend the bounds by the specified GeoPoint |
void |
extendByPoint(GeoPointProvider... gpp)
Extend the bounds by the specified GeoPoint |
void |
extendByPoint(GeoPointProvider gpp)
Extend the bounds by the specified GeoPoint |
boolean |
extendByRadius(double radiusM)
Extend the bounds of the current valid GeoBounds by the specified radius meters |
double |
getBottom()
Gets the minimum latitude |
GeoPoint |
getCenter()
Returns the average center of the bounds |
double |
getDeltaLatitude()
Gets the height of the bounds |
double |
getDeltaLatitudeMeters()
Gets the width of the bounds (in delta meters) |
double |
getDeltaLongitude()
Gets the width of the bounds |
double |
getDeltaLongitudeMeters()
Gets the width of the bounds (in delta meters) |
double |
getDiagonalMeters()
Gets the diagonal distance of the bounds (in meters) |
double |
getLeft()
Gets the minimum longitude |
double |
getMaxLatitude()
Gets the maximum latitude |
double |
getMaxLongitude()
Gets the maximum longitude |
double |
getMaxX()
Gets the maximum longitude |
double |
getMaxY()
Gets the maximum latitude |
double |
getMetersPerPixel(int W,
int H)
Calculate/return the best meters-per-pixel |
double |
getMinLatitude()
Gets the minimum latitude |
double |
getMinLongitude()
Gets the minimum longitude |
double |
getMinX()
Gets the minimum longitude |
double |
getMinY()
Gets the minimum latitude |
PixelPoint |
getPixelLocation(GeoPoint gp,
int W,
int H)
Return the pixel location of the specified GeoPoint within the specified dimensions |
double |
getRight()
Gets the maximum longitude |
double |
getTop()
Gets the maximum latitude |
boolean |
isValid()
Returns true if this bounds is valid |
static void |
main(java.lang.String[] argv)
Main entry point for testing/debugging |
void |
reset()
Reset bounds |
void |
setMaxLatitude(double maxLat)
Sets the maximum latitude |
void |
setMaxLongitude(double maxLon)
Sets the maximum longitude |
void |
setMinLatitude(double minLat)
Sets the minimum latitude |
void |
setMinLongitude(double minLon)
Sets the minimum longitude |
java.lang.String |
toString()
Return a String representation of this GeoBounds |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GeoBounds()
public GeoBounds(GeoPointProvider... gpp)
gpp
- An array pointspublic GeoBounds(GeoPolygon gp)
gp
- A GeoPolygonpublic GeoBounds(java.util.Collection<GeoPointProvider> gppList)
gppList
- A list pointspublic GeoBounds(double radiusM, GeoPointProvider... gpp)
radiusM
- The circle radiusgpp
- An array circle center pointspublic GeoBounds(java.lang.String gbs, char sep)
gbs
- The GeoBounds in String format (MinLat/MaxLat/MinLon/MaxLon)sep
- The GeoBounds separatorpublic GeoBounds(GeoBounds gb)
gb
- The other GeoBounds to copyMethod Detail |
---|
public void reset()
public java.lang.Object clone()
clone
in class java.lang.Object
public void setMaxLatitude(double maxLat)
maxLat
- The maximum latitudepublic double getMaxLatitude()
public double getMaxY()
public double getTop()
public void setMinLatitude(double minLat)
minLat
- The minimum latitudepublic double getMinLatitude()
public double getMinY()
public double getBottom()
public void setMaxLongitude(double maxLon)
maxLon
- The maximum longitudepublic double getMaxLongitude()
public double getMaxX()
public double getRight()
public void setMinLongitude(double minLon)
minLon
- The minimum longitudepublic double getMinLongitude()
public double getMinX()
public double getLeft()
public boolean isValid()
public void extendByPoint(GeoPointProvider gpp)
gpp
- The point added to the boundspublic void extendByPoint(GeoPointProvider... gpp)
gpp
- The point(s) added to the boundspublic void extendByPoint(java.util.Collection<GeoPointProvider> gppList)
gppList
- The point(s) added to the boundspublic void extendByCircle(double radiusM, double lat, double lon)
radiusM
- The radius in meterslat
- The center latitudelon
- The center longitudepublic void extendByCircle(double radiusM, GeoPointProvider gpp)
radiusM
- The radius in metersgpp
- The center points of the circlespublic void extendByCircle(double radiusM, GeoPointProvider... gpp)
radiusM
- The radius in metersgpp
- The center points of the circlespublic boolean extendByRadius(double radiusM)
radiusM
- The radius in meterspublic GeoPoint getCenter()
public double getDeltaLongitudeMeters()
public double getDeltaLatitudeMeters()
public double getDiagonalMeters()
public double getMetersPerPixel(int W, int H)
W
- The map pixel widthH
- The map pixel height
public PixelPoint getPixelLocation(GeoPoint gp, int W, int H)
gp
- The GeoPointW
- The pixel widthH
- The pixel height
public double getDeltaLatitude()
public double getDeltaLongitude()
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] argv)
argv
- Comand-line arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |