Feature request #19794

Add capability for specifying additional options with the gdal:contour processing algorithm

Added by Geoff Kimbell about 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:Giovanni Manghi
Category:Processing/GDAL
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:Yes Copied to github as #:27619

Description

Would it be possible to add the OPTIONS parameter to the list available with gdal:contour in QGIS 3?
For example, it would be good to be able to specify the additional option '-fl <contour1> <contour2> etc' to allow generation of contours at user-defined levels.
It looks like this requires quite modest modification to processing\algs\gdal\contour.py. Including OPTIONS in the class attributes and adding 'self.addParameter(...' to initAlgorithm and 'arguments.append(options)' to getConsoleCommands seems to work.

Thanks,

Geoff Kimbell

0001-Update-contour.py.patch Magnifier (1.8 KB) Geoff Kimbell, 2018-09-07 08:16 PM

History

#1 Updated by Giovanni Manghi about 6 years ago

  • Assignee set to Giovanni Manghi

Feel free to submit a patch.

#2 Updated by Geoff Kimbell about 6 years ago

Thanks Giovanni - patch file attached. Not sure if this is the best way of adding this functionality though...

Cheers,

Geoff

#3 Updated by Giovanni Manghi about 6 years ago

Geoff Kimbell wrote:

Thanks Giovanni - patch file attached. Not sure if this is the best way of adding this functionality though...

Cheers,

Geoff

Thanks! would you mind send the patch as a Pull Request in the QGIS GitHub repository?

#4 Updated by Geoff Kimbell about 6 years ago

OK - I've submitted the request. Hope I did it right (first timer!)

#5 Updated by Nyall Dawson about 6 years ago

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

Also available in: Atom PDF