gov.nasa.worldwind.terrain
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Nested Class Summary | |
|---|---|
protected static class |
BasicElevationModel.DownloadPostProcessor
|
protected static class |
BasicElevationModel.Elevations
|
protected static class |
BasicElevationModel.ElevationTile
|
protected static class |
BasicElevationModel.RequestTask
|
| Field Summary | |
|---|---|
protected static int |
SERVICE_CAPABILITIES_RESOURCE_ID
|
| Fields inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel |
|---|
missingDataFlag, missingDataValue |
| Fields inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
changeSupport |
| Constructor Summary | |
|---|---|
BasicElevationModel(AVList params)
|
|
BasicElevationModel(Document dom,
AVList params)
|
|
BasicElevationModel(Element domElement,
AVList params)
|
|
BasicElevationModel(String restorableStateInXml)
|
|
| Method Summary | |
|---|---|
protected void |
addTileToCache(BasicElevationModel.ElevationTile tile,
BufferWrapper elevations)
|
protected boolean |
areElevationsInMemory(TileKey key)
|
protected void |
checkResources()
|
int |
computeLevelForResolution(Sector sector,
double resolution)
|
boolean |
contains(Angle latitude,
Angle longitude)
Indicates whether a specified location is within the elevation model's domain. |
protected static ByteBuffer |
convertImageToElevations(ByteBuffer buffer,
String contentType)
|
int |
countTilesInSector(Sector sector,
int levelNumber)
|
protected Document |
createConfigurationDocument(AVList params)
|
protected MemoryCache |
createMemoryCache(String cacheName)
|
protected BasicElevationModel.ElevationTile |
createTile(TileKey key)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doGetRestorableStateForAVPair(String key,
Object value,
RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doRestoreState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doRestoreStateForObject(RestorableSupport rs,
RestorableSupport.StateObject so)
|
protected void |
downloadElevations(Tile tile)
|
protected void |
downloadElevations(Tile tile,
BasicElevationModel.DownloadPostProcessor postProcessor)
|
protected void |
doWriteConfigurationParams(FileStore fileStore,
String fileName,
AVList params)
|
ByteBuffer |
generateExtremeElevations(int levelNumber)
|
double |
getBestResolution(Sector sector)
Indicates the best resolution attainable for a specified sector. |
protected AVList |
getConfigurationParams(AVList params)
|
double |
getDetailHint(Sector sector)
Returns the detail hint associated with the specified sector. |
String |
getElevationDataByteOrder()
|
String |
getElevationDataPixelType()
|
protected BasicElevationModel.Elevations |
getElevations(Sector sector,
LevelSet levelSet,
int targetLevelNumber)
|
double |
getElevations(Sector sector,
List<? extends LatLon> latlons,
double targetResolution,
double[] buffer)
Returns the elevations of a collection of locations. |
long |
getEstimatedMissingDataSize(Sector sector,
double resolution)
Get the estimated size in byte of the missing elevation data for the given Sector and resolution. |
double[] |
getExtremeElevations(Angle latitude,
Angle longitude)
Returns the minimum and maximum elevations at a specified location. |
double[] |
getExtremeElevations(Sector sector)
Returns the minimum and maximum elevations within a specified sector of the elevation model. |
protected BufferWrapper |
getExtremes()
|
protected int |
getExtremesLevel()
|
LevelSet |
getLevels()
|
protected Map<TileKey,BasicElevationModel.ElevationTile> |
getLevelZeroTiles()
|
double |
getMaxElevation()
Returns the maximum elevation contained in the elevevation model. |
protected MemoryCache |
getMemoryCache()
|
double |
getMinElevation()
Returns the minimum elevation contained in the elevevation model. |
protected static AVList |
getParamsFromDocument(Element domElement,
AVList params)
|
String |
getRestorableState()
Returns an XML document string describing the object’s state. |
protected Level |
getTargetLevel(Sector sector,
double targetSize)
|
protected BasicElevationModel.ElevationTile |
getTileFromMemory(TileKey tileKey)
|
Tile[][] |
getTilesInSector(Sector sector,
int levelNumber)
|
double |
getUnmappedElevation(Angle latitude,
Angle longitude)
Returns the elevation at a specified location, but without mapping missing data to the elevation model's missing data replacement value. |
protected void |
initializeResources(AVList params)
|
protected void |
initPropertiesFromCapabilities(Capabilities caps,
AVList params)
|
protected void |
initPropertiesFromService(AVList params)
|
int |
intersects(Sector sector)
Indicates whether the elevation model corresponds to a specified sector. |
protected boolean |
loadElevations(BasicElevationModel.ElevationTile tile,
URL url)
|
void |
loadExtremeElevations(String extremesFileName)
|
protected double |
lookupElevation(double latRadians,
double lonRadians,
BasicElevationModel.ElevationTile tile)
|
BulkRetrievalThread |
makeLocal(Sector sector,
double resolution)
Start a new BulkRetrievalThread that will try to download all elevation tiles for a given Sector
and resolution. |
protected boolean |
needsConfigurationFile(FileStore fileStore,
String fileName,
AVList params,
boolean removeIfExpired)
|
protected BufferWrapper |
readElevations(URL url)
|
protected void |
requestTile(TileKey key)
|
protected static AVList |
restorableStateToParams(String stateInXml)
|
void |
restoreState(String stateInXml)
Restores the object’s state to what is described in the specified XML document string. |
protected static void |
restoreStateForParams(RestorableSupport rs,
RestorableSupport.StateObject context,
AVList params)
|
void |
setByteOrder(String byteOrder)
|
void |
setDetailHint(double hint)
|
void |
setExpiryTime(long expiryTime)
Specifies the time of the elevation models's most recent dataset update, beyond which cached data is invalid. |
protected static void |
setFallbacks(AVList params)
|
void |
setPixelType(String pixelType)
|
protected void |
writeConfigurationFile()
|
protected void |
writeConfigurationParams(AVList params)
|
| Methods inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel |
|---|
composeElevations, getElevation, getExpiryTime, getMissingDataReplacement, getMissingDataSignal, getName, isNetworkRetrievalEnabled, setMissingDataReplacement, setMissingDataSignal, setName, setNetworkRetrievalEnabled, toString |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.nasa.worldwind.NamedObject |
|---|
getName |
| Methods inherited from interface gov.nasa.worldwind.avlist.AVList |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues |
| Methods inherited from interface java.beans.PropertyChangeListener |
|---|
propertyChange |
| Field Detail |
|---|
protected static final int SERVICE_CAPABILITIES_RESOURCE_ID
| Constructor Detail |
|---|
public BasicElevationModel(AVList params)
public BasicElevationModel(Document dom, AVList params)
public BasicElevationModel(Element domElement, AVList params)
public BasicElevationModel(String restorableStateInXml)
| Method Detail |
|---|
protected void addTileToCache(BasicElevationModel.ElevationTile tile, BufferWrapper elevations)
protected boolean areElevationsInMemory(TileKey key)
protected void checkResources()
public int computeLevelForResolution(Sector sector, double resolution)
public boolean contains(Angle latitude, Angle longitude)
ElevationModel
contains in interface ElevationModellatitude - the latitude of the location in question.longitude - the longitude of the location in question.
protected static ByteBuffer convertImageToElevations(ByteBuffer buffer, String contentType) throws IOException
IOExceptionpublic int countTilesInSector(Sector sector, int levelNumber)
protected Document createConfigurationDocument(AVList params)
protected MemoryCache createMemoryCache(String cacheName)
protected BasicElevationModel.ElevationTile createTile(TileKey key)
protected void doGetRestorableState(RestorableSupport rs, RestorableSupport.StateObject context)
protected void doGetRestorableStateForAVPair(String key, Object value, RestorableSupport rs, RestorableSupport.StateObject context)
protected void doRestoreState(RestorableSupport rs, RestorableSupport.StateObject context)
protected void doRestoreStateForObject(RestorableSupport rs, RestorableSupport.StateObject so)
protected void downloadElevations(Tile tile)
protected void downloadElevations(Tile tile, BasicElevationModel.DownloadPostProcessor postProcessor)
protected void doWriteConfigurationParams(FileStore fileStore, String fileName, AVList params)
public ByteBuffer generateExtremeElevations(int levelNumber)
public double getBestResolution(Sector sector)
ElevationModel
getBestResolution in interface ElevationModelsector - the sector in question. If null, the elevation model's best overall resolution is returned. This is
the best attainable at some> locations but not necessarily at all locations.
Double.MAX_VALUE if the
sector does not intersect the elevation model.protected AVList getConfigurationParams(AVList params)
public double getDetailHint(Sector sector)
ElevationModel
getDetailHint in interface ElevationModelgetDetailHint in class AbstractElevationModelsector - the sector in question.
public String getElevationDataByteOrder()
public String getElevationDataPixelType()
protected BasicElevationModel.Elevations getElevations(Sector sector, LevelSet levelSet, int targetLevelNumber)
public double getElevations(Sector sector, List<? extends LatLon> latlons, double targetResolution, double[] buffer)
ElevationModel
getElevations in interface ElevationModelsector - the sector in question.latlons - the locations to return elevations for. A value of zero is returned if a location is
null.targetResolution - the desired horizontal resolution, in radians, of the raster or other elevation sample
from which elevations are drawn. (To compute radians from a distance, divide the distance
by the radius of the globe, ensuring that both the distance and the radius are in the
same units.)buffer - an array in which to place the returned elevations. The array must be pre-allocated and
contain at least as many elements as the list of locations.
Double.MAX_VALUE if individual elevations cannot be
determined for any of the locations.#setMissingValueSentinel(Double)public long getEstimatedMissingDataSize(Sector sector, double resolution)
Sector and resolution. Note
that the target resolution must be provided in radian latitude per data sample - which is the resolution in meter
divided by the globe radius.
getEstimatedMissingDataSize in interface BulkRetrievablesector - the Sector to estimate.resolution - the target resolution provided in radian latitude per texel.
public double[] getExtremeElevations(Angle latitude, Angle longitude)
ElevationModel
getExtremeElevations in interface ElevationModellatitude - the latitude of the location in question.longitude - the longitude of the location in question.
double array indicating the minimum and maximum elevations at the specified
location, respectively. These values are the global minimum and maximum if the local minimum and maximum
values are currently unknown.public double[] getExtremeElevations(Sector sector)
ElevationModel
getExtremeElevations in interface ElevationModelsector - the sector in question.
double array indicating the sector's minimum and maximum elevations,
respectively. These elements are the global minimum and maximum if the local minimum and maximum values
are currently unknown.protected BufferWrapper getExtremes()
protected int getExtremesLevel()
public LevelSet getLevels()
protected Map<TileKey,BasicElevationModel.ElevationTile> getLevelZeroTiles()
public double getMaxElevation()
ElevationModel
getMaxElevation in interface ElevationModelprotected MemoryCache getMemoryCache()
public double getMinElevation()
ElevationModel
getMinElevation in interface ElevationModelprotected static AVList getParamsFromDocument(Element domElement, AVList params)
public String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface RestorablegetRestorableState in class AbstractElevationModelprotected Level getTargetLevel(Sector sector, double targetSize)
protected BasicElevationModel.ElevationTile getTileFromMemory(TileKey tileKey)
public Tile[][] getTilesInSector(Sector sector, int levelNumber)
public double getUnmappedElevation(Angle latitude, Angle longitude)
ElevationModel
getUnmappedElevation in interface ElevationModellatitude - the latitude of the location for which to return the elevation.longitude - the longitude of the location for which to return the elevation.
protected void initializeResources(AVList params)
protected void initPropertiesFromCapabilities(Capabilities caps, AVList params)
protected void initPropertiesFromService(AVList params)
public int intersects(Sector sector)
ElevationModel
intersects in interface ElevationModelsector - the sector in question.
protected boolean loadElevations(BasicElevationModel.ElevationTile tile, URL url) throws IOException
IOExceptionpublic void loadExtremeElevations(String extremesFileName)
protected double lookupElevation(double latRadians,
double lonRadians,
BasicElevationModel.ElevationTile tile)
public BulkRetrievalThread makeLocal(Sector sector, double resolution)
BulkRetrievalThread that will try to download all elevation tiles for a given Sector
and resolution. Note that the target resolution must be provided in radian latitude per texel - which is the
resolution in meter divided by the globe radius.
makeLocal in interface BulkRetrievablesector - the Sector to download tiles for.resolution - the target resolution provided in radian latitude per texel.
BulkRetrievalThread that executes the retrieval.protected boolean needsConfigurationFile(FileStore fileStore, String fileName, AVList params, boolean removeIfExpired)
protected BufferWrapper readElevations(URL url) throws IOException
IOExceptionprotected void requestTile(TileKey key)
protected static AVList restorableStateToParams(String stateInXml)
public void restoreState(String stateInXml)
Restorable
restoreState in interface RestorablerestoreState in class AbstractElevationModelstateInXml - an XML document string describing an object's state.protected static void restoreStateForParams(RestorableSupport rs, RestorableSupport.StateObject context, AVList params)
public void setByteOrder(String byteOrder)
public void setDetailHint(double hint)
public void setExpiryTime(long expiryTime)
setExpiryTime in interface ElevationModelsetExpiryTime in class AbstractElevationModelexpiryTime - the expiry time of any cached data, expressed as a number of milliseconds beyond the epoch. The
default expiry time is zero.for a description of milliseconds beyond the epoch.protected static void setFallbacks(AVList params)
public void setPixelType(String pixelType)
protected void writeConfigurationFile()
protected void writeConfigurationParams(AVList params)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||