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 run locally with polygon? #36

Open
arepp23 opened this issue Sep 12, 2024 · 3 comments
Open

How to run locally with polygon? #36

arepp23 opened this issue Sep 12, 2024 · 3 comments

Comments

@arepp23
Copy link

arepp23 commented Sep 12, 2024

I've drawn a polygon on http://www.everystreetchallenge.com/ but when I click Generate route the request fails with a 503. My polygon is not huge.

I've installed this locally but I'm not sure how to run it with a polygon selection.

@matejker
Copy link
Owner

Does other polygons work for you?

@arepp23
Copy link
Author

arepp23 commented Sep 14, 2024

They do, would that indicate there's some issue with the map data where I'm selecting? Don't want to dox myself but I can share the area privately.

@jamescoverdale
Copy link

@arepp23 I had a similar issue to you, and downloaded the code to run locally, here are the tweaks i made to the code to run my own polygon, if its helpful.

Swap out

org_graph = ox.graph_from_place(location, custom_filter=CUSTOM_FILTER)

for

from shapely import Polygon
myPoly = Polygon(shell=[[y,x],[y,x],[y,x])
org_graph = ox.graph_from_polygon(myPoly)

I then used https://www.keene.edu/campus/maps/tool, to generate the polygon I needed, and copied the coordinates into the Polygon constructor.

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

3 participants