Class GeoTIFFIO

Class Documentation

class GeoTIFFIO

class providing and encapsulating GDAL GeoTIFF I/O functions

Author

Niklas Dettmer ndettmer@uos.de

Public Functions

GeoTIFFIO(std::string filename, int cols, int rows, int bands)
Parameters:
  • filename – filename of output GeoTIFF file

  • cols – number of columns / width of the image

  • rows – number of rows / length of the image

  • bands – number of bands

GeoTIFFIO(std::string filename)
Parameters:

filename

GeoTIFFIO(GDALDataset *dataset)
Parameters:

dataset

int writeBand(cv::Mat *mat, int band)

Writing given band into open GeoTIFF file.

Parameters:
  • mat – cv::Mat containing the band data

  • band – number of band to be written

Returns:

standard C++ return value

int getRasterWidth()
Returns:

width of dataset in number of pixels

int getRasterHeight()
Returns:

height of dataset in number of pixels

int getNumBands()
Returns:

number of bands of dataset

void getMaxMinOfBand(float *values, int band_index)
Parameters:

band_index – index of the band of interest

Returns:

min and max value of chosen band

void getGeoTransform(double *geoTransform)
Parameters:

geoTransform – contains values for geotransforming the TIFFS data

double getNoDataValue(int band_index)
Parameters:

band_index – index of the band of interest

Returns:

no data value of chosen band

cv::Mat *readBand(int band_index)
Parameters:

band_index – index of the band to be read

Returns:

indexed band of the dataset as cv::Mat *

~GeoTIFFIO()