ds.rst.edit() or Raster.edit()#
- RasterBase.edit(*, crs=<object object>, transform=<object object>, nodata=<object object>, tags=<object object>, area_or_point=<object object>)[source]#
Return a copy with selected raster metadata edited together.
This groups the core metadata changes provided by gdal_edit without changing pixel values or the source raster. Omitting an argument retains its existing value, while explicitly passing
Noneclears CRS, nodata, tags or pixel interpretation.- Parameters:
crs (
CRS|int|str|None|object) – New coordinate reference system.transform (
Affine|tuple[float,...] |object) – New affine geotransform.nodata (
int|float|None|object) – New nodata metadata value without changing pixel values or their mask.tags (
dict[str,Any] |None|object) – Metadata tags to update, orNoneto clear all tags.area_or_point (
Literal['Area','Point'] |None|object) – New pixel interpretation without shifting the geotransform.
- Return type:
RasterType- Returns:
Raster copy with updated metadata.