Closed sgallese closed 8 years ago
@sgallese, do you get the same error when running Curvature without limiting it to a bounding-box? I haven't had a chance to test yet, but I'm guessing that the bounding box is causing the collection of coordinates to drop coordinates that later are being looked for because they are part of a way that includes some coordinates that are in the bounding box.
I can think of two ways this might be solved:
first
lookup to begin with the first ref and then iterate through the refs until one that is in the bounding box is found. This has the downside that same steps would be needed for the rest of the way and there is the possibility that a middle portion of a way may be positioned outside of the bounding box and therefor get clipped.Your assumption is correct, setting the bounding box produces an error while running the same command without a bounding box works without issue.
Spent an hour trying the first solution, couldn't get it to work (sorry, still not sure about all project terminology and new to Python).
I'll go ahead and use the entire state map for now and not limit to a bounding box.
Using the osm file from here: http://download.geofabrik.de/north-america/us/california-latest.osm.pbf
And using the code from the Bay Area example here: https://github.com/adamfranco/curvature#examples