geo-registry

Reproject raster

Resamples a raster from its coordinate reference system into another.

Pitfall. Categorical rasters (land cover, classes) must use nearest or mode; other methods invent class values.
About this operation
Also called Project Raster, Warp, Warp (reproject), gdalwarp
Group raster/crs
Checks crs.reprojected, raster.resampling, raster.nodata
Pitfalls 1 listed above
Columbus tool raster_op · reproject
Notes Not stated
Status active
Broader Not stated
Narrower Not stated
Related

Parameters

Name Type Required Default Values Note
crs crs yes Not stated Not stated Not stated
resampling enum no Not stated nearest, bilinear, cubic, average, mode Not stated
resolution number no Not stated Not stated Output cell size in the target CRS units.

Inputs and outputs

Direction Name Type Geometry Note
Input raster raster Not stated Not stated
Output output raster Not stated Not stated

In each engine

Engine Tool Parameters Differences
gdal gdal raster reproject
  • crs → output-crs
  • resampling → resampling
  • resolution → resolution
  • raster → input
  • output → output
None noted
postgis-raster st_transform
  • crs → srid : An SRID integer from spatial_ref_sys.
  • resampling → algorithm : nearest = NearestNeighbour; bilinear = Bilinear; cubic = Cubic
  • resolution → scalexy
  • raster → rast
None noted
qgis gdal:warpreproject
  • crs → TARGET_CRS
  • resampling → RESAMPLING : nearest = 0; bilinear = 1; cubic = 2; average = 5; mode = 6
  • resolution → TARGET_RESOLUTION
  • raster → INPUT
  • output → OUTPUT
None noted
rasterio rasterio.warp.reproject
  • crs → dst_crs
  • resampling → resampling : nearest = 0; bilinear = 1; cubic = 2; average = 5; mode = 6. A rasterio.enums.Resampling member; the numbers are its values.
  • resolution → dst_resolution
  • raster → source
  • output → destination
  • Works on arrays; the caller passes the source transform and CRS (src_transform, src_crs) and writes the result.
rioxarray rioxarray.raster_array.RasterArray.reproject
  • crs → dst_crs
  • resampling → resampling : nearest = 0; bilinear = 1; cubic = 2; average = 5; mode = 6. A rasterio.enums.Resampling member; the numbers are its values.
  • resolution → resolution
  • Called through the .rio accessor of a DataArray (da.rio.reproject).
terra terra::project
  • crs → y
  • resampling → method : nearest = near; bilinear = bilinear; cubic = cubic; average = average; mode = mode
  • resolution → res
  • raster → x
  • The same function reprojects SpatVectors (vector reproject); y can also be a raster to match its grid.