2

I am working with BIOCLIM temperature/precipitation layers and I have noticed that when I clip the global raster down to a specific region, something happens and the raster value at a specific point no longer matches that on the global raster. Here is my working procedure:

  1. Download bioclim layers from http://www.worldclim.org/current. Load e.g. bio_1 layer into QGIS

  2. clip using Raster>Extraction>Clipper. Clip with "By Extent" mode and set the extent to e.g. -50,-50 : 50,50

  3. Using the identify features tool, click on region of the map and compare values for both layers. For some points, the raster values are the same, others are slightly off.

Why does this happen?

My first thought was that the vector I am clipping with is dissecting raster cells and thereby shifting the new layer slightly. I have tried to change the "Snapping Option..." (Settings>Snapping option...) to all layers, snap to vertex and set the sensitivity to different number of pixels (0.5 to 50) but nothing works.

What am I doing wrong?

  • It seems that there is some resampling going on. Try calculating the row, column and number of rows and columns you need from the raster and use GDAL_Translate -srcwin xoff yoff xsize ysize (or from GUI mentioned wiki.tuflow.com/index.php?title=QGIS_Export_Raster_to_asc) note the srcwin box for rectangular clipping. – Michael Stimson Jun 26 '15 at 2:17
  • Hi Michael. thanks for your feedback. This is what i thought initially too, but even when i try to prevent resampling etc. this still happens. I have since realized that if i use the "point sampling tool" plugin to get raster values at a specific point on the map, the values are the same for the original and the clipped raster. I only get different values when i use the "identify features" tool. I am still not sure why this happens, but at least I am more comfortable that downstream processing using the clipped raster might not be affected after all. – christoph Jun 30 '15 at 11:25
  • Hi @christoph did you come up with an explanation to this problem in your study? – Ayda Aktas Mar 4 '17 at 23:05

Your Answer

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

Browse other questions tagged or ask your own question.