Rasterfile clipping error: Cannot compute bounding box of cutline

After trying around with everything I finally figured out how to solve the problem. It had indeed to do with the CRS. Right click "Set CRS" was not enough here. I had to perform (on the raster) Raster->Projections->Warp, then set the desired CRS again and save as Geotiff.

The mask layer (vector layer) had to be saved again with the same CRS. After that the process worked.

Still weird, because I know, that in 1.7.4 it did work immediately. I can remember pretty well, because that was when I started with QGIS.


After removing the '.prj' files from the directory with my shapefiles, my batch file ran without a hitch. Solution discovered at OSGeo's Using gdalwarp to effectively trim an image.


Since you don't want to do a clip by extend I assume you want to extract the raster cells that are inside each geometric figure of the vector file.

One way to do this, is to add a field in the vector file with the value 1, export it to raster format with the same resolution as the raster you have. This will create you a raster with value 1 for the geometric figures and 0 for the background. Finally you just need to multiply both rasters.

Tags:

Raster

Clip

Qgis