hunzikp / velox

https://hunzikp.github.io/velox/
119 stars 23 forks source link

velox extract area weighted mean #35

Open amwootte opened 5 years ago

amwootte commented 5 years ago

Just found Velox earlier today and it looks promising for something I'm working on. This is more an idea than an issue for you. I need area weighted means for what I'm working on, wondering if you can drop one particular clause in this if and it would get you there to find all points that intersect or overlap, then I could get apply the area weights myself, but I need all the points that overlap or intersect my polygons. In theory, if you dropped the length(missing.idx)>0 from this if, would it then extract all the raster points where the box overlaps and where the centroid intersects? Just a thought.

if (small & length(missing.idx) > 0 & !isLine) {

  # Create box grid, boost geometries, intersect
  boostBoxGrid <- boost(.self, box = TRUE)
  missing.boost <- geomc.boost[missing.idx]
  intrs.ls <- bg_intersects(missing.boost, boostBoxGrid)

....