sodascience / osmenrich

Enrich sf data with geographic features from OpenStreetMaps.
https://sodascience.github.io/osmenrich/
MIT License
15 stars 3 forks source link

Add polygons and multipolygons support #6

Open leonardovida opened 3 years ago

leonardovida commented 3 years ago

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:

  1. query features using the bounding box of the sf dataset (sf::st_bbox(sf_data))
  2. for each polygon, count the number of occurrences/overlaps with the requested features (sf::st_within() and friends)
  3. 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)
  4. 🥳"
vankesteren commented 3 years ago

oh yeah this is still a good idea