hrbrmstr / overpass

:information_source: Tools to Work With the OpenStreetMap (OSM) Overpass API in R
https://hrbrmstr.github.io/overpass/
Other
41 stars 6 forks source link

overpass query pipes? #7

Open hrbrmstr opened 9 years ago

hrbrmstr commented 9 years ago

Posit (alpha minimum working in 0.1.0.9000):

opq(bbox="43.0135509,-70.8229993,43.0996118,-70.7280563") %>% 
  add_feature("amenity", "pub", ) %>% 
  add_feature("amenity", "restaurant") %>% 
  add_feature("amenity", "library") %>% 
  issue_query() -> reading_noms

plot(reading_noms)
hrbrmstr commented 9 years ago

we cld make this a "basic" thing (i.e. not get too crazy with Overpass QL support). But this particular query has solidified that we prbly need to have the result of a query be a list object with many Spatial objects in it.

Robinlovelace commented 9 years ago

There's definitely a need to add together different things in the api request. bbox arg is definitely one (and should be able to take bbox, character (e.g. via bb_lookup) and numeric inputs.

I really like the separation between functions that build the text query and those (or the one) that pulls in data from overpass. Will test and provide more comments.