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

Importing OSM data for London #794

Closed
georgio8 opened this issue Oct 30, 2021 · 17 comments
Closed

Importing OSM data for London #794

georgio8 opened this issue Oct 30, 2021 · 17 comments

Comments

@georgio8
Copy link

Hi, your progress with the LTN Tool is exciting and it's already potentially useful. London UK is a focus of a lot of effort in planning LTNs.

As you may know, London is administered as 33 boroughs that act as separate cities for most road planning. My own borough is Camden https://www.openstreetmap.org/#map=13/51.5428/-0.1809. It would be great to get the OSM data for Camden imported to AB Street. I'd be happy to designate the area or to download the relevant section of the OSM database.

Once knowledge of the LTN Tool spreads I imagine there will be demands from quite a few other London boroughs too. Does it make sense to import the OSM data for all of Greater London (https://download.geofabrik.de/europe/great-britain/england/greater-london.html)?

@dabreegster
Copy link
Collaborator

Hi, thanks for trying out the early prototype! It would be great if you could draw the boundary of Camden with https://geojson.io/#map=13/51.5428/-0.1594. This might not just be the official borough boundary -- for studying LTNs, maybe you need to include more of surrounding areas too, for cases of a neighborhood spanning boroughs. So it takes local knowledge, which I don't have for London... yet.

I am very interested in importing all of the boroughs, and manually deciding boundaries seems tedious. I found https://skgrange.github.io/data.html, and the size of most boundaries looks reasonable (denser and physically larger areas mean bigger imported files, and the tool being slower at initially loading). Kind of awkwardly, the river is clipped out, which is an example of the interesting transportation study area not matching up with administrative boundaries:
Screenshot from 2021-10-30 09-46-12

But it could be a start. Let me know if you're in favor of starting with the official boundaries or not, and if you have a version of Camden that differs from this one.

I'm hoping to flesh out the LTN prototype in the next few weeks. Any particular requests or ideas what it should do?

@georgio8
Copy link
Author

Hi, thanks for all the amazing work you're doing and for engaging about getting the London boroughs loaded.

I think you're right that we should aim to load each London borough separately, with a generous margin to enable study of overflowing LTN schemes. Here is a Gist with the geojson for the official Camden boundary and a bounding polygon providing a suitable margin: https://gist.github.com/georgio8/dd00872207e2210c0cea6d36f14709c6
It wouldn't be hard to do the same for all 33 boroughs.

About your future plans for the tool, we should engage with other interested parties including Brian D and @Robinlovelace in this discussion, but here are my initial thoughts:

  • it would be great to add modelling of the likely routes of the traffic displaced when modal filters are installed. e.g. the user indicates some a-b routes through the LTN area starting maybe a km outside the area and the tool reroutes them when a filter is installed.
  • even better would be to add traffic counts to the a-b routes and the tool would re-allocate the numbers to new routes when filters are installed.

This is all going to be very useful for our campaigning in London. At an appropriate point in the development I will introduce a couple of the professional highway planners we interact with Camden who draw up the plans for future LTNs and ask them for comments and suggestions.

Incidentally, here is a map we have produced showing the existing LTNs in Camden with a legend showing summaries of their areas and the rate of progress. It was produced with a SheetMapper tool that I hacked up using Mapbox and the Google Sheets API. We have used the same tool to produce several maps recording progress with cycling infrastructure.

dabreegster added a commit that referenced this issue Oct 31, 2021
@dabreegster
Copy link
Collaborator

Here is a Gist with the geojson for the official Camden boundary and a bounding polygon providing a suitable margin

Thanks! The result is one the larger end (60MB uncompressed, 22MB compressed), but it should still load comfortably on web. I'll post a link in a few hours when the new release is built.

we should engage with other interested parties including Brian D and @Robinlovelace in this discussion

Both are already involved. :)

the user indicates some a-b routes through the LTN area starting maybe a km outside the area and the tool reroutes them when a filter is installed.

Hmm, good idea. I've been thinking of detecting shortcuts just between two points along the perimeter of a neighborhood, like:
Screenshot from 2021-10-31 13-38-37
with the motivation for the shortcut being to avoid traffic on the main roads. But that does feel like too small of a view to understand the actual motivation. If we can find or generate some origin/destination pairs for driving trips, we can start by finding the ones passing through the neighborhood, then calculate the likely detours.

even better would be to add traffic counts to the a-b routes and the tool would re-allocate the numbers to new routes when filters are installed.

We've tried something like this before in the traffic simulator. An example of making two roads between Poundbury and Dorchester one-way:
Screenshot from 2021-10-31 13-42-03
The simulation predicts that the north/south road with the tooltip will see more vehicle traffic, as some drivers use it to switch directions. We can do something even simpler, without simulation, in the LTN tool if we have (or can generate) desire lines with counts for vehicle trips.

Is the motivation for this feature to explore/address concerns about what nearby streets might see "spillover" effects from a new modal filter? I feel like it'd also be important to have some tuneable controls to show "traffic evaporation" as people decide to forgo that driving trip altogether.

here is a map we have produced showing the existing LTNs in Camden

Ah thanks, these are great to reference! The A/B Street importer doesn't yet understand the many ways modal filters can be tagged in OpenStreetMap, so I'll check against this map and make sure the present situation is detected correctly.

@dabreegster
Copy link
Collaborator

https://play.abstreet.org/0.2.64/abstreet.html?--ltn&system/gb/london/maps/camden.bin
Here's the Camden area. Entire thing loads in under 10s on my machine, which isn't bad for the browser version

@georgio8
Copy link
Author

georgio8 commented Oct 31, 2021 via email

@dabreegster
Copy link
Collaborator

This one has a 24-hour origin-destination survey of motor traffic

The data and visualizations here are awesome! I will think about how we can import this and make use of it for calculating possible detours.

your algorithm for defining a Neighbourhood.

Currently very simple. Start at any "minor" road and "flood" outwards until you hit a "major" road. Major roads are defined as motorways, trunks, primary, secondary, and tertiary roads in the OpenStreetMap classification. Minor roads are everything else. Depending on how current modal filters are tagged in OSM, sometimes one existing LTN will get detected as multiple.

On some occasions, we would have liked to be able to extend a Neighbourhood to include another street, or even to merge two Neighbourhoods.

Noted! I have some in-progress work to trace around a single "block" and merge adjacent ones. Once I get it working, I think I can let you draw boundaries however you like. I'm also thinking it's going to be important to let people mark a shortcut that they observe in real life or want to talk about, and not just browse through the list that the tool detects.

Screenshot from 2021-10-31 15-47-06

I hope to have some progress by next Sunday's build. In the meantime, if you know any software developers interested in the Rust language and this project, I'd love to build out the team working on this a bit more.

@georgio8
Copy link
Author

georgio8 commented Nov 1, 2021 via email

@dabreegster
Copy link
Collaborator

the missing rat runs may be due to algorithm problems and should be discussed.

If you send along an image of a missing example, it'd be useful. But I wouldn't spend much effort yet on looking at results from the tool. I've literally spent only a few hours putting together the prototype so far, and the rat run detection is almost deliberately bad at this point. I hope to properly focus on it in the next few weeks.

@georgio8
Copy link
Author

georgio8 commented Nov 2, 2021 via email

@georgio8
Copy link
Author

georgio8 commented Nov 2, 2021

[Repeating the last post with images included]
False rat-runs
your algorithm for defining a Neighbourhood.

Currently very simple. Start at any "minor" road and "flood" outwards until you hit a "major" road. Major roads are defined as motorways, trunks, primary, secondary, and tertiary roads in the OpenStreetMap classification. Minor roads are everything else. Depending on how current modal filters are tagged in OSM, sometimes one existing LTN will get detected as multiple.

Yes, the algorithm’s handling of modal filters is problematic. The perimeter for this neighbourhood has been set at the modal filters indicated, and that has resulted in a lot of false rat runs ending at the filters (like the one included in this screen shot), when in fact the filters are effective in preventing rat runs. Even one road that is filtered by a bollard (Sandall Road) is shown as a rat run.The algorithm probably ought to ignore filters on minor roads so that neighbourhoods will be bounded by major roads.
Another issue is that several false rat runs are shown that use private roads that vehicles can’t enter. Some of them are gated and others just signed.

False ratruns

Missing rat runs:
the missing rat runs may be due to algorithm problems and should be discussed.

If you send along an image of a missing example, it'd be useful. But I wouldn't spend much effort yet on looking at results from the tool. I've literally spent only a few hours putting together the prototype so far, and the rat run detection is almost deliberately bad at this point. I hope to properly focus on it in the next few weeks.

Several important rat runs in this neighbourhood (in pink and mauve) haven’t been identified by the tool:
missing ratruns

dabreegster added a commit that referenced this issue Nov 5, 2021
- Use the new blockfinder to initially classify neighborhoods
- Calculate cells within a neighborhood, and update them based on road
  filters
- For the moment, remove the tool that shows example rat runs
@dabreegster
Copy link
Collaborator

Thank you for the examples! Making some progress here. Now the tool shows contiguous areas reachable from the perimeter of the neighborhood in the same color. Before any interventions, the fact that all the roads are blue means all 3 of the example rat runs you drew are detected:
Screenshot from 2021-11-04 18-02-13
I can place one filter at Busby Place and stop the east/west movement:
Screenshot from 2021-11-04 18-02-20

There's still lots of work to handle private roads, gates and barriers in OpenStreetMap, one-ways, etc. Hopefully a bit more will be working by this weekend.

@georgio8
Copy link
Author

georgio8 commented Nov 5, 2021 via email

@dabreegster
Copy link
Collaborator

Here's the new version: https://play.abstreet.org/0.2.65/abstreet.html?--ltn&../data/system/gb/london/maps/camden.bin
There are many issues I'm still working through -- don't expect the gated roads to be handled correctly yet. Seeing individual rat runs is disabled, because it's still far from working properly. But a neighborhood is split into different "traffic cells" (I think I've seen that term used?) and can be drawn two different ways.

the LTN tool is potential fulfilment of a similar idea I have been nurturing for a couple of years - but didn’t have the time/coding skill to proceed with it.

I have the opposite problem -- I enjoy coding stuff like this, but have a hard time coming up with the ideas that can actually be useful from an advocacy or planning perspective. I'm looking forward to working more closely with the London community in a few weeks...

I’ve noticed that there is a lack of OSM tags for traffic filters. They always seem to involve a section of closed or one-way street with cycle tracks alongside.

I agree the schemas currently used can feel unnecessarily complex. I haven't dove too far into this yet. I'm trying to first model all the different types of filters -- rendering them, adding or editing them, and affecting routing -- without rigorously importing existing filters from OSM. Once I have things solid from the tool's end, then the diversity of OSM tagging can be handled.

I swear I remember seeing a guide to tagging modal filters from CycleStreets, but I can't find it at the moment. https://www.cyclestreets.org/news/2021/07/25/mapping-ltns/ is related.

@dabreegster
Copy link
Collaborator

Also, if you have any time in the next few weeks for a 30-60 min usability study by videocall, it'd be massively useful to our design process to get more rapid feedback. Feel free to email me ([email protected]) to schedule if so.

@Robinlovelace
Copy link
Contributor

Following this thread with interest, great to see a clear use case supported by substantial real world knowledge. I have had a look at the Camden example and it's looking great to me.

image

Observations (which are not new, in support of previous conversations):

  • It's amazing how 'non-linear' the process is: you can block off several roads with little impact on watertightness and then suddenly one more in a seemingly unimportant link can create a large LTN, other tools will struggle to capture this.
  • A functional (and aesthetic) improvement would be to allow modal filters to be placed at cross roads, with options enabling them to go diagonally to block certain turns. I have an example of this close to my house illustrated in another issue, it's highly effective.
  • In terms of aesthetics, the LTN zones change pretty frequently with each click. This is a very minor comment in the scheme of things.

@georgio8
Copy link
Author

georgio8 commented Nov 8, 2021 via email

dabreegster added a commit that referenced this issue Nov 21, 2021
Only supported at 4-way intersections currently.
@dabreegster
Copy link
Collaborator

https://a-b-street.github.io/docs/software/ltn/tech_details.html#neighborhood-selection has more details about how boundaries are defined today. What I'm hearing from nearly everyone is that picking the exact boundaries is pretty much impossible to do by heuristic, so I'm working on a UI to let people draw their own.

dabreegster added a commit that referenced this issue Dec 14, 2021
Still need to think through the UX of how to manage custom boundaries
and incorporate them in the "browse neighborhoods" screen.
dabreegster added a commit that referenced this issue Dec 14, 2021
Still need to think through the UX of how to manage custom boundaries
and incorporate them in the "browse neighborhoods" screen.
dabreegster added a commit that referenced this issue Feb 9, 2022
I used the simplified boundaries from
https://skgrange.github.io/data.html. 4 boroughs failed early in
conversion, need to investigate separately. Plenty of weird clipping
issues with the Thames.
dabreegster added a commit that referenced this issue Feb 17, 2022
objects outside the study area boundary, because I changed the boundary
but forgot to first re-clip the .osm file. #794
dabreegster added a commit to a-b-street/osm2streets that referenced this issue Aug 21, 2022
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