QgsAlignRaster::RasterInfo struct

Utility class for gathering information about rasters.

Constructors, destructors, conversion operators

RasterInfo(const QString& layerpath)
Construct raster info with a path to a raster file.

Public functions

auto bandCount() const -> int
Returns the number of raster bands in the file.
auto cellSize() const -> QSizeF
Returns the cell size in map units.
auto crs() const -> QString
Returns the CRS in WKT format.
void dump() const
Write contents of the object to standard error stream - for debugging.
auto extent() const -> QgsRectangle
Returns the extent of the raster.
auto gridOffset() const -> QPointF
Returns the grid offset.
auto identify(double mx, double my) -> double
Gets raster value at the given coordinates (from the first band)
auto isValid() const -> bool
Check whether the given path is a valid raster.
auto origin() const -> QPointF
Returns the origin of the raster.
auto rasterSize() const -> QSize
Returns the size of the raster grid in pixels.

Protected variables

int mBandCnt
number of raster's bands
QString mCrsWkt
CRS stored in WKT format.
gdal::dataset_unique_ptr mDataset
handle to open GDAL dataset
double mGeoTransform
geotransform coefficients
int mXSize
raster grid size X
int mYSize
raster grid size Y