OSM download
✓ Published0🌍 Public
RRCura
Last edited Jan 25, 2021
Created on Jan 25, 2021
This example maps individual trees in a Brussels area by querying OpenStreetMap data through the Overpass API. The R script constructs an Overpass query for nodes tagged `natural=tree`, retrieves the JSON response, and uses `jsonlite` and `purrr` to extract the elements. It then converts the longitude and latitude coordinates into a simple features object with `st_as_sf`, projecting them to EPSG 4326 for spatial handling. The resulting data is ready for plotting as point geometries.
AI-generated description