public class BathymetryFilterElevationModel extends AbstractElevationModel
Modifier and Type | Field and Description |
---|---|
protected ElevationModel |
sourceModel |
protected double |
threshold |
dataFileStore, enabled, expiryTime, missingDataFlag, missingDataValue, networkRetrievalEnabled
Constructor and Description |
---|
BathymetryFilterElevationModel(ElevationModel source)
Constructs an elevation model that filters the elevations from a specified elevation model.
|
Modifier and Type | Method and Description |
---|---|
protected double |
clampElevation(double elevation)
Called to clamp a source elevation to this elevation model's threshold.
|
boolean |
contains(Angle latitude,
Angle longitude)
Indicates whether a specified location is within the elevation model's domain.
|
void |
dispose()
Disposes of any internal resources allocated by the object.
|
double |
getBestResolution(Sector sector)
Indicates the best resolution attainable for a specified sector.
|
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.
|
ElevationModel |
getSourceModel()
Returns the source elevation model.
|
double |
getThreshold()
Returns the threshold value.
|
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.
|
Object |
getValue(String key)
Returns the value for a specified key.
|
int |
intersects(Sector sector)
Indicates whether the elevation model covers a specified sector either partially or fully.
|
boolean |
isExtremesCachingEnabled()
Indicates whether extreme value caching is enabled.
|
void |
setExtremesCachingEnabled(boolean enabled)
Indicates whether extreme values of sectors should be cached as they're computed.
|
void |
setThreshold(double threshold)
Sets the value of the threshold.
|
composeElevations, createElevationModelConfigElements, getBestResolutions, getDataFileStore, getDetailHint, getElevation, getElevationModelConfigParams, getElevations, getExpiryTime, getMissingDataReplacement, getMissingDataSignal, getName, getRestorableState, getUnmappedElevations, getUnmappedLocalSourceElevation, isElevationModelConfigDocument, isEnabled, isNetworkRetrievalEnabled, isTransparentValue, restoreState, setDataFileStore, setEnabled, setExpiryTime, setMissingDataReplacement, setMissingDataSignal, setName, setNetworkRetrievalEnabled, toString
onMessage, propertyChange
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValue, setValues
propertyChange
onMessage
protected ElevationModel sourceModel
protected double threshold
public BathymetryFilterElevationModel(ElevationModel source)
source
- the elevation model to filter.protected double clampElevation(double elevation)
elevation
- the elevation to check and map.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 void dispose()
Disposable
dispose
in interface Disposable
dispose
in class AbstractElevationModel
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 getElevations(Sector sector, List<? extends LatLon> latlons, double targetResolution, double[] buffer)
ElevationModel
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 ElevationModel
getLocalDataAvailability
in class AbstractElevationModel
sector
- 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 ElevationModel getSourceModel()
public double getThreshold()
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)
ElevationModel
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 Object getValue(String key)
AVList
getValue
in interface AVList
getValue
in class AVListImpl
key
- the attribute name. May not be null
.null
.public int intersects(Sector sector)
ElevationModel
sector
- the sector in question.public boolean isExtremesCachingEnabled()
ElevationModel
ElevationModel.setExtremesCachingEnabled(boolean)
public void setExtremesCachingEnabled(boolean enabled)
ElevationModel
enabled
- true if extreme value caching should be performed.public void setThreshold(double threshold)
threshold
- the desired threshold. Elevations less than this value are set to this value prior to being
return by any method returning one or more elevations.