|
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.CompoundElevationModel
public class CompoundElevationModel
| Field Summary | |
|---|---|
protected CopyOnWriteArrayList<ElevationModel> |
elevationModels
|
| Fields inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel |
|---|
dataFileStore, enabled, expiryTime, missingDataFlag, missingDataValue, networkRetrievalEnabled |
| Constructor Summary | |
|---|---|
CompoundElevationModel()
|
|
| Method Summary | |
|---|---|
void |
addElevationModel(ElevationModel em)
|
void |
addElevationModel(int index,
ElevationModel em)
|
void |
composeElevations(Sector sector,
List<? extends LatLon> latlons,
int tileWidth,
double[] buffer)
Determines the elevations at specified locations within a specified Sector. |
boolean |
contains(Angle latitude,
Angle longitude)
Indicates whether a specified location is within the elevation model's domain. |
boolean |
containsElevationModel(ElevationModel em)
Returns true if this CompoundElevationModel contains the specified ElevationModel, and false otherwise. |
void |
dispose()
Disposes of any internal resources allocated by the object. |
protected double |
doGetElevations(Sector sector,
List<? extends LatLon> latlons,
double targetResolution,
double[] buffer,
boolean mapMissingData)
|
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. |
List<ElevationModel> |
getElevationModels()
|
double |
getElevations(Sector sector,
List<? extends LatLon> latlons,
double targetResolution,
double[] buffer)
Returns the elevations of a collection of locations. |
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. |
double |
getLocalDataAvailability(Sector sector,
Double targetResolution)
Returns the proportion of this elevation model's data that is local -- in the computer's data cache or installed data filestore -- for a specified sector and target resolution. |
double |
getMaxElevation()
Returns the maximum elevation contained in the elevation model. |
double |
getMinElevation()
Returns the minimum elevation contained in the elevation model. |
double |
getUnmappedElevation(Angle latitude,
Angle longitude)
Returns the elevation at a specified location, but without replacing missing data with the elevation model's missing data replacement value. |
double |
getUnmappedElevations(Sector sector,
List<? extends LatLon> latlons,
double targetResolution,
double[] buffer)
Returns the elevations of a collection of locations. |
int |
intersects(Sector sector)
Indicates whether the elevation model covers a specified sector either partially or fully. |
void |
removeElevationModel(ElevationModel em)
|
void |
removeElevationModel(int index)
|
void |
setElevationModel(int index,
ElevationModel em)
|
void |
setExpiryTime(long expiryTime)
Recursively specifies the time of the most recent dataset update for this compound model, and for each elevation model contained within this compound model. |
void |
setNetworkRetrievalEnabled(boolean networkRetrievalEnabled)
Controls whether the elevation model is allowed to retrieve data from the network. |
| Methods inherited from class gov.nasa.worldwind.terrain.AbstractElevationModel |
|---|
createElevationModelConfigElements, getDataFileStore, getElevation, getElevationModelConfigParams, getExpiryTime, getMissingDataReplacement, getMissingDataSignal, getName, getRestorableState, isElevationModelConfigDocument, isEnabled, isNetworkRetrievalEnabled, isTransparentValue, restoreState, setDataFileStore, setEnabled, setMissingDataReplacement, setMissingDataSignal, setName, toString |
| Methods inherited from class gov.nasa.worldwind.WWObjectImpl |
|---|
onMessage, propertyChange |
| Methods inherited from class gov.nasa.worldwind.avlist.AVListImpl |
|---|
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, 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.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 |
| Methods inherited from interface gov.nasa.worldwind.event.MessageListener |
|---|
onMessage |
| Field Detail |
|---|
protected CopyOnWriteArrayList<ElevationModel> elevationModels
| Constructor Detail |
|---|
public CompoundElevationModel()
| Method Detail |
|---|
public void addElevationModel(ElevationModel em)
public void addElevationModel(int index,
ElevationModel em)
public void composeElevations(Sector sector,
List<? extends LatLon> latlons,
int tileWidth,
double[] buffer)
throws Exception
ElevationModelSector.
composeElevations in interface ElevationModelcomposeElevations in class AbstractElevationModelsector - the sector containing the locations.latlons - the locations for which to return elevations.tileWidth - the number of locations that comprise one row in the latlons argument.buffer - a buffer in which to put the elevations. The buffer must have at least as many elements as the
number of specified locations.
Exception - if the method fails. Different elevation models may fail for different reasons.
IllegalArgumentException - if either the sector, list of locations or buffer is null, if the buffer size is
not at least as large as the location list, or the tile width is greater than
the locations list length or less than 1.
public boolean contains(Angle latitude,
Angle longitude)
ElevationModel
latitude - the latitude of the location in question.longitude - the longitude of the location in question.
public boolean containsElevationModel(ElevationModel em)
em - the ElevationModel to test.
IllegalArgumentException - if the ElevationModel is null.public void dispose()
Disposable
dispose in interface Disposabledispose in class AbstractElevationModel
protected double doGetElevations(Sector sector,
List<? extends LatLon> latlons,
double targetResolution,
double[] buffer,
boolean mapMissingData)
public double getBestResolution(Sector sector)
ElevationModel
sector - 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 List<ElevationModel> getElevationModels()
public double getElevations(Sector sector,
List<? extends LatLon> latlons,
double targetResolution,
double[] buffer)
sector - the sector in question.latlons - the locations to return elevations for. If a location is null, the output buffer for that
location is not modified.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 all of the locations.ElevationModel.setMissingDataSignal(double)
public double[] getExtremeElevations(Angle latitude,
Angle longitude)
ElevationModel
latitude - the latitude of the location in question.longitude - the longitude of the location in question.
double array indicating, respectively, the minimum and maximum elevations at
the specified location. These values are the global minimum and maximum if the local minimum and maximum
values are currently unknown.public double[] getExtremeElevations(Sector sector)
ElevationModel
sector - the sector in question.
double array indicating, respectively, the sector's minimum and maximum
elevations. These elements are the global minimum and maximum if the local minimum and maximum values are
currently unknown.
public double getLocalDataAvailability(Sector sector,
Double targetResolution)
ElevationModel
getLocalDataAvailability in interface ElevationModelgetLocalDataAvailability in class AbstractElevationModelsector - the sector of interest.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.) Specify null to use this elevation model's best resolution.
public double getMaxElevation()
ElevationModel
public double getMinElevation()
ElevationModel
public double getUnmappedElevation(Angle latitude,
Angle longitude)
ElevationModel
latitude - the latitude of the location for which to return the elevation.longitude - the longitude of the location for which to return the elevation.
public double getUnmappedElevations(Sector sector,
List<? extends LatLon> latlons,
double targetResolution,
double[] buffer)
sector - the sector in question.latlons - the locations to return elevations for. If a location is null, the output buffer for that
location is not modified.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 all of the locations.ElevationModel.setMissingDataSignal(double)public int intersects(Sector sector)
ElevationModel
sector - the sector in question.
public void removeElevationModel(ElevationModel em)
public void removeElevationModel(int index)
public void setElevationModel(int index,
ElevationModel em)
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.for a description of milliseconds beyond the epoch.public void setNetworkRetrievalEnabled(boolean networkRetrievalEnabled)
ElevationModel
setNetworkRetrievalEnabled in interface ElevationModelsetNetworkRetrievalEnabled in class AbstractElevationModelnetworkRetrievalEnabled - true if network retrieval is allowed, else false.
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||