from_gdal¶
- s100py.s102.utils.from_gdal(input_raster, output_file, metadata=None)¶
Fills or creates an
S102Filefrom the given arguments.- Parameters
input_raster – Either a path to a raster file that GDAL can open or a gdal.Dataset object.
output_file – Can be an S102File object or anything the h5py.File would accept, e.g. string file path, tempfile obect, BytesIO etc.
metadata (
Optional[dict]) –A dictionary of metadata describing the grids passed in. All the metadata used in
from_from_arrays_with_metadatacan be specified and would override the values that would have been populated based on the GDAL data.horizontalDatumReference, horizontalDatumValue, origin, res will be determined from GDAL if not otherwise specified.
- Return type