QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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.
 
 RasterInfo (const RasterInfo &rh)=delete
 
int bandCount () const
 Returns the number of raster bands in the file.
 
QSizeF cellSize () const
 Returns the cell size in map units.
 
QString crs () const
 Returns the CRS in WKT format.
 
void dump () const
 Write contents of the object to standard error stream - for debugging.
 
QgsRectangle extent () const
 Returns the extent of the raster.
 
QPointF gridOffset () const
 Returns the grid offset.
 
double identify (double mx, double my)
 Gets raster value at the given coordinates (from the first band)
 
bool isValid () const
 Check whether the given path is a valid raster.
 
RasterInfooperator= (const RasterInfo &rh)=delete
 
QPointF origin () const
 Returns the origin of the raster.
 
QSize rasterSize () const
 Returns the size of the raster grid in pixels.
 

Protected Attributes

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

Friends

class QgsAlignRaster
 

Detailed Description

Utility class for gathering information about rasters.

Definition at line 54 of file qgsalignraster.h.

Constructor & Destructor Documentation

◆ RasterInfo() [1/2]

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

Construct raster info with a path to a raster file.

Definition at line 547 of file qgsalignraster.cpp.

◆ RasterInfo() [2/2]

QgsAlignRaster::RasterInfo::RasterInfo ( const RasterInfo rh)
delete

Member Function Documentation

◆ bandCount()

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

Returns the number of raster bands in the file.

Definition at line 71 of file qgsalignraster.h.

◆ cellSize()

QSizeF QgsAlignRaster::RasterInfo::cellSize ( ) const

Returns the cell size in map units.

Definition at line 564 of file qgsalignraster.cpp.

◆ crs()

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

Returns the CRS in WKT format.

Definition at line 67 of file qgsalignraster.h.

◆ dump()

void QgsAlignRaster::RasterInfo::dump ( ) const

Write contents of the object to standard error stream - for debugging.

Definition at line 585 of file qgsalignraster.cpp.

◆ extent()

QgsRectangle QgsAlignRaster::RasterInfo::extent ( ) const

Returns the extent of the raster.

Definition at line 575 of file qgsalignraster.cpp.

◆ gridOffset()

QPointF QgsAlignRaster::RasterInfo::gridOffset ( ) const

Returns the grid offset.

Definition at line 569 of file qgsalignraster.cpp.

◆ identify()

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

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

Definition at line 600 of file qgsalignraster.cpp.

◆ isValid()

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

Check whether the given path is a valid raster.

Definition at line 64 of file qgsalignraster.h.

◆ operator=()

RasterInfo & QgsAlignRaster::RasterInfo::operator= ( const RasterInfo rh)
delete

◆ origin()

QPointF QgsAlignRaster::RasterInfo::origin ( ) const

Returns the origin of the raster.

Definition at line 580 of file qgsalignraster.cpp.

◆ rasterSize()

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

Returns the size of the raster grid in pixels.

Definition at line 69 of file qgsalignraster.h.

Friends And Related Symbol Documentation

◆ QgsAlignRaster

friend class QgsAlignRaster
friend

Definition at line 106 of file qgsalignraster.h.

Member Data Documentation

◆ mBandCnt

int QgsAlignRaster::RasterInfo::mBandCnt = 0
protected

number of raster's bands

Definition at line 99 of file qgsalignraster.h.

◆ mCrsWkt

QString QgsAlignRaster::RasterInfo::mCrsWkt
protected

CRS stored in WKT format.

Definition at line 91 of file qgsalignraster.h.

◆ mDataset

gdal::dataset_unique_ptr QgsAlignRaster::RasterInfo::mDataset
protected

handle to open GDAL dataset

Definition at line 89 of file qgsalignraster.h.

◆ mGeoTransform

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

geotransform coefficients

Definition at line 93 of file qgsalignraster.h.

◆ mXSize

int QgsAlignRaster::RasterInfo::mXSize = 0
protected

raster grid size X

Definition at line 95 of file qgsalignraster.h.

◆ mYSize

int QgsAlignRaster::RasterInfo::mYSize = 0
protected

raster grid size Y

Definition at line 97 of file qgsalignraster.h.


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