|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ka2ddo.yaac.srtm.SRTMTileManager
public class SRTMTileManager
This class manages an in-memory cache of SRTMTile objects, as well as providing I/O code to fetch new tiles from the USGS website.
Constructor Summary | |
---|---|
SRTMTileManager()
|
Method Summary | |
---|---|
void |
flushFileCache()
Clear cached pointers to tile files. |
short |
getElevation(double latitude,
double longitude)
Get the SRTM elevation at the specified lat/lon coordinates. |
int |
getEstimatedCacheSize()
Get an estimate of the amount of memory used by the SRTM tile cache. |
static SRTMTileManager |
getInstance()
Get the reference to the singleton SRTMTileManager object. |
SRTMTile |
getTile(double latitude,
double longitude)
Get a SRTMTile object for the 1-degree by 1-degree region of the planet requested. |
SRTMTile |
getTile(int latitude,
int longitude)
Get a SRTMTile object for the 1-degree by 1-degree region of the planet requested. |
static void |
loadPrecompiledTiles(double radius,
double lat,
double lon,
boolean hiRes)
Download SRTM1 or SRTM3 tiles from the US Geological Survey's website to cover a specified region of the planet. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SRTMTileManager()
Method Detail |
---|
public static SRTMTileManager getInstance()
public SRTMTile getTile(int latitude, int longitude)
latitude
- int latitude in millionths of degrees Northlongitude
- int longitude in millionths of degrees East
public SRTMTile getTile(double latitude, double longitude)
latitude
- double latitude in fractional degrees Northlongitude
- double longitude in fractional degrees East
public short getElevation(double latitude, double longitude)
latitude
- double latitude in fractional degrees Northlongitude
- double longitude in fractional degrees East
public void flushFileCache()
public int getEstimatedCacheSize()
public static void loadPrecompiledTiles(double radius, double lat, double lon, boolean hiRes)
radius
- radius to cover in kilometerslat
- center latitude of region to download in fractional degrees Northlon
- center longitude of region to download in fractional degrees EasthiRes
- boolean true if 1-arc-second tiles should be downloaded where available
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |