gdal_raster_create¶
- HSTB.kluster.gdal_helpers.gdal_raster_create(output_raster, data, geo_transform, crs, nodatavalue=1000000.0, bandnames=(), driver='GTiff', transpose=True, creation_options=[])¶
Build a gdal product from the provided data using the provided driver. Can perform a Transpose on the provided data to align with GDAL/Image standards.
- Parameters
output_raster (
str) – path to the output file we are writing heredata (
list) – list of numpy ndarrays, generally something like [2dim depth, 2dim uncertainty]. Can just be [2dim depth]geo_transform (
list) – gdal geotransform for the raster [x origin, x pixel size, x rotation, y origin, y rotation, -y pixel size]crs (
Union[CRS,int]) – pyproj CRS or an integer epsg codenodatavalue (
float) – nodatavalue to use in rasterbandnames (
tuple) – list of string identifiers, should match the length of the data provideddriver (
str) – name of gdal driver to get, ex: ‘GTiff’transpose (
bool) – if True, performs Transpose on the provided datacreation_options (
list) – list of gdal creation options, mostly used for BAG metadata