[R-sig-Geo] Extract from raster produces NA when polygon has holes

Brooks E.G.E. Emma.Brooks at soton.ac.uk
Tue Dec 16 16:07:33 CET 2014


Dear all

I am using extract to 'extract' the values from raster to polygons, which is working fine until I noticed a couple of values are coming up as NA. On closer inspection these polygons have holes; it is a lake layer so these are representing islands. I don't know why expressly the extract function doesn't like holes - is there any way round this, or do I need to manually remove these? (I don't want to remove them as ideally I don't want to extract the data which belongs to the islands rather than the lakes).

I am thinking this may be obvious for people in the know, but if it needs clarifying, or dummy data, apologies and please let me know.

Many thanks
Emma

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list