[R-sig-Geo] Extract() fails to return data for boundary admin units

Bacou, Melanie mel at mbacou.com
Tue Oct 18 15:35:12 CEST 2016


Hi,
I'm summarizing biophysical rasters (UDEL precipitation and temperature) 
across administrative units for countries in Africa using (pseudo code):

raster::extract(udel, admin, fun=mean, na.rm=T, small=T)

Out of the 756 units I need data for, extract() fails to return means 
for a few coastal units (in red on the maps below) even though the 
rasters show data at these locations.

Is there a particular reason why this might happen? Shall I look for 
possible geometry errors in my source shapefiles, or could there be 
another reason?

Maps here:
https://dl.dropboxusercontent.com/u/30925475/eclgcdmhapfplaml.png
https://dl.dropboxusercontent.com/u/30925475/lmkgmdoohpmhdcjg.png

Thanks for any tip. --Mel.



More information about the R-sig-Geo mailing list