-
-
Notifications
You must be signed in to change notification settings - Fork 352
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 Berlin #119
Comments
The OSM importing code is extremely strict about stuff I haven't seen before, to prevent regressions when converting regularly used maps. This one is easy to fix (edit map_model/src/raw.rs:373) if you've built from source. You're bound to hit a few more issues though. I'll download the Berlin map and fix whatever I encounter. |
The entire Berlin area is huge. Could we start with a smaller area? Not neighborhood small, maybe the general city center area, just not 1.1GB. :) I use geojson.io or geoman.io to draw polygon boundaries. |
Wow, thanks for doing this. Sorry. I didn't know how much this file covered.
Of course, how about this for the core city centre:
and this for a larger part of the city which is surrounded by the circle train:
I can try to create those filter files. |
Filter files: berlin-polys.zip I've tried another time with |
Thanks! I got the large one working. You can put this file in I'll commit a fix in a moment that deals with almost all of the issues. There are a few intersections where seemingly different combinations of roads wind up with exactly the same turn geometry, which breaks some assertions. I want to figure out why that's happening instead of relaxing that code permanently. |
restrictions previously unencountered and deal with weird geometry. and add some hints to docs for #118.
Wow! That's amazing. Thanks a lot for your quick help. Unfortunately, abstreet is crashing when trying to load the Berlin map. output.txt contains:
That's great! |
I found what I think is a problem with Bayernring in OSM:
The crash is because the binary map format has changed since Sunday. That's the price of rapid iteration. :( If you can build the |
The new Mac binary is working with the Berlin map. Fantastic! Thanks so much.
No sorry, I'm not. But I'm part of CityLAB Berlin. I should introduce myself properly in the next few days. And maybe my colleagues can answer some of your questions on the Berlin data. Let me know if you have any more questions. Thanks so much! 🙏 That was the quickest support. |
About the parking data, my colleague @Lisa-Stubert mentioned an official data set from 2014 that contains this data in some format. It might be useful to fill in the gaps on OSM. FIS-Broker > Straßenbefahrung > Parkfläche > WFS address The data set contains polygons. @Lisa-Stubert mentioned we might need lines instead. |
The direct link to WFS address seemed broken, and I couldn't find Parkfläche on the first page. Is there a different direct link? Seattle has a perhaps similar dataset, blockface. I'm matching that to the nearest side of each road here. We could do something similar for this dataset. Ideally the data winds up in OSM, so anybody can use it, and it can be maintained more easily. OSM has strict rules around importing data automatically. Regardless of an import, theres a tool in A/B Street to update parking tags in OSM a little more conveniently than other editors. |
I'm not familiar with the workflow yet, but a former colleague has written this guide on how to use that data source: https://lab.technologiestiftung-berlin.de/projects/fisbroker-to-qgis/en/ Apparently you can also load it via command line (with GDAL installed): I'm going to get back to this next week. |
https://fbinter.stadt-berlin.de/fb/index.jsp?loginkey=zoomStart&mapId=k_StraDa@senstadt&bbox=383640,5815972,386377,5817593 this is the direct link to the data set of the "Straßenbefahrung". It contains all possible areas and objects of road traffic for Berlin. The dark grey areas are the parking areas. They can only be downloaded via the WFS service @jvolker posted. |
I've just tried to load the berlin map in A/B street compiled from source on Windows and received this error:
Do you have any idea what could cause this? Thanks. |
The binary format of the map changed yesterday. I can regenerate the Berlin map and give you a new dropbox link in the next ~30 mins |
https://www.dropbox.com/s/2l2muvha0dubuvp/berlin.bin?dl=0 The simulation crashes 3m58s in. I can investigate soon; I suspect this is the same as #143 (comment) -- there are some bus stops mis-tagged in OSM. I'll improve the error message to find these better, or filter out the invalid ones. |
Fixed Berlin map: https://www.dropbox.com/s/2l2muvha0dubuvp/berlin.bin?dl=0 The possible bus route issues:
These stops are just skipped for now. Not high priority to figure out what's wrong here. |
Thanks. It's working again. |
Just checking, are you blocked on me for anything besides importing and matching parking data? (which I'm not likely to get to anytime super soon) |
Thanks for asking @dabreegster. It seems the most important thing is to get trip data to get a more realistic simulation. We are currently looking into data sources and are going to post them here. |
Hey Dustin! So we've done some brainstorming and come up with some additional data sources that might be useful for the project. Maybe you can take a look and give us an indication which data sources you see as more or less useful, or what's still missing? The biggest thing we don't have right now is any sort of traffic pattern model like the SoundCast model. It's unclear to me to what extent this data exists in Berlin at all, and to the extent it does, it's not available as open data and we currently lack the contacts to rustle up that data. Obviously we'll keep exploring that, because it's something we're very interested in, but I don't know how soon we would have something concrete to offer there, if that even happens at all. So what do we have?
What might we have? I looked at the dataset containing information on "blockfaces" to see what it contained (wasn't familiar with this term myself). Seems like it includes data on things like zones (e.g. loading and unloading zones, no parking zones, etc.) as well as metered parking/parking fees. Not sure what out of the blockfaces dataset is most relevant for A/B Street – if it's just about knowing where there is streetside parking, then the aforementioned "Straßenbefahrung" dataset is probably our best bet there. If you also want information on no-parking zones etc., I think we can possibly also get those out of the Straßenbefahrung dataset, but I'm not certain. We definitely won't be to get get good data on where parking is metered (and under what circumstances); there isn't currently a comprehensive city-wide dataset for that. We may be able to rustle up some data on off-street parking – @Lisa-Stubert wanted to check out another large geospatial dataset we have to see if parking lots and parking garages are in it (although if they are, my guess is we won't have data on capacities, but maybe I'll be proven wrong). Let me know what questions you have. If there's an acute need for data that has not yet been addressed, also let me know about that and we can go sleuthing... |
Thanks for doing this research!
I think the biggest thing that would help generate better trip data would be census. In the US, there are census tracts like this that chop up the area into pretty small regions, then assign a bunch of demographics to each tract -- mainly a population count. Then there's the American Commuter Survey that has questions like "how many cars owned per household" and "how many trips > 5 miles taken per day." The sample size is probably really small, but it's better than nothing, and I think the survey results are correlated with census tracts. So from this, the really simple trip generation model would take the number of people inside a tract, randomly distribute them to houses in that area (using OSM's residential vs commercial building tagging), guess a workplace/school/common destination for them using stats on how far people in that area travel, and so on. I see https://en.wikipedia.org/wiki/Demographics_of_Berlin, and drilling down, https://en.wikipedia.org/wiki/Tiergarten,_Berlin is a small area with a population of ~12.5k. So I think we could use this! I haven't looked for where the wiki article pulls data; if there's a more consolidated format that ideally has the GPS coordinates of each neighborhood with this population count, that'd be a huge step forward. |
With respect to the Census Tracts / finding a corollary in Berlin: So there are various administrative units that Berlin as a city is broken up into. A coworker actually did a nice breakdown of them (in English) here: https://lab.technologiestiftung-berlin.de/projects/spatial-units/en/. The example you found, Tiergarten, is an example of an Ortsteil/locality. Of the top of my head, I'm not actually sure what the smallest possible unit is (there are a few different systems for breaking up the city that are used in different concepts, so it's not necessarily straightforward to arrange all of the units from smallest to biggest. I guess what we want is the smallest possible unit for which we also have demographic data? I think the smallest unit for which we would have overall population data is a Planungsraum/Planning Area. The population data is available here: https://daten.berlin.de/datensaetze/einwohnerinnen-und-einwohner-berlin-lor-planungsr%C3%A4umen-am-31122018 We also have the geometry of the Planungsräume available in various geospatial formats: https://data.technologiestiftung-berlin.de/dataset/lor_planungsgraeume/en (I think this file is slightly outdated though, we'll have to update it first). I don't know if we'll be able to find additional census-like data for that level of specificity, however. Within Berlin itself I haven't seen any sort of survey data around mobility habits. @Lisa-Stubert found this dataset, which probably has what we want? https://daten.clearingstelle-verkehr.de/279/ It includes a regional level, where an area is broken up into a grid of squares that are at least 500x500m and have at least 500 residents in them. The data, as far as I can tell, would include information on the average trip length from a given cell, whether the people living there own cars, etc. Unfortunately, it is not available as open data and I suspect it is only available for a fee. Moreover, the data seems like it is likely to be fairly complex, so even if we were to acquire it, I think it might be beyond our resources at least to integrate it into the program. I can keep poking around to see if I find anything else at the Berlin level, but at least right now, we definitely have population data for sub-units of Berlin. |
Maybe |
No, nothing, unfortunately. |
"tuned" is overstatement, it was more of "AB Street is no longer crashing and there are some pedestrians, cars and cyclists" and "problem of bicyclist traffic jams, with bicycle traffic over 100 times reality, is reduced to 5 times reality" (it is not overstatement, bicycle traffic in one iteration was so large that it caused nearly instant city-wide gridlock). Feel free to change numbers or tweak it based solely on Berlin, do not worry about Krakow (though if you want you may test it also there). |
Ah, maybe running a separate shell script on Windows launches a new terminal. Try:
I'm not sure about Windows syntax, but you could also try Also I noticed you're doing |
Thanks, the following has worked:
But I'm now getting the following errors:
|
You can ignore the warnings. It tried to execute this command: I'll switch |
…ll need to handle unzip and curl.
A couple additional data sources to throw in there:
|
The travel surveys look really promising! Right now, our approach knows roughly how many people reside in each building, but we don't know how far they travel, or how. If we could put together a table of (origin district, destination district, percentage of bike trips, pct of driving, ...), then we could pretty easily do something more realistic. I can't understand the PDFs too easily, but if they have this quadratic table of trips between every pair of districts, 144 things isn't unreasonable to manually copy from a PDF. Bike counts may be helpful, but I don't know how to turn the data into individual trips. This is a sample paper describing how to do it. It's way beyond my current ability to understand. The more I read about https://activitysim.github.io/activitysim/index.html, the more I'm convinced this could be the more trustworthy way forward. Seattle's Soundcast model makes use of this. (Edit: just kidding, they use DaySim.) Glancing through the amount of detail in the different parts of their model, there's no hope of reproducing this level of rigor. I think A/B Street ought to require trip data as input. We can do extremely simple approximations that just look at OpenStreetMap data and maybe some extra census counts, but I don't know if it's worth trying to recreate what ActivitySim has done. |
An update: there's renewed interest in getting a good travel demand model for Berlin, from the folks creating CargoBikeCity. Since July, a few more ideas/options for generating demand data have arisen:
|
@dabreegster great to see this long thread about Berlin. We have a dedicated OSM UserGroup about "Traffic evolution" in Berlin. More at https://wiki.openstreetmap.org/wiki/Berlin/Verkehrswende. Some things we work on:
I would love to see the map with lanes and such running to start checking the OSM data and adjust it where needed. What is your recommendation how to get this running locally (Mac) in this UseCase? |
Where you are stuck? At running ABStreet at all or at running specifically Berlin? |
Hi @tordans! I'm constantly amazed by the level of detail in OSM being added, and the new proposals on the Verkehrswende wiki page look exciting. I'm quite interested in improving the accuracy of the map model in A/B Street from this data, but some of it is going to be quite difficult. One big problem is that A/B Street doesn't yet handle sidewalks and cyclepaths mapped separately from the "main" road way. a-b-street/osm2streets#59 and a-b-street/osm2streets#81 have details. In short, it's hard for a few reasons:
That being said, you could enable using more of the OSM sidewalk data by using config like this. I'd love to work on fixing these problems, but I tend to over-commit how much I can work on. If anybody from your group is interested in helping with development, that would be ideal. I can mentor if Rust isn't a familiar language, but some programming experience is necessary to make progress. One good first step could be to extend the area of Berlin in A/B Street. We just have the one shape right now. If Neukölln is a useful area to focus on, for example, then we could chop up the area into more pieces. This is best done by locals familiar with the city to choose meaningful boundaries. https://dabreegster.github.io/abstreet/howto/new_city.html#including-the-city-to-ab-street-more-permanently has more info -- geojson.io is a useful tool for drawing the polygons. I spotted this from y'all's Telegram group:
https://dabreegster.github.io/abstreet/dev/index.html has instructions for compiling locally -- is that what you meant? |
Hey Dustin, I am also happy to have discovered this thread (I'm another member of the "Verkehrswende" group). Neukölln could be an perfect playground for testing detailed street information. As you've already noticed, we have parking lanes mapped all over the place here. In addition, we are currently starting to systematically collect other data that could be interesting for traffic modelling: For example, road widths (a discussion for this purpose resulted in the OSM tagging "width:carriageway" a few months ago, see OSM-Wiki). Most roads here have no markings, so width data is most relevant for estimating traffic flow. Do you already take width data into account in any way? As mentioned by @tordans we have also started to record separate sidewalks. "sidewalk=separate" on a highway is an indicator for this, which you can evaluate even when analysing the street lines without having to generate relationships to separate geometries. We need to improve this a bit, because an indication like "sidewalk:both=separate" or "sidewalk:left=separate" would be clear to show on which sides of the road there is a sidewalk. Detailed attributes for the sidewalks (like width – if mapped at all) are lost with separate mapping, but not the information that there is a sidewalk at all. We do it similarly for cycle tracks. There are other details like curbs, curb extensions or certain forms of crossings that we are working on, but the two points mentioned above (street width and the street vs. pavement problem) are probably the most interesting for you. I'd be happy if our well-mapped neighbourhood is enriching your developments and perhaps encourages other mappers to map in more detail. Applications like A/B Street and the analyses that are possible with them show what potential can be found in open data! I'm not a programmer, unfortunately, so I can't help with A/B Street (but I am happy to contribute on local or tagging issues). P.S. If you're interested: I'm currently working on a parking analysis (with QGIS) for this Neukölln district, which I'll finish during the next weeks: see some first impressions here. |
This is implemented already, though maybe it can be tweaked a bit. AB is smart enough to handle it specially on major oneway roads (dual carriageways). |
Not really, except for
Things like I still think the best next step is to get more boundary polygons for areas around Berlin in. |
@SupaplexOSM, I just found your micromap thanks to @tordans in the OSMUS Slack. This is frankly the coolest thing I have seen in a long time. It's an unprecedented level of detail, yet immediately clear how to read -- the design and color choices are awesome. I'm still reading through the blog posts and code, so apologies if some of these questions are answered there.
Since last December, A/B Street has made progress representing roads and lanes with modifiable width: https://a-b-street.github.io/docs/project/retrospective/index.html#road-editor We've also made some progress logically and geometrically consolidating complex junctions. I just published a long article about how this works, https://a-b-street.github.io/docs/tech/map/geometry/index.html. Finally, I'm curious how your parking space analysis is being received by the community. Are you using this to argue that there's too much public space being used to store vehicles? Or is this project more aimed at representing data in OSM instead of other sources? |
Oh, I'm glad you like the map! Unfortunately I'm not using such methods and I don't know if they would be possible... I am actually rather a non-expert in scripting etc. (and at the beginning of the project also in GIS) and therefore often have to look for simple solutions... There are two elements in the map so far that are not 100% generated from OSM:
We now increasingly map accurate road width information in our area ("width:carriageway") and from various attributes (lanes, highway classification, oneway, number and location of parking and cycle lanes etc.) this information can also be interpolated for roads without any width attribute. I use this partly in the Python script for QGIS to generate the "basic version" of the parking lanes. But if you would render them on this basis, then unfortunately no such exact representation of the parking lanes would be possible as it is in the map - most parking lanes/cars would be a bit misaligned... (This could also be changed by mapping according to the "kerbside" scheme proposed by the makers of Curb LR: https://medium.com/sharedstreets/openstreetmap-and-curb-regulations-7812ee582a33 - but this is not yet used in OSM and the "parking:lane" scheme is so well established that it would probably not stand a chance). Last week, the road markings and turn lanes have been added to the rendering of the micro map - these can be derived more or less well from the OSM data if lane attributes are mapped consistently (you know that, of cause). To improve the rendering, I have added "placement" tags in some places. In addition, intersection areas with "area:highway" + "junction=yes" are taken into account to "cut off" the markings in intersection areas. In return, I'm rendering "footway=crossing" ways there (or derive them from crossing nodes) to get more realistic crossing representation. So a lot of this rendering only works because the area here is mostly mapped in a very detailed way... And unfortunately, the methodological requirements mentioned above mean that this micro-mapping map style cannot be easily extended to other areas or that it would require a generic lane model such as that of A/B Street (which can certainly come very close to reality if road attributes are mapped well). The generation of your data/the A/B Street lane model probably works completely differently and far more professionally, and therefore in a generic way (but as I said, I'm more an amateur and initially the map was only intended to visualise the parking data in our area...). Regarding the second question: The topic of "public parking space" is currently being discussed very actively at all political and social levels in Berlin. However, there is a lack of empirical data on how much parking space there actually is - even more a lack of open data. We discovered that this data can be generated very precisely on the basis of OSM and the parking space analysis was therefore initially a little "tech demo" of how something like this can work on the basis of geodata. The response was great, some local initiatives use the data for political argumentation and planning and even two engineering companies, which do such data collection professionally, had questions, as they apparently do not yet work in such a "modern" way ;) Lastly: Regarding A/B Street developments, I am always really impressed... "This is frankly the coolest thing I have seen in a long time" actually expresses pretty exactly what I feel when I see it ;) By the way, I love the Streetmix-like Road Editor approach - I've been dreaming of something like that for a very long time! It's also nice to see that the cycleway:separation scheme is taken into account ;) |
(Sorry for the slow response)
No need to be humble here -- even if you feel like a GIS beginner and this work would be hard to replicate elsewhere, it's still a fantastic map. I consider it a gold standard to build towards in more areas. I'm slowly puzzling through some ideas how to generalize the approach with less effort and in places without carriageway area data. But actually, I was inspired to dig through Seattle's open data portal again, and found that there is pavement edge data (links here): I think I've come across a few other examples of this in the US before. If the license is usable and we could devise some heuristic for chopping up the white negative space there into distinct road and junction polygons, then possibly we could propose importing these as Another idea: integrate A/B Street's intersection geometry algorithm as a plugin to ID and JOSM. Then somebody can click a road center-line tagged in OSM, invoke the plugin, and auto-generate polygons for the road and junction. The result will be pretty bad in complex situations, but decent for many cases. The plugin could have a slider to adjust things like road width to match it to satellite easily. This could be another way to seed an area with more detailed area polygons.
A lesson that I constantly forget is that automating GIS data is never a complete solution; cleaning things up manually is always necessary. I don't how many hours I've cumulatively spent trying to tune geometry algorithms to work well in a pretty small chunk of a city that I'm interested in. At some point, it feels like it'd be much more effective to instead develop simple plugins to more easily map highway areas in ID/JOSM. If the UI is easy and responsive, then drawing more detail against satellite -- in cases where tree cover doesn't make it impossible -- seems more plausible.
I've seen similar debates in US cities. I'm curious, have you attempted to measure parking spaces associated with private buildings? Not just big commercial parking garages (though I don't remember seeing many of those in Berlin...), but the few spots tucked away behind an apartment building. Quantifying the number of spots is pretty hard, since people can get creative with packing vehicles into the space. But... somehow at least mapping the physical space would be interesting. But of course, much tougher than public street parking. |
behind seems relatively easy but time consuming with decent aerial imagery (as in case of such areas getting turned into parkings they tend to eliminate any trees). And street parking mapping is also really, really time consuming anyway. Underground parkings are much trickier. |
The "private" parking spaces are also included in the evaluation to a (probably) very large extent. Some can be seen from the public space ("behind the fence"), others only become "visible" on aerial images. In Berlin, we are lucky that the city provides very good aerial images as OpenData every year, so that you can look under almost every tree using the images from different years ;) "Informal" parking spaces are not included in the analysis (as far as they are distinguishable from the official ones from remote). |
I've used
./importer --oneshot=/
with the binary version and this (extracted) OSM file: http://download.geofabrik.de/europe/germany/berlin-latest.osm.bz2The importer crashes with
Unknown turn restriction no_entry
:The text was updated successfully, but these errors were encountered: