|
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.RequestTask
|
protected static class |
BasicElevationModel.Tile
|
| Field Summary |
|---|
| 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.Tile tile,
BufferWrapper elevations)
|
protected boolean |
areElevationsInMemory(TileKey key)
|
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 MemoryCache |
createMemoryCache(String cacheName)
|
protected BasicElevationModel.Tile |
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(BasicElevationModel.Tile tile)
|
protected void |
downloadElevations(BasicElevationModel.Tile tile,
BasicElevationModel.DownloadPostProcessor postProcessor)
|
ByteBuffer |
generateExtremeElevations(int levelNumber)
|
double |
getBestResolution(Sector sector)
Indicates the best resolution attainable for a specified sector. |
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.Tile> |
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.Tile |
getTileFromMemory(TileKey tileKey)
|
BasicElevationModel.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. |
int |
intersects(Sector sector)
Indicates whether the elevation model corresponds to a specified sector. |
protected boolean |
loadElevations(BasicElevationModel.Tile tile,
URL url)
|
void |
loadExtremeElevations(String extremesFileName)
|
protected double |
lookupElevation(double latRadians,
double lonRadians,
BasicElevationModel.Tile tile)
|
BulkDownloadThread |
makeLocal(Sector sector,
double resolution)
Start a new BulkDownloadThread that will try to download all elevation tiles for a given Sector
and resolution. |
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)
|
protected static void |
setFallbacks(AVList params)
|
void |
setPixelType(String pixelType)
|
| Methods inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel |
|---|
getElevation, 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.retrieve.Retrievable |
|---|
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 |
| 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.Tile tile,
BufferWrapper elevations)
protected boolean areElevationsInMemory(TileKey key)
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
IOException
public int countTilesInSector(Sector sector,
int levelNumber)
protected MemoryCache createMemoryCache(String cacheName)
protected BasicElevationModel.Tile 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(BasicElevationModel.Tile tile)
protected void downloadElevations(BasicElevationModel.Tile tile,
BasicElevationModel.DownloadPostProcessor postProcessor)
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.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 Retrievablesector - 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.Tile> getLevelZeroTiles()
public double getMaxElevation()
ElevationModel
getMaxElevation in interface ElevationModelprotected MemoryCache getMemoryCache()
public double getMinElevation()
ElevationModel
getMinElevation in interface ElevationModel
protected static AVList getParamsFromDocument(Element domElement,
AVList params)
public String getRestorableState()
RestorablerestoreState and passing the XML document.
getRestorableState in interface RestorablegetRestorableState in class AbstractElevationModel
protected Level getTargetLevel(Sector sector,
double targetSize)
protected BasicElevationModel.Tile getTileFromMemory(TileKey tileKey)
public BasicElevationModel.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.
public int intersects(Sector sector)
ElevationModel
intersects in interface ElevationModelsector - the sector in question.
protected boolean loadElevations(BasicElevationModel.Tile tile,
URL url)
throws IOException
IOExceptionpublic void loadExtremeElevations(String extremesFileName)
protected double lookupElevation(double latRadians,
double lonRadians,
BasicElevationModel.Tile tile)
public BulkDownloadThread makeLocal(Sector sector,
double resolution)
BulkDownloadThread 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 Retrievablesector - the Sector to download tiles for.resolution - the target resolution provided in radian latitude per texel.
BulkDownloadThread that executes the retrieval.
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)
protected static void setFallbacks(AVList params)
public void setPixelType(String pixelType)
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||