• Home
  • About

GIScience News Blog

News of Heidelberg University’s GIScience Research Group.

Feed on
Posts
Comments
« HeiGIT support for Forecast-based Financing feature around open data initiatives for anticipatory action
OSMlanduse European Union validation effort »

How to become ohsome part 8 - complex analysis with the magical filter parameter

Oct 2nd, 2020 by Katharina Przybill

It’s CITY CYCLING time – some of you may even be involved in your municipality - a good opportunity to have a look on the OpenStreetMap (OSM) cycling ways in our city Heidelberg.

Welcome to part 8 of our how to become ohsome blog post series. This time we will show you how to set up a more complex filter with several OR and AND combinations for the ohsome API to get the length of the mapped cycling ways in OSM. Like in part 4 of our series, we will again show you in a Jupyter Notebook how you can use Python to make this nice complex ohsome query and visualization in one go.

The idea is to analyse the mapped cycle ways in Heidelberg in OSM. Therefore we need to have a look on how cycling infrastructure is mapped in OSM. To set up the filter, we want to know which tags do we need to extract all the cycle lanes, ways and roads. There is more than one way to tag cycle ways, lanes or paths in OSM, described for example on this OSM wiki page. Instead of requesting every possible tag by itself, all combinations of tags that can be used to define a cycle way within OSM can be requested at once using our new filter parameter. This also prevents ways being counted twice, which might have several of these tags associated with them.

Our tag combination is based on Hochmair, Zielstra, and Neis’s paper Assessing the completeness of bicycle trails and designated lane features in OpenStreetMap for the United States and Europe. In their study they explored the cycling features in the United States and Europe. We take their filter combination and extend it with tags of the German cycling infrastructure mapping methods listed on the corresponding OSM wiki page. After a pre-query for each of the tag combinations we found out that for some of them no data was available for the region of Heidelberg, so we excluded them. As a result we got a filter that consists of 25 different tag combinations.

The final filter looks like following:

type:way and (
(bicycle=use_sidepath) or
(cycleway=opposite and oneway:bicycle=no) or
(sidewalk:right:bicycle=yes) or
(cycleway:right=shared_lane) or
(cycleway:left=track) or
(cycleway:right=track) or
(highway=track and bicycle=designated and motor_vehicle=no) or
(highway=path and bicycle=yes) or
(highway=path and (bicycle=designated or bicycle=official)) or
(highway=service and (bicycle=designated or motor_vehicle=no)) or
(highway=pedestrian and (bicycle=yes or bicycle=official)) or
(highway=footway and (bicycle=yes or bicycle=official)) or
(highway=cycleway) or
(cycleway in (lane, opposite_lane, shared_busway, track, opposite_track)) or
(cycleway:left in (lane, shared_busway)) or
(cycleway:right in (lane, shared_busway)) or
(cycleway:both=lane) or
(bicycle_road=yes and (motor_vehicle=no or  bicycle=designated)) or
(cyclestreet=yes)
)
For the city of Heidelberg we get a cycleway length of about 167 km of mapped cycle infrastructure in OSM. Here you see the evolution of the length of the mapped cycle ways in Heidelberg from end of 2008 until middle of 2020:

The official number given by the city of Heidelberg of cycle path network is about 480 kilometers, which is almost 3 times as many kilometers as there are in OSM. The difference may be due to the fact that there are some side roads that have an extra lane, others do not, or that sometimes a appropriate tag is really missing in OSM. In addition, in the explanation of the cycle road map for Heidelberg, the city’s network includes normal roads which have signposted cycle routes running through to neighbouring communities such as Leimen, Eppelheim, Dossenheim and Edingen.

We can also take a spatial look at the current expansion of the cycle path network. For this we use the same filter as above but in the data extraction endpoint of the ohsome API. A snippet of the request can be found here.

The following map shows an extract of that data as it was by the end of June 2020 displayed on parts of the city of Heidelberg.

So if you are interested in the mapped cycling infrastructure in OSM in your city, just change the bounding box geojson in the code and find it out (Lächeln).  The complete Jupyter Notebook with all the code and explanations can be found here.

If you want to know more about our ohsome framework, don’t hesitate to reach out to us via info(at)heigit.org or contact any member of our team directly. Stay ohsome and happy cycling!

Information on the ohsome OpenStreetMap History Data Analytics Platform and more examples of how to use the ohsome API can be found here:

  • ohsome general idea
  • ohsome general architecture
  • the whole “how to become ohsome” tutorials series
  • filter subpage of our new documentation page
  • Scientific article on OSHDB
  • OSHDB and ohsome API git repositories
  • For some recent work that has been accomplished using this framework see for example Analyzing the spatio-temporal patterns and impacts of large-scale data production events in OpenStreetMap In: Minghini, M., Grinberger, A.Y., Juhász, L., Yeboah, G., Mooney, P. (Eds.). Proc. of the Academic Track at the State of the Map 2019, 9-10. Heidelberg
    or Auer, M.; Eckle, M.; Fendrich, S.; Griesbaum, L.; Kowatsch, F.; Marx, S.; Raifer, M.; Schott, M.; Troilo, R.; Zipf, A. (2018): Towards Using the Potential of OpenStreetMap History for Disaster Activation Monitoring. ISCRAM 2018. Rochester. NY. US.
    or Wu, Zhaoyan, Li, Hao, & Zipf, Alexander. (2020). From Historical OpenStreetMap data to customized training samples for geospatial machine learning. In proceedings of the Academic Track at the State of the Map 2020 Online Conference, July 4-5 2020. DOI: http://doi.org/10.5281/zenodo.3923040
    or
    Ludwig, C., Fendrich, S., Zipf, A. (2020 accepted): Regional Variations of Context-based AssociationRules in OpenStreetMap. Transactions in GIS DOI: 10.1111/tgis.12694

Tags: become-ohsome, heigit, intrinsic quality analysis, ohsome, ohsome example, Open Source, OpenSteetMap, OSM, OSM History Analytics

Posted in OSM, Services, Software

Comments are closed.

  • About

    GIScience News Blog
    News of Heidelberg University’s GIScience Research Group.
    There are 1,679 Posts and 0 Comments so far.

  • Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
  • Recent Posts

    • High Resolution Data Insights from OpenStreetMap Element Vectorisation
    • Data publication: Point clouds of snow-on and snow-off forest site
    • Job Offer: Deep Learning Engineer (m/f/d, up to 100%)
    • GIScience Postdoc/Senior Researcher Opportunity for OpenStreetMap Road Quality Analysis
    • Assessing road criticality and loss of healthcare accessibility during floods: the case of Cyclone Idai, Mozambique 2019
  • Tags

    3D 3DGEO Big Spatial Data CAP4Access Citizen Science Conference crisis mapping Crowdsourcing data quality deep learning disaster DisasterMapping GeoNet.MRN GIScience heigit HOT humanitarian humanitarian mapping Humanitarian OpenStreetMap team intrinsic quality analysis landuse laser scanning Lidar machine-learning Mapathon MapSwipe MissingMaps Missing Maps ohsome ohsome example Open data openrouteservice OpenStreetMap OSM OSM History Analytics Public Health Quality quality analysis remote sensing routing social media spatial analysis Teaching VGI Workshop
  • Archives

    • February 2023
    • January 2023
    • December 2022
    • November 2022
    • October 2022
    • September 2022
    • August 2022
    • July 2022
    • June 2022
    • May 2022
    • April 2022
    • March 2022
    • February 2022
    • January 2022
    • December 2021
    • November 2021
    • October 2021
    • September 2021
    • August 2021
    • July 2021
    • June 2021
    • May 2021
    • April 2021
    • March 2021
    • February 2021
    • January 2021
    • December 2020
    • November 2020
    • October 2020
    • September 2020
    • August 2020
    • July 2020
    • June 2020
    • May 2020
    • April 2020
    • March 2020
    • February 2020
    • January 2020
    • December 2019
    • November 2019
    • October 2019
    • September 2019
    • August 2019
    • July 2019
    • June 2019
    • May 2019
    • April 2019
    • March 2019
    • February 2019
    • January 2019
    • December 2018
    • November 2018
    • October 2018
    • September 2018
    • August 2018
    • July 2018
    • June 2018
    • May 2018
    • April 2018
    • March 2018
    • February 2018
    • January 2018
    • December 2017
    • November 2017
    • October 2017
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • April 2017
    • March 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016
    • July 2016
    • June 2016
    • May 2016
    • April 2016
    • March 2016
    • February 2016
    • January 2016
    • December 2015
    • November 2015
    • October 2015
    • September 2015
    • August 2015
    • July 2015
    • June 2015
    • May 2015
    • April 2015
    • March 2015
    • February 2015
    • January 2015
    • December 2014
    • November 2014
    • October 2014
    • September 2014
    • August 2014
    • July 2014
    • June 2014
    • May 2014
    • April 2014
    • March 2014
    • February 2014
    • January 2014
    • December 2013
    • November 2013
    • October 2013
    • September 2013
    • August 2013
    • July 2013
    • June 2013
    • May 2013
    • April 2013
  •  

    October 2020
    M T W T F S S
    « Sep   Nov »
     1234
    567891011
    12131415161718
    19202122232425
    262728293031  
  • Recent Comments

    GIScience News Blog CC by-nc-sa Some Rights Reserved.

    Free WordPress Themes | Fresh WordPress Themes