Feature request #11442

Processing: Please add an option to rasterize overwriting an exixting raster

Added by Paolo Cavallini over 9 years ago. Updated about 9 years ago.

Status:Closed
Priority:Normal
Assignee:Victor Olaya
Category:Processing/GDAL
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:19718

Description

The old behaviour of GDAL is still useful, sometimes (e.g. to have a background of 0s instead of NULLs). Please add that option (instead of creating a new raster from scratch).

History

#1 Updated by Giovanni Manghi over 9 years ago

  • Status changed from Open to Feedback

what parameter do you refer?

Usage: gdal_rasterize [-b band]* [-i] [-at]
[-burn value]* | [-a attribute_name] [-3d]
[-l layername]* [-where expression] [-sql select_statement]
[-of format] [-a_srs srs_def] [-co "NAME=VALUE"]*
[-a_nodata value] [-init value]*
[-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height]
[-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
CInt16/CInt32/CFloat32/CFloat64}] [-q]
<src_datasource> <dst_filename>

#2 Updated by Paolo Cavallini over 9 years ago

dst_filename:

The GDAL supported output file. Must support update mode access. Before GDAL 1.8.0, gdal_rasterize could not create new output files.

I mean, it would be useful to specify an existing raster to burn the values on, so the user will be sure of the background value, extent and resolution.

#3 Updated by Giovanni Manghi over 9 years ago

Paolo Cavallini wrote:

dst_filename:

The GDAL supported output file. Must support update mode access. Before GDAL 1.8.0, gdal_rasterize could not create new output files.

I mean, it would be useful to specify an existing raster to burn the values on, so the user will be sure of the background value, extent and resolution.

can you please post a gdal_rasterize command that shows as this works? just to have a working example to work on.

#4 Updated by Paolo Cavallini over 9 years ago

  • Status changed from Feedback to Open

No special option: from the command line, if you provide a file name, it will be used as a basis, if not it will be created

#6 Updated by Giovanni Manghi about 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

Also available in: Atom PDF