I'm facing a strange problem. I created a mosaic of two landsat scenes which contains values from ~ -5 to ~11 (Biomass estimation). As my study area is much smaller then the mosaiced Landsat8 scenes, I want to cut the mosaic with a given forest mask shapefile (containing approx 10000 polygons). I just did it with QGIS 2.8 Wien like in several tutorials explained (Raster -> Extraction -> Clipper). It then starts calculating for quite some time, and in the end I get a raster but with values which doesn't make any sense (they are now ranged from 3.4e30 - 3.8e28) and the resulting raster is completely white. I tried it several times with slightly different options, but still the same.

I just have no idea, why it changes any values. Anyone got an idea, how to simply cut the raster into my shapefile without it changing the values?

I uploaded the raster and the shapefile here, if you want to try it yourself.




  • checked the spatial extend, they are both in the same datum (UTM 34N, WGS 84).
  • I also checked the data histogram of the clipped ( but basically white) raster, and tried reclassifying it, but still doesn't make sense (and why would it change the data values of the pixels in the first place?)
  • 2
    What software are you using to achieve this?
    – MaryBeth
    Commented Jul 22, 2016 at 19:57
  • Does it really changes values or just the data type? Have you tried modifying min/max value for display? Commented Jul 23, 2016 at 0:54
  • It only means that spatial extents do not match
    – FelixIP
    Commented Jul 23, 2016 at 4:40
  • Welcome to gis.stackexchange! Please edit the title of your question to include enough information for future visitors to be able to find this thread when looking for the same problem.
    – underdark
    Commented Jul 24, 2016 at 20:51

2 Answers 2


Your clipping fails because the raster has the odd nodata value of -3.4E+38. Unfortunately, you can not enter that value in the input form.

So I suggest to use gdalwarp to change the nodata value and clip as well, but to the extent of the polygon layer:

 gdalwarp -overwrite -s_srs EPSG:32634 -dstnodata -10 -q -cutline forest_2013_extent.shp -crop_to_cutline -dstalpha -of GTiff RasterMerged43.tif rasttemp.tif

which is reasonable fast and gets this output:

enter image description here

Values are between -1.37 and 9.505, so nothing is broken.

You can create the extent layer with Vector -> Research Tools -> Polygon from layer extent.


I had a similar problem and I solved it as follows.

  1. I noticed that some of my polygons were fake polygons, that is they came from a previous cut of polygons and some of them were only lines, not closed up polygons.

  2. I manually selected only the real polygons (closed up polygons) because some of the fake ones were unnoticeable because they where "lines" overlapped with the perimeter of the real polygons.

  3. I inverted the selection and then eliminate all the "fake polygons".

  4. Then I cut my raster with the "real polygon" layer and I got the correct values for my raster.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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