hydromt.DataArray.raster.reproject#
- DataArray.raster.reproject(dst_crs=None, dst_res=None, dst_transform=None, dst_width=None, dst_height=None, dst_nodata=None, method='nearest', align=False)#
Reproject a DataArray with geospatial coordinates, powered by
rasterio.warp.reproject()
.- Parameters:
dst_crs (int, dict, or str, optional) – Target CRS. Accepts EPSG codes (int or str); proj (str or dict) or wkt (str) “utm” is accepted and will return the centroid utm zone CRS
dst_res (tuple (x resolution, y resolution) or float, optional) – Target resolution, in units of target CRS.
dst_transform (affine.Affine(), optional) – Target affine transformation. Will be calculated if None.
dst_width (int, optional) – Output file size in pixels and lines. Cannot be used together with resolution (dst_res).
dst_height (int, optional) – Output file size in pixels and lines. Cannot be used together with resolution (dst_res).
dst_nodata (int or float, optional) – The nodata value used to initialize the destination; it will remain in all areas not covered by the reprojected source. If None, the source nodata value will be used.
method (str, optional) – See rasterio.warp.reproject for existing methods, by default nearest. Additionally “nearest_index” can be used for KDTree based downsampling.
align (boolean, optional) – If True, align target transform to resolution
- Returns:
da_reproject – A reprojected DataArray.
- Return type: