matejker / everystreet

An algorithm finding #everystreet route on Open Street Map (OSMnx)
http://www.everystreetchallenge.com/
MIT License
103 stars 25 forks source link

How to run locally with polygon? #36

Open arepp23 opened 1 month ago

arepp23 commented 1 month ago

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 commented 1 month ago

Does other polygons work for you?

arepp23 commented 1 month ago

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 commented 2 weeks ago

@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.