0

I am wanting to extract bus routes from OpenStreetMap to use as shapefiles in ArcGIS.

Is there a simple way to go about this?

As i am trying to extract them directly from OSM however i keep getting the error message:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

enter image description here

enter image description here

2 Answers 2

1

don't worry about that error message; this is perfectly valid XML. (If it wasn't valid you wouldn't see the data, just an error message in the browser).

It's in the standard OSM XML format, which you might need to convert to something more suitable for ArcGIS.

You'll probably find it easier to use OverpassTurbo, this allows you to export in a number of different formats including KML and GeoJSON. You should be able to import these into ArcGIS and save out to a shapefile if you want.

It's been a long time since I used this tool, but I know it IS possible to extract a single relation like you have here, if you have its ID (20850927). See this answer for an example of how to do this.

3
  • I tried the Overpass technique and exported the KML file. However when i went to convert it from KML to layer in ArcGIS it wouldn't work (it just took forever and nothing happened!). I checked the files it was exporting when i was attempting to convert it - and some of the files e.g. polyfile was a lock type. Is this the issue? if so how do i get round this?
    – Alex
    Jan 6, 2019 at 19:55
  • welcome to GIS SE! Afraid i'm not familiar with ArcGIS, just QGIS. That sounds like a separate issue - try searching for 'arcgis kml' on GIS SE, if that doesn't help maybe ask a new question?
    – Steven Kay
    Jan 6, 2019 at 20:15
  • Would you be able to help me in doing this? I would be extremely grateful! I just need all the bus routes in London.
    – Alex
    Jan 7, 2019 at 13:29
1

Steps to get bus routes in ArcMap:

  • Download a compressed OSM XML file for your region from Geofabrik (you need to select the files with *.osm.bz2 for download), or use some other tool create an appropriate file of the same format.

  • Unzip the bz2 file using an appropriate tool, e.g. 7-ZIP.

  • Download the ArcGIS Editor for OpenStreetMap toolbox for ArcMap and install it. NOTE: this tool is not yet available for ArcGIS Pro (and unfortunately likely never will as ESRI seems reluctant to convert it). Run the Load OSM File tool or the multi-cpu OSM File Loader (Load only) tool to import the data as a File Geodatabase. Additionally specify extra OSM keys to extract if desired (e.g. ref/network/operator etc.).

  • You can also use the OSM Attribute Selector tool of the same toolbox after the import to add extra fields / columns with the required keys, if you are missing some field. ESRI implemented a kind of key/value storage similar to PostgreSQL hstore, that the OSM Attribute Selector uses to extract keys from.
  • The tool by default creates route relations as long line string elements / records in the Polyline table of the output of the import tools. The column route tells you what type of route it is (e.g. ferry/bus etc.).

Here is an example of the Isle of Man with all bus routes: OSM bus routes Isle of Man

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.