Friday 17 June 2016

qgis - Clipping raster with an irregular shape?


How can I clip my DEM raster in a irregular shape in QGIS?


I have used the clipping tool but it only does rectangles I believe.



Answer



Within QGIS you can use the 'clipper' tool in Raster > Extraction > Clipper. Alternatively, you can use the gdalwarp command line utility if you have this installed (this is what QGIS will run on your behalf).


gdalwarp -of GTiff -cutline shapefile.shp -crop_to_cutline input.tiff output.tiff

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...