12 #include <pyre/journal.h>
15 #include <isce3/core/forward.h>
16 #include <isce3/core/Constants.h>
17 #include <isce3/core/Interpolator.h>
19 #include <isce3/io/forward.h>
33 _interpMethod{isce3::core::BILINEAR_METHOD} {}
42 _interpMethod{isce3::core::BILINEAR_METHOD} {}
53 _interpMethod{method} {}
60 double minX,
double maxX,
61 double minY,
double maxY);
71 pyre::journal::info_t &info);
79 double xStart()
const {
return _xstart; }
81 void xStart(
double xstart) { _xstart = xstart; }
84 double yStart()
const {
return _ystart; }
86 void yStart(
double ystart) { _ystart = ystart; }
89 double deltaX()
const {
return _deltax; }
91 void deltaX(
double deltax) { _deltax = deltax; }
94 double deltaY()
const {
return _deltay; }
96 void deltaY(
double deltay) { _deltay = deltay; }
99 double midX()
const {
return _xstart + 0.5*
width()*_deltax; }
101 double midY()
const {
return _ystart + 0.5*
length()*_deltay; }
126 inline size_t width()
const {
return (_haveRaster ? _dem.
width() : _width); }
131 inline size_t length()
const {
return (_haveRaster ? _dem.
length() : _length); }
138 inline void epsgCode(
int epsgcode) { _epsgcode = epsgcode; }
142 return _interpMethod;
166 double _xstart, _ystart, _deltax, _deltay;
void width(int width)
Set width of DEM data used for interpolation.
Definition: DEMInterpolator.h:128
void computeHeightStats(float &maxValue, float &meanValue, pyre::journal::info_t &info)
Compute max and mean DEM height.
Definition: DEMInterpolator.cpp:167
dataInterpMethod
Enumeration type to indicate interpolation method.
Definition: Constants.h:23
const float * data() const
Get pointer to underlying DEM data.
Definition: DEMInterpolator.h:123
Definition: DEMInterpolator.h:22
void interpMethod(isce3::core::dataInterpMethod interpMethod)
Set interpolator method enum.
Definition: DEMInterpolator.h:145
double interpolateXY(double x, double y) const
Interpolate at native XY coordinates of DEM.
Definition: DEMInterpolator.cpp:235
void deltaX(double deltax)
Set X spacing.
Definition: DEMInterpolator.h:91
void refHeight(double h)
Set reference height of interpolator.
Definition: DEMInterpolator.h:111
void loadDEM(isce3::io::Raster &demRaster, double minX, double maxX, double minY, double maxY)
Read in subset of data from a DEM with a supported projection.
Definition: DEMInterpolator.cpp:32
isce3::core::dataInterpMethod interpMethod() const
Get interpolator method enum.
Definition: DEMInterpolator.h:141
double midX() const
Get mid X coordinate.
Definition: DEMInterpolator.h:99
double deltaX() const
Get X spacing.
Definition: DEMInterpolator.h:89
size_t length() const
Get length of DEM data used for interpolation.
Definition: DEMInterpolator.h:131
void deltaY(double deltay)
Set Y spacing.
Definition: DEMInterpolator.h:96
double maxHeight() const
Get max height value.
Definition: DEMInterpolator.h:117
cell_t * data()
Access to data buffer.
Definition: Matrix.icc:219
double midY() const
Get mid Y coordinate.
Definition: DEMInterpolator.h:101
float * data()
Get pointer to underlying DEM data.
Definition: DEMInterpolator.h:120
size_t length() const
Get matrix length.
Definition: Matrix.icc:357
double deltaY() const
Get Y spacing.
Definition: DEMInterpolator.h:94
bool haveRaster() const
Flag indicating whether a DEM raster has been loaded.
Definition: DEMInterpolator.h:106
cartesian_t midLonLat() const
Get mid longitude and latitude.
Definition: DEMInterpolator.cpp:198
Abstract base class for individual projections.
Definition: Projections.h:22
~DEMInterpolator()
Destructor.
Definition: DEMInterpolator.cpp:14
size_t width() const
Get width of DEM data used for interpolation.
Definition: DEMInterpolator.h:126
void yStart(double ystart)
Set starting Y coordinate.
Definition: DEMInterpolator.h:86
DEMInterpolator(float height, isce3::core::dataInterpMethod method, int epsg=4326)
Constructor with custom reference height and custom interpolator method.
Definition: DEMInterpolator.h:45
double meanHeight() const
Get mean height value.
Definition: DEMInterpolator.h:114
double xStart() const
Get starting X coordinate.
Definition: DEMInterpolator.h:79
void epsgCode(int epsgcode)
Set EPSG code for input DEM.
Definition: DEMInterpolator.h:138
void length(int length)
Set length of DEM data used for interpolation.
Definition: DEMInterpolator.h:133
void xStart(double xstart)
Set starting X coordinate.
Definition: DEMInterpolator.h:81
DEMInterpolator(float height, int epsg=4326)
Constructor with custom reference height and bilinear interpolation.
Definition: DEMInterpolator.h:36
int epsgCode() const
Get EPSG code for input DEM.
Definition: DEMInterpolator.h:136
size_t width() const
Get matrix width.
Definition: Matrix.icc:349
DEMInterpolator()
Default constructor with reference height of 0, bilinear interpolation.
Definition: DEMInterpolator.h:28
double yStart() const
Get starting Y coordinate.
Definition: DEMInterpolator.h:84
double refHeight() const
Get reference height of interpolator.
Definition: DEMInterpolator.h:109
Data structure meant to handle Raster I/O operations.
Definition: Raster.h:34
double interpolateLonLat(double lon, double lat) const
Interpolate at a given longitude and latitude.
Definition: DEMInterpolator.cpp:211