I need to overlay a geometry (Shapefile of some city in UK) over a raster (grids of entire UK Map) and extract cells/pixels from raster that intersect with points of geometry.
Current Implementation: I am able to extract the points using below functions:
Problem with above, is that it extracts all the points, including those points which just touch the raster during overlay.
I need to extract only those points/pixels which overlap above a certain % on the raster. i.e. I need to extract points based on % of intersection.
In essence , I need to replicate the functionality provided by extract function of R . Also more importantly , I need to replicate the weights option provided by extract function. https://www.rdocumentation.org/packages/raster/versions/2.6-7/topics/extract