def save_geotiff(self,filename, dtype=gdal.GDT_Float32, **kwargs):
"""
Save a GeoTIFF of the raster currently loaded.
Georeferenced and subset according to the current raster.
:params filename: the path and filename to save the file to.
:type filename: str
:params dtype: GDAL datatype, defaults to Float32.
:type dtype: int
:returns: 1 on success.
:rtype: int
"""
if self.r is None:
raise ValueError('There are no image data loaded. No file can be created.')
simple_write_geotiff(filename, self.r, self.trans,
wkt=self.srs.ExportToWkt(), dtype=dtype, **kwargs)
评论列表
文章目录