smash.tools.raster_handler.gdal_get_geotransform#

smash.tools.raster_handler.gdal_get_geotransform(dataset)[source]#

Getting the GeoTransform coeficients from a gdal object

Parameters:
datasetgdal object from gdal.Open()
Returns:
geotransformPython dictionnary
# ~ A GeoTransform consists in a set of 6 coefficients:
# ~ GT(0) x-coordinate of the upper-left corner of the upper-left pixel.
# ~ GT(1) w-e pixel resolution / pixel width.
# ~ GT(2) row rotation (typically zero).
# ~ GT(3) y-coordinate of the upper-left corner of the upper-left pixel.
# ~ GT(4) column rotation (typically zero).
# ~ GT(5) n-s pixel resolution / pixel height (negative value for a north-up image).

Examples

dataset = gdal_raster_open(filename) geotransform=gdal_get_geotransform(dataset)