Following is my raster file and mask shapefile


I use QGIS 1.8.0 to clip the raster with shapefile by GDAL tools, but after I run warp in GDAL tools it's just give me no data in the output GeoTiff.


I think the extent and projection of the Geotiff do not match. The extent is:

-10.0000000000000000,36.0000000000000000 : 19.0000000000000000,54.0000000000000000

which looks like degrees for the South Western part of Europe. But the projection is given as North Pole LAEA Europe, which has metres as units. So your raster is only a small spot in the northern ice region, far away from your clip vector data.

You have to run

gdalwarp -s_srs EPSG:4326 -t_srs EPSG:4326 M_0.tif M_1.tif

to change the projection without reprojecting the raster data. In second run I applied the Clipping. This is what I got:

Clipping with Pseudocolors

  • thanks for help! but my output tiff still wrong...i.imgur.com/96TIN9J.jpg – blueman010112 Jun 4 '13 at 3:33
  • can you insert the command line QGIS generates? It looked much better with me. – AndreJ Jun 4 '13 at 4:12
  • gdalwarp -s_srs EPSG:4326 -t_srs EPSG:4326 -dstnodata 0 -q -cutline C:\Users\alpha\Desktop\ppp\clip.dbf -dstalpha -of GTiff C:\Users\alpha\Desktop\ppp\M_0.tif C:/Users/alpha/Desktop/ppp/M_1 – blueman010112 Jun 4 '13 at 4:28
  • OK, I did it in 2 runs, and applied Pseudo colors and 0 as no-data-value manually. See my screenshot above. The Cutline should be the shp file, not the dbf, and crop_to_cutline is missing. This is my commandline: gdalwarp -s_srs EPSG:4326 -t_srs EPSG:4326 -dstnodata 0 -q -cutline D:/Download/clip.shp -crop_to_cutline -of GTiff D:/Download/M_0.tif D:/Download/M_5.tif – AndreJ Jun 4 '13 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.