osmextract
osmextract copied to clipboard
Simplifying queries
Many of the examples in the documents show queries like this:
q = "SELECT * FROM 'multipolygons' WHERE 'building' is not null"
However, I've just discovered that this works fine (better in this case, the above fails to omit building=NA):
In context of reprex:
library(dplyr)
q = "SELECT * FROM multipolygons WHERE building is not null"
buildings_nyorks = osmextract::oe_get("north yorkshire", query = q)
buildings_nyorks %>%
sf::st_drop_geometry() %>%
group_by(building) %>%
count(building) %>%
arrange(desc(n))
Result!
Hi Robin! I'm not 100% sure but I think that sounds like a bug (or at least something that I want to check with more details as soon as possible). Anyway, thanks for creating this issue!