public class EllipsoidTerrainProvider extends TerrainProvider
Constructor and Description |
---|
EllipsoidTerrainProvider()
Initializes a new instance with the
Shape (get / set ) and
FixedFrame (get / set ) from the EarthCentralBody
in the CentralBodiesFacet in the current CalculationContext . |
EllipsoidTerrainProvider(Ellipsoid shape,
ReferenceFrame shapeFixedFrame)
Initializes a new instance with the specified shape and fixed frame.
|
Modifier and Type | Method and Description |
---|---|
FirstPartialsOfHeight |
getFirstPartials(double longitude,
double latitude)
|
double |
getHeight(double longitude,
double latitude)
Gets the interpolated height of the terrain at the specified longitude and latitude using the
default interpolator for this terrain provider.
|
double |
getHeightNativeUnits(double longitude,
double latitude)
Gets the interpolated height of the terrain at the specified longitude and latitude.
|
SecondPartialsOfHeight |
getSecondPartials(double longitude,
double latitude)
|
void |
preloadExtent(CartographicExtent extent)
Loads the terrain data in a given
CartographicExtent into the terrain cache. |
void |
unloadExtent(CartographicExtent extent)
Unloads the cached terrain data for a given
CartographicExtent . |
getBoundingExtent, getBoundingExtentNativeUnits, getGradient, getHeightReference, getHeightRelativeToShape, getHessian, getLocalMinimumSampleSpacing, getMinimumSampleSpacing, getNativeToMeters, getNormal, getRadiansToNative, getReferenceSurface, getShape, getShapeFixedFrame, inGlobalBounds, setBoundingExtent, setBoundingExtentNativeUnits, setHeightReference, setNativeToMeters, setRadiansToNative, setReferenceSurface, setShape, setShapeFixedFrame
public EllipsoidTerrainProvider()
Shape
(get
/ set
) and
FixedFrame
(get
/ set
) from the EarthCentralBody
in the CentralBodiesFacet
in the current CalculationContext
.public EllipsoidTerrainProvider(Ellipsoid shape, ReferenceFrame shapeFixedFrame)
shape
- The ellipsoid shape in which the longitude, latitude, and altitude are specified.shapeFixedFrame
- The reference frame fixed to the ellipsoid.public double getHeight(double longitude, double latitude)
If HeightReference
(get
/ set
) is HeightReference.REFERENCE_SURFACE
,
the returned height is relative to the surface specified by the ReferenceSurface
(get
/ set
) property.
If HeightReference
(get
/ set
) is HeightReference.SHAPE
,
the returned height is relative to the ellipsoid specified by the Shape
(get
/ set
) property.
This method may return Double.NaN
if the requested longitude and latitude are outside
the terrain region or if the terrain data indicates that the height is unknown.
It is safe to call this method from multiple threads simultaneously.
getHeight
in class TerrainProvider
longitude
- The longitude, in radians.
Requesting a height for a longitude less than -π or greater than π will always return Double.NaN
.latitude
- The latitude, in radians.
Requesting a height for a latitude less than -π/2 or greater than π/2 will always return Double.NaN
.Double.NaN
if the height is not available at the requested longitude and latitude.public double getHeightNativeUnits(double longitude, double latitude)
If HeightReference
(get
/ set
) is HeightReference.REFERENCE_SURFACE
,
the returned height is relative to the surface specified by the ReferenceSurface
(get
/ set
) property.
If HeightReference
(get
/ set
) is HeightReference.SHAPE
,
the returned height is relative to the ellipsoid specified by the Shape
(get
/ set
) property.
This method may return Double.NaN
if the requested longitude and latitude are outside
the terrain region or if the terrain data indicates that the height is unknown.
It is safe to call this method from multiple threads simultaneously.
getHeightNativeUnits
in class TerrainProvider
longitude
- The longitude, in the native units of the terrain provider.latitude
- The latitude, in the native units of the terrain provider.Double.NaN
if the height is not available at the requested longitude and latitude.public void preloadExtent(CartographicExtent extent)
CartographicExtent
into the terrain cache.
This method does not return until the terrain data is fully loaded. All terrain data within the extent is loaded into
memory, even if doing so would exceed the TerrainCacheGroup's
MaximumSize
(get
/ set
). Furthermore, the loaded terrain data is locked
in memory (meaning it will not be unloaded) until the user calls EllipsoidTerrainProvider.unloadExtent(agi.foundation.coordinates.CartographicExtent)
.
This method is safe to call from any thread.preloadExtent
in class TerrainProvider
extent
- The extent for which to load terrain data, in radians.ArgumentNullException
- Thrown when extent
is null
.public void unloadExtent(CartographicExtent extent)
CartographicExtent
.
This method unloads all cached regions where any part of the region falls within
the extent. It does not return until the regions have been unloaded. However,
if a region within the extent is being used in another thread while this method
is executing, the region may be reloaded immediately after this method unloads it.
This method is safe to call from any thread.unloadExtent
in class TerrainProvider
extent
- The CartographicExtent
for which to unload terrain, in radians.ArgumentNullException
- Thrown when extent
is null
.@Nonnull public FirstPartialsOfHeight getFirstPartials(double longitude, double latitude)
Shape
(get
/ set
).getFirstPartials
in class TerrainProvider
longitude
- The longitude, in radians.
Requesting derivatives for a longitude less than -π or greater than π will always return Double.NaN
.latitude
- The latitude, in radians.
Requesting derivatives for a latitude less than -π/2 or greater than π/2 will always return Double.NaN
.FirstPartialsOfHeight
with respect to longitude and latitude,
in meters of height per radian.@Nonnull public SecondPartialsOfHeight getSecondPartials(double longitude, double latitude)
Shape
(get
/ set
).getSecondPartials
in class TerrainProvider
longitude
- The longitude, in radians.
Requesting derivatives for a longitude less than -π or greater than π will always return Double.NaN
.latitude
- The latitude, in radians.
Requesting derivatives for a latitude less than -π/2 or greater than π/2 will always return Double.NaN
.SecondPartialsOfHeight
with respect to longitude and latitude,
in meters of height per radian squared.