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

runtime error when using dodgr_streetnet() #174

Closed
LeshunXu opened this issue Mar 21, 2022 · 3 comments
Closed

runtime error when using dodgr_streetnet() #174

LeshunXu opened this issue Mar 21, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@LeshunXu
Copy link

Hi, I am new to use dodgr_streetnet() in dodgr package. Does anyone can help me to solve the reported problem? Here is my code:

myNet <- "oxford uk" %>% osmdata::getbb() %>% dodgr_streetnet(., expand=0)

The error I got is:

Error in check_for_error(doc) : General overpass server error; returned: The data included in this document is from www.openstreetmap.org. The data is made available under ODbL. runtime error: Query timed out in "query" at line 3 after 26 seconds.

I appreciate for your help!!

@LeshunXu
Copy link
Author

My supervisor and I find a solution. Here is the solution:

myNet <- "oxford uk" %>% osmdata::getbb() %>% t() %>% dodgr_streetnet(., expand=0)
or
myNet <- "oxford uk" %>% osmdata::getbb() %>% c() %>% dodgr_streetnet(., expand=0)

So, I think, it would be great if add bbox <- t(bbox) before bb <- process_bbox(bbox, pts, expand) in the dodgr_streetnet() function.

@mpadge mpadge closed this as completed in 8319070 Mar 23, 2022
@mpadge
Copy link
Member

mpadge commented Mar 23, 2022

Thanks @LeshunXu - you may be "new" in using dodgr, but you did indeed find a bug! You are supposed to just pass the names of locations directly to the dodgr_streetnet() function, rather than calling osmdata::getbb() yourself, but the code you provide should nevertheless work anyway. The above commit detects when bbox parameters are in the form returned from osmdata::getbb(), and transposes accordingly. Thanks!

@MartinLHazelton
Copy link

Thanks @mpadge ! The advantage of getting the bounding box first is that one can subsequently tailor the boundaries to one's requirements.

@mpadge mpadge added the bug Something isn't working label Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants