SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
mesh::DTMSampler Class Reference

#include <dtmsampler.h>

Collaboration diagram for mesh::DTMSampler:

Public Member Functions

 DTMSampler ()
 
 ~DTMSampler ()
 
 DTMSampler (const DTMSampler &)=delete
 
DTMSampleroperator= (const DTMSampler &)=delete
 
bool open (const QString &path, int band=1)
 Open a raster by path. Returns false on failure (set errorMsg).
 
void close ()
 
bool isOpen () const noexcept
 
double sample (double x, double y) const
 Sample one coordinate (in raster CRS). Returns NaN on out-of-bounds or NoData.
 
QVector< doublesampleBulk (const QVector< QPointF > &pts) const
 Sample many points; result.size() == pts.size().
 
double pixelSize () const
 Mean absolute pixel size in raster-CRS units (0 when closed). Callers resampling along a path use this to pick a step that follows the DEM without oversampling it.
 
QString crsWkt () const
 Native CRS WKT of the raster (empty if the file had none).
 
QString errorMsg () const
 Last error message produced by open or sample.
 

Constructor & Destructor Documentation

◆ DTMSampler() [1/2]

mesh::DTMSampler::DTMSampler ( )

◆ ~DTMSampler()

mesh::DTMSampler::~DTMSampler ( )
Here is the call graph for this function:

◆ DTMSampler() [2/2]

mesh::DTMSampler::DTMSampler ( const DTMSampler )
delete

Member Function Documentation

◆ close()

void mesh::DTMSampler::close ( )
Here is the caller graph for this function:

◆ crsWkt()

QString mesh::DTMSampler::crsWkt ( ) const

Native CRS WKT of the raster (empty if the file had none).

Here is the caller graph for this function:

◆ errorMsg()

QString mesh::DTMSampler::errorMsg ( ) const
inline

Last error message produced by open or sample.

◆ isOpen()

bool mesh::DTMSampler::isOpen ( ) const
noexcept

◆ open()

bool mesh::DTMSampler::open ( const QString &  path,
int  band = 1 
)

Open a raster by path. Returns false on failure (set errorMsg).

Parameters
pathGDAL-readable path (GeoTIFF, ASC, NetCDF, etc.).
band1-based band index (most DTMs are single-band; default 1).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

DTMSampler & mesh::DTMSampler::operator= ( const DTMSampler )
delete

◆ pixelSize()

double mesh::DTMSampler::pixelSize ( ) const

Mean absolute pixel size in raster-CRS units (0 when closed). Callers resampling along a path use this to pick a step that follows the DEM without oversampling it.

Here is the caller graph for this function:

◆ sample()

double mesh::DTMSampler::sample ( double  x,
double  y 
) const

Sample one coordinate (in raster CRS). Returns NaN on out-of-bounds or NoData.

Here is the caller graph for this function:

◆ sampleBulk()

QVector< double > mesh::DTMSampler::sampleBulk ( const QVector< QPointF > &  pts) const

Sample many points; result.size() == pts.size().

Here is the call graph for this function:
Here is the caller graph for this function:

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