gdal.rasterize

Burn vector geometries into a raster.

  • Kind: standard
  • Network: no
  • Wraps: gdal_rasterize

Inputs🔗

NameTypeDescription
vectorsfile (GeoJSON)Vector file whose geometries will be rasterized.
referencefile (GeoTIFF)Reference raster whose extent, CRS, and pixel grid define the output.
burn_valuenumberConstant value to burn into covered pixels (default 1).
attributestringOptional attribute name; when set, pixel values come from this attribute instead of burn_value.
all_touchedbooleanBurn pixels touched by the geometry rather than centroid coverage. Default false.

Outputs🔗

NameTypeDescription
rasterfile (GeoTIFF)Rasterized output aligned to the reference raster.