4

I need to add different boolean rasters of the distribution of some species, since we need to obtain a single file that shows the locations where there are more than one species occurring.

To do that, I rasterized all of the shapefiles showing the distribution and then reclassified them to obtain the boolean rasters.

The problem is, now that I'm trying to add them all together using rastercalc, there are files with different extends even though I clipped them with the same shapefile (the final single file -the one that I obtain by adding all of the booleans, is all cut and incomplete with null values)...

How can I change them to the same extent in order to obtain the complete map?

the first picture is the shapefile I used to clip the other shapefiles (this is the polygon of the state I live in).

The second picture shows an example of one boolean images with the raster of the shape I clipped them (the state's shape)

The third one shows the last raster with all of the boolean rasters together... If you compare images 2 and 3, you will see there is lots of missing data

enter image description here enter image description here enter image description here

  • You may want to say which software you use... – markusN Sep 18 '12 at 18:14
  • 2
    Probably a very silly question, but did all of the shapefiles that you rasterized have the same CRS? That is, did the shapefiles all align properly in QGIS with on-the-fly CRS transformation turned off? N. – nhopton Sep 18 '12 at 19:34
  • 1
    @markusN the question is about QGIS. – underdark Sep 18 '12 at 21:07
  • @nhopton... yes, they do ! – Nadia Sep 19 '12 at 0:03
  • sorry @markusN, I thought I mentioned it... but yes... i'm using Qgis – Nadia Sep 19 '12 at 0:04
0

why don't you try to merge the rasters with the raster calculator and THEN to clip the final image using your shapefile? If you get the same result, it means that the problem is probably with nodata values, so you should try to remove nodata values (i.e. using 0 for pixel instead of the nodata value) and then repeat the procedure.

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.