Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get data from OpenStreetMap (bus stops)? #54

Open
Robinlovelace opened this issue Feb 8, 2021 · 0 comments
Open

How to get data from OpenStreetMap (bus stops)? #54

Robinlovelace opened this issue Feb 8, 2021 · 0 comments

Comments

@Robinlovelace
Copy link
Member

Robinlovelace commented Feb 8, 2021

Running these lines of code should solve the problem (change 'leeds' to another city):

remotes::install_github("ropensci/osmextract")
q = "select * from points where highway IN ('bus_stop')"
bus_stop_leeds = osmextract::oe_get("leeds", query = q)
#> No exact match found for place = leeds and provider = geofabrik. Best match is Laos. 
#> Checking the other providers.
#> An exact string match was found using provider = bbbike.
#> Warning: The query selected a layer which is different from layer argument. We
#> will ignore the layer argument.
#> The chosen file was already detected in the download directory. Skip downloading.
#> The corresponding gpkg file was already detected. Skip vectortranslate operations.
#> Reading layer `points' from data source `/mnt/57982e2a-2874-4246-a6fe-115c199bc6bd/data/osm/geofabrik_Leeds.gpkg' using driver `GPKG'
#> Simple feature collection with 10769 features and 10 fields
#> geometry type:  POINT
#> dimension:      XY
#> bbox:           xmin: -1.889932 ymin: 53.65001 xmax: -1.280304 ymax: 53.87993
#> geographic CRS: WGS 84
mapview::mapview(bus_stop_leeds)

Created on 2021-02-08 by the reprex package (v1.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant