QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Protected Attributes | Friends | List of all members
QgsAlignRaster::RasterInfo Struct Reference

Utility class for gathering information about rasters. More...

#include <qgsalignraster.h>

Public Member Functions

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

Protected Attributes

int mBandCnt
 number of raster's bands More...
 
QString mCrsWkt
 CRS stored in WKT format. More...
 
GDALDatasetH mDataset
 handle to open GDAL dataset More...
 
double mGeoTransform [6]
 geotransform coefficients More...
 
int mXSize
 raster grid size More...
 
int mYSize
 

Friends

class QgsAlignRaster
 

Detailed Description

Utility class for gathering information about rasters.

Definition at line 45 of file qgsalignraster.h.

Constructor & Destructor Documentation

◆ RasterInfo()

QgsAlignRaster::RasterInfo::RasterInfo ( const QString layerpath)

Construct raster info with a path to a raster file.

Definition at line 557 of file qgsalignraster.cpp.

◆ ~RasterInfo()

QgsAlignRaster::RasterInfo::~RasterInfo ( )

Definition at line 577 of file qgsalignraster.cpp.

Member Function Documentation

◆ bandCount()

int QgsAlignRaster::RasterInfo::bandCount ( ) const
inline

Return number of raster bands in the file.

Definition at line 60 of file qgsalignraster.h.

◆ cellSize()

QSizeF QgsAlignRaster::RasterInfo::cellSize ( ) const

Return cell size in map units.

Definition at line 583 of file qgsalignraster.cpp.

◆ crs()

QString QgsAlignRaster::RasterInfo::crs ( ) const
inline

Return CRS in WKT format.

Definition at line 56 of file qgsalignraster.h.

◆ dump()

void QgsAlignRaster::RasterInfo::dump ( ) const

write contents of the object to standard error stream - for debugging

Definition at line 604 of file qgsalignraster.cpp.

◆ extent()

QgsRectangle QgsAlignRaster::RasterInfo::extent ( ) const

Return extent of the raster.

Definition at line 594 of file qgsalignraster.cpp.

◆ gridOffset()

QPointF QgsAlignRaster::RasterInfo::gridOffset ( ) const

Return grid offset.

Definition at line 588 of file qgsalignraster.cpp.

◆ identify()

double QgsAlignRaster::RasterInfo::identify ( double  mx,
double  my 
)

Get raster value at the given coordinates (from the first band)

Definition at line 619 of file qgsalignraster.cpp.

◆ isValid()

bool QgsAlignRaster::RasterInfo::isValid ( ) const
inline

Check whether the given path is a valid raster.

Definition at line 53 of file qgsalignraster.h.

◆ origin()

QPointF QgsAlignRaster::RasterInfo::origin ( ) const

Return origin of the raster.

Definition at line 599 of file qgsalignraster.cpp.

◆ rasterSize()

QSize QgsAlignRaster::RasterInfo::rasterSize ( ) const
inline

Return size of the raster grid in pixels.

Definition at line 58 of file qgsalignraster.h.

Friends And Related Function Documentation

◆ QgsAlignRaster

friend class QgsAlignRaster
friend

Definition at line 93 of file qgsalignraster.h.

Member Data Documentation

◆ mBandCnt

int QgsAlignRaster::RasterInfo::mBandCnt
protected

number of raster's bands

Definition at line 86 of file qgsalignraster.h.

◆ mCrsWkt

QString QgsAlignRaster::RasterInfo::mCrsWkt
protected

CRS stored in WKT format.

Definition at line 80 of file qgsalignraster.h.

◆ mDataset

GDALDatasetH QgsAlignRaster::RasterInfo::mDataset
protected

handle to open GDAL dataset

Definition at line 78 of file qgsalignraster.h.

◆ mGeoTransform

double QgsAlignRaster::RasterInfo::mGeoTransform[6]
protected

geotransform coefficients

Definition at line 82 of file qgsalignraster.h.

◆ mXSize

int QgsAlignRaster::RasterInfo::mXSize
protected

raster grid size

Definition at line 84 of file qgsalignraster.h.

◆ mYSize

int QgsAlignRaster::RasterInfo::mYSize
protected

Definition at line 84 of file qgsalignraster.h.


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