|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.avlist.AVListImpl
gov.nasa.worldwind.WWObjectImpl
gov.nasa.worldwind.terrain.AbstractElevationModel
gov.nasa.worldwind.terrain.BasicElevationModel
public class BasicElevationModel
| 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(org.w3c.dom.Document dom,
AVList params)
|
|
BasicElevationModel(org.w3c.dom.Element domElement,
AVList params)
|
|
BasicElevationModel(java.lang.String restorableStateInXml)
|
|
| Method Summary | |
|---|---|
protected void |
addTileToCache(BasicElevationModel.ElevationTile tile,
BufferWrapper elevations)
|
protected boolean |
areElevationsInMemory(TileKey key)
|
protected void |
checkResources()
|
protected double[] |
computeExtremeElevations(Sector sector)
|
boolean |
contains(Angle latitude,
Angle longitude)
Indicates whether a specified location is within the elevation model's domain. |
protected static java.nio.ByteBuffer |
convertImageToElevations(java.nio.ByteBuffer buffer,
java.lang.String contentType)
|
protected org.w3c.dom.Document |
createConfigurationDocument(AVList params)
|
protected MemoryCache |
createMemoryCache(java.lang.String cacheName)
|
protected BasicElevationModel.ElevationTile |
createTile(TileKey key)
|
protected void |
doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
|
protected void |
doGetRestorableStateForAVPair(java.lang.String key,
java.lang.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,
java.lang.String fileName,
AVList params)
|
java.nio.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. |
java.lang.String |
getElevationDataByteOrder()
|
java.lang.String |
getElevationDataPixelType()
|
protected BasicElevationModel.Elevations |
getElevations(Sector sector,
LevelSet levelSet,
int targetLevelNumber)
|
double |
getElevations(Sector sector,
java.util.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 bytes of the elevations not in the World Wind file cache for the given sector and resolution. |
long |
getEstimatedMissingDataSize(Sector sector,
double resolution,
FileStore fileStore)
Get the estimated size in bytes of the elevations not in a specified file store 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()
|
protected MemoryCache |
getExtremesLookupCache()
Returns the memory cache used to cache extreme elevation computations, initializing the cache if it doesn't yet exist. |
LevelSet |
getLevels()
|
protected java.util.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(org.w3c.dom.Element domElement,
AVList params)
|
java.lang.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)
|
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 |
isFileExpired(Tile tile,
java.net.URL fileURL,
FileStore fileStore)
|
protected boolean |
loadElevations(BasicElevationModel.ElevationTile tile,
java.net.URL url)
|
void |
loadExtremeElevations(java.lang.String extremesFileName)
|
protected double |
lookupElevation(double latRadians,
double lonRadians,
BasicElevationModel.ElevationTile tile)
|
BulkRetrievalThread |
makeLocal(Sector sector,
double resolution)
Start a new BulkRetrievalThread that downloads all elevations for a given sector and resolution to the
current World Wind file cache, without downloading imagery already in the cache. |
BulkRetrievalThread |
makeLocal(Sector sector,
double resolution,
FileStore fileStore)
Start a new BulkRetrievalThread that downloads all elevations for a given sector and resolution to a
specified file store, without downloading imagery already in the file store. |
protected boolean |
needsConfigurationFile(FileStore fileStore,
java.lang.String fileName,
AVList params,
boolean removeIfExpired)
|
protected BufferWrapper |
readElevations(java.net.URL url)
|
protected void |
requestTile(TileKey key)
|
protected static AVList |
restorableStateToParams(java.lang.String stateInXml)
|
void |
restoreState(java.lang.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(java.lang.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(java.lang.String pixelType)
|
protected void |
writeConfigurationFile(FileStore fileStore)
|
protected void |
writeConfigurationParams(AVList params,
FileStore fileStore)
|
| Methods inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel |
|---|
composeElevations, getDataFileStore, getElevation, getExpiryTime, getMissingDataReplacement, getMissingDataSignal, getName, isNetworkRetrievalEnabled, setDataFileStore, 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(org.w3c.dom.Document dom,
AVList params)
public BasicElevationModel(org.w3c.dom.Element domElement,
AVList params)
public BasicElevationModel(java.lang.String restorableStateInXml)
| Method Detail |
|---|
protected void addTileToCache(BasicElevationModel.ElevationTile tile,
BufferWrapper elevations)
protected boolean areElevationsInMemory(TileKey key)
protected void checkResources()
protected double[] computeExtremeElevations(Sector sector)
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 java.nio.ByteBuffer convertImageToElevations(java.nio.ByteBuffer buffer,
java.lang.String contentType)
throws java.io.IOException
java.io.IOExceptionprotected org.w3c.dom.Document createConfigurationDocument(AVList params)
protected MemoryCache createMemoryCache(java.lang.String cacheName)
protected BasicElevationModel.ElevationTile createTile(TileKey key)
protected void doGetRestorableState(RestorableSupport rs,
RestorableSupport.StateObject context)
protected void doGetRestorableStateForAVPair(java.lang.String key,
java.lang.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,
java.lang.String fileName,
AVList params)
public java.nio.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 java.lang.String getElevationDataByteOrder()
public java.lang.String getElevationDataPixelType()
protected BasicElevationModel.Elevations getElevations(Sector sector,
LevelSet levelSet,
int targetLevelNumber)
public double getElevations(Sector sector,
java.util.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)
getEstimatedMissingDataSize in interface BulkRetrievablesector - the sector to estimate.resolution - the target resolution, provided in radians of latitude per texel.
java.lang.IllegalArgumentException - if the sector is null or the resolution is less than zero.
public long getEstimatedMissingDataSize(Sector sector,
double resolution,
FileStore fileStore)
getEstimatedMissingDataSize in interface BulkRetrievablesector - the sector to estimate.resolution - the target resolution, provided in radians of latitude per texel.fileStore - the file store to examine. If null the current World Wind file cache is used.
java.lang.IllegalArgumentException - if the sector is null or the resolution is less than zero.
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()
protected MemoryCache getExtremesLookupCache()
public LevelSet getLevels()
protected java.util.Map<TileKey,BasicElevationModel.ElevationTile> getLevelZeroTiles()
public double getMaxElevation()
ElevationModel
getMaxElevation in interface ElevationModelprotected MemoryCache getMemoryCache()
public double getMinElevation()
ElevationModel
getMinElevation in interface ElevationModel
protected static AVList getParamsFromDocument(org.w3c.dom.Element domElement,
AVList params)
public java.lang.String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface RestorablegetRestorableState in class AbstractElevationModel
protected Level getTargetLevel(Sector sector,
double targetSize)
protected BasicElevationModel.ElevationTile getTileFromMemory(TileKey tileKey)
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 isFileExpired(Tile tile,
java.net.URL fileURL,
FileStore fileStore)
protected boolean loadElevations(BasicElevationModel.ElevationTile tile,
java.net.URL url)
throws java.io.IOException
java.io.IOExceptionpublic void loadExtremeElevations(java.lang.String extremesFileName)
protected double lookupElevation(double latRadians,
double lonRadians,
BasicElevationModel.ElevationTile tile)
public BulkRetrievalThread makeLocal(Sector sector,
double resolution)
BulkRetrievalThread that downloads all elevations for a given sector and resolution to the
current World Wind file cache, without downloading imagery already in the cache.
This method creates and starts a thread to perform the download. A reference to the thread is returned. To create
a downloader that has not been started, construct a BasicElevationModelBulkDownloader.
Note that the target resolution must be provided in radians of latitude per texel, which is the resolution in
meters divided by the globe radius.
makeLocal in interface BulkRetrievablesector - the sector to download data for.resolution - the target resolution, provided in radians of latitude per texel.
BulkRetrievalThread executing the retrieval.
java.lang.IllegalArgumentException - if the sector is null or the resolution is less than zero.BasicElevationModelBulkDownloader
public BulkRetrievalThread makeLocal(Sector sector,
double resolution,
FileStore fileStore)
BulkRetrievalThread that downloads all elevations for a given sector and resolution to a
specified file store, without downloading imagery already in the file store.
This method creates and starts a thread to perform the download. A reference to the thread is returned. To create
a downloader that has not been started, construct a BasicElevationModelBulkDownloader.
Note that the target resolution must be provided in radians of latitude per texel, which is the resolution in
meters divided by the globe radius.
makeLocal in interface BulkRetrievablesector - the sector to download data for.resolution - the target resolution, provided in radians of latitude per texel.fileStore - the file store in which to place the downloaded elevations. If null the current World Wind file
cache is used.
BulkRetrievalThread executing the retrieval.
java.lang.IllegalArgumentException - if the sector is null or the resolution is less than zero.BasicElevationModelBulkDownloader
protected boolean needsConfigurationFile(FileStore fileStore,
java.lang.String fileName,
AVList params,
boolean removeIfExpired)
protected BufferWrapper readElevations(java.net.URL url)
throws java.io.IOException
java.io.IOExceptionprotected void requestTile(TileKey key)
protected static AVList restorableStateToParams(java.lang.String stateInXml)
public void restoreState(java.lang.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(java.lang.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(java.lang.String pixelType)
protected void writeConfigurationFile(FileStore fileStore)
protected void writeConfigurationParams(AVList params,
FileStore fileStore)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||