I want to clip a raster by extent in QGIS with the python console. Here is the description given in the documentation. You have to use the following input parameter:
- Input layer
- Nodata value (no_data)
- Clipping extent (projwin)
- Additional creation parameter (extra)
- output
The syntax is:
processing.runalg('gdalogr:cliprsterbyextent', input, no_data, projwin, extra, output)
I use the following data:
input = "C:/Users/....../inputraster.tif"
no_data= , , [I leave it empty]
projwin = 4278848, 3020676, 4297792, 3024646 [without " "]
extra = , , [I leave it empty]
output = "C:/Users/....../outputraster.asc"
I used these given examples in several variations, but I alway get a SyntaxError: invalid syntax.