isce3 0.25.0
Loading...
Searching...
No Matches
isce3::geometry::DEMInterpolator Class Reference

Public Member Functions

 DEMInterpolator (float height=0.0, int epsg=4326)
 Constructor with custom reference height and bilinear interpolation.
 
 DEMInterpolator (float height, isce3::core::dataInterpMethod method, int epsg=4326)
 Constructor with custom reference height and custom interpolator method.
 
isce3::error::ErrorCode loadDEM (isce3::io::Raster &demRaster, double min_x, double max_x, double min_y, double max_y, const int dem_raster_band=1)
 Read in subset of data from a DEM with a supported projection.
 
void loadDEM (isce3::io::Raster &demRaster, const int dem_raster_band=1)
 Read in entire DEM with a supported projection.
 
void declare () const
 
void computeMinMaxMeanHeight (float &minValue, float &maxValue, float &meanValue)
 Compute min, max, and mean DEM height.
 
double interpolateLonLat (double lon, double lat) const
 Interpolate at a given longitude and latitude.
 
double interpolateXY (double x, double y) const
 Interpolate at native XY coordinates of DEM.
 
double xStart () const
 Get starting X coordinate.
 
void xStart (double xstart)
 Set starting X coordinate.
 
double yStart () const
 Get starting Y coordinate.
 
void yStart (double ystart)
 Set starting Y coordinate.
 
double deltaX () const
 Get X spacing.
 
void deltaX (double deltax)
 Set X spacing.
 
double deltaY () const
 Get Y spacing.
 
void deltaY (double deltay)
 Set Y spacing.
 
double midX () const
 Get mid X coordinate.
 
double midY () const
 Get mid Y coordinate.
 
cartesian_t midLonLat () const
 Get mid longitude and latitude.
 
bool haveRaster () const
 Flag indicating whether a DEM raster has been loaded.
 
double refHeight () const
 Get reference height of interpolator.
 
void refHeight (double h)
 Set reference height of interpolator.
 
bool haveStats () const
 Flag indicating if stats are already known.
 
float meanHeight () const
 Get mean height value.
 
float maxHeight () const
 Get max height value.
 
float minHeight () const
 Get min height value.
 
float * data ()
 Get pointer to underlying DEM data.
 
const float * data () const
 Get pointer to underlying DEM data.
 
size_t width () const
 Get width of DEM data used for interpolation.
 
void width (int width)
 Set width of DEM data used for interpolation.
 
size_t length () const
 Get length of DEM data used for interpolation.
 
void length (int length)
 Set length of DEM data used for interpolation.
 
int epsgCode () const
 Get EPSG code for input DEM.
 
void epsgCode (int epsgcode)
 Set EPSG code for input DEM.
 
isce3::core::ProjectionBaseproj () const
 Get Pointer to a ProjectionBase.
 
isce3::core::dataInterpMethod interpMethod () const
 Get interpolator method enum.
 
void interpMethod (isce3::core::dataInterpMethod interpMethod)
 Set interpolator method enum.
 

Member Function Documentation

◆ computeMinMaxMeanHeight()

void isce3::geometry::DEMInterpolator::computeMinMaxMeanHeight ( float & minValue,
float & maxValue,
float & meanValue )

Compute min, max, and mean DEM height.

Parameters
[out]minValueMinimum DEM height
[out]maxValueMaximum DEM height
[out]meanValueMean DEM height

This method will also set refHeight to meanValue so that this object is guaranteed to return a value h : minValue <= h <= maxValue even if the query point is out of bounds.

If stats have already been computed then no calculation is done.

◆ interpolateLonLat()

double isce3::geometry::DEMInterpolator::interpolateLonLat ( double lon,
double lat ) const

Interpolate at a given longitude and latitude.

Parameters
[in]lonLongitude of interpolation point.
[in]latLatitude of interpolation point.

Interpolate DEM at a given longitude and latitude

◆ interpolateXY()

double isce3::geometry::DEMInterpolator::interpolateXY ( double x,
double y ) const

Interpolate at native XY coordinates of DEM.

Parameters
[in]xX-coordinate of interpolation point.
[in]yY-coordinate of interpolation point.

Interpolate DEM at native coordinates

◆ loadDEM() [1/2]

void isce3::geometry::DEMInterpolator::loadDEM ( isce3::io::Raster & demRaster,
const int dem_raster_band = 1 )

Read in entire DEM with a supported projection.

Parameters
[in]dem_rasterDEM raster
[in]dem_raster_bandDEM raster band (starting from 1)
[in]demRasterinput DEM raster to subset

Loads the entire DEM

◆ loadDEM() [2/2]

isce3::error::ErrorCode isce3::geometry::DEMInterpolator::loadDEM ( isce3::io::Raster & demRaster,
double min_x,
double max_x,
double min_y,
double max_y,
const int dem_raster_band = 1 )

Read in subset of data from a DEM with a supported projection.

Parameters
[in]dem_rasterDEM raster
[in]minXMinimum X/easting position
[in]maxXMaximum X/easting position
[in]minYMinimum Y/northing position
[in]maxYMaximum Y/northing position
[in]dem_raster_bandDEM raster band (starting from 1)
[in]demRasterinput DEM raster to subset
[in]min_xEasting/Longitude of western edge of bounding box
[in]max_xEasting/Longitude of eastern edge of bounding box
[in]min_yNorthing/Latitude of southern edge of bounding box
[in]max_yNorthing/Latitude of northern edge of bounding box
Returns
Error code

Loads a DEM subset given the extents of a bounding box


The documentation for this class was generated from the following files:

Generated for ISCE3.0 by doxygen 1.13.2.