-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
There might be possibly a bug in how trim_osmdata() filters the data. It seems to be removing some objects that should be in the final dataset.
library(tidyverse)
library(sf)
#> Linking to GEOS 3.8.1, GDAL 3.2.1, PROJ 7.2.1
library(osmdata)
#> Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright
townsQ <- getbb("Southeastern Connecticut COG", featuretype = "boundary") %>%
opq()
townsQ$prefix <- '[out:xml][timeout:250];\n rel[name="Southeastern Connecticut COG"]; \n map_to_area->.a;(\n'
townsQ$features <- "[\"admin_level\"=\"8\"](area.a)"
towns <- townsQ %>%
osmdata_sf()
towns$osm_multipolygons |> ggplot() + geom_sf()area <- getbb("Southeastern Connecticut COG", featuretype = "boundary", format_out = "polygon")
towns <- opq(bbox=area, timeout = 250) %>%
add_osm_feature(key="admin_level", value="8") %>%
osmdata_sf() %>%
trim_osmdata(area)
towns$osm_multipolygons |> ggplot() + geom_sf()packageVersion("osmdata")
#> [1] '0.1.8'
R.Version()$version.string
#> [1] "R version 4.1.1 (2021-08-10)"Created on 2021-11-23 by the reprex package (v2.0.1)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

