Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My goal is to clip a raster with a polygon in QGIS 1.8. Based on an article I read, this should be a pretty straightforward task. However, the output appears to be empty. The raster produced is the same size as the original. The metadata for the output raster shows that it is the same extent as the original, with the same pixel size, same number of bands, but there is no information about the content of the bands.

I've attached a screenshot of the parameters I am using for the clip. I have done this two other ways, all with similar results. The first is with the NoData value set to 32767, which is the same as the NoData value of the input raster. The second is with 'Create an output alpha band' checked, which creates a 2-band raster that is otherwise identical to the output described above.

I would very much appreciate it if someone could critique my parameters, and suggest what I might be doing wrong.

My OS, if that is important, is Ubuntu 12.04, and I'm using the KDE desktop.

enter image description here

share|improve this question
Just checking. When you clip a raster layer with a vector layer both layers must have the same native CRS. Both layers have to align properly on the screen with on-the-fly disabled. N. – nhopton Jan 22 '13 at 9:49
The raster layer, the polygon layer, the project, and all the empty output layers all have the same CRS, which is EPSG:3760. – L_Holcombe Jan 22 '13 at 10:13
Do they still align if you switch on-the-fly OFF? Furthermore, assigning a CRS within Qgis is not enough, the Tif must have the CRS information incorporated (GeotiFF), because gdalwarp is invoked as an external command – AndreJ Jan 22 '13 at 10:22
Okay, this is messed up. They line up with onthefly off, but they misalign with on-the-fly on. The metadata for the hillshade layer says it has units in meters, but the actual units are feet. Which is weird, because I actually looked at both files in ArcGIS 9.2 last night, and they both had identical spatial references. – L_Holcombe Jan 22 '13 at 19:42
One of you (Andre Joost or nhopton) can go ahead and answer this question, so I can accept it, and get you some points. This question has led to an even more challenging question, which bears more consideration than a long string of comments. – L_Holcombe Jan 22 '13 at 23:33
up vote 1 down vote accepted

Make sure that vector and raster layer have the same CRS, and their extent should have reasonable and matching values.

Both should be saved to the file system, because layers build in memory (like ASCII and CSV files) don't have a CRS saved to disk. Even if you specified it under Settings -> Options, CRS Tab, you should not be prompted for a CRS if loading them to the project.

Turn On-the-fly-reprojection OFF and see if the two layers align. If not, the external GDAL clipper function will not work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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