From @vankesteren
"If the base sf contains polygons, we can enrich using the polygon directly, no kernel needed, not even a bounding box would need to be supplied by the user. This makes things simple!
Steps would be:
query features using the bounding box of the sf dataset (sf::st_bbox(sf_data))
for each polygon, count the number of occurrences/overlaps with the requested features (sf::st_within() and friends)
return the count per row (this could also be a summary of a property of the feature, such as average building surface area, but that's for the future)
From @vankesteren "If the base
sf
contains polygons, we can enrich using the polygon directly, no kernel needed, not even a bounding box would need to be supplied by the user. This makes things simple! Steps would be:sf::st_bbox(sf_data)
)sf::st_within()
and friends)