Skip to content

Download data from osm

Kuba Szostak edited this page Oct 6, 2020 · 5 revisions

There are two ways to download data from OSM, and they result in different formats of the OSM data. The Download OSM Data (XAPI) tool will download data from OSM and convert it into an .osm file (known as a 'planet' file). To use the .osm file in ArcMap, you must then run the ‘Load OSM File’ tool to translate it into a feature dataset. The Download and Symbolize OSM Data tool downloads the data from OSM into a feature dataset, ready to use in ArcMap. Both tools are described in this topic.

Use the Download, Extract and Symbolize tool to download OSM data

  1. OpenStreetMap has limits on how much data you can download at once. Also, downloaded data for a large extent can take time. For your first edit, focus on a smaller area such as your neighborhood or hometown.
  2. Add a basemap or reference data so you can define your current location in the ArcMap interface.
  3. Once you have located your area of interest, zoom in to a level where you will easily be able to identify streets and buildings.
  4. Verify that you've checked the "Add results of geoprocessing options to the display" checkbox and unchecked the "Enable Background Processing" checkbox in your Geoprocessing tab's Geoprocessing Options window.
  5. In the ArcCatalog window, expand the "System Toolboxes", and then expand the OpenStreetMap toolbox. Doubleclick on the Download, Extract, and Symbolize OSM Data model. This model allows you to download the data, optionally extract specific tags, and prepare it for the editing environment in one step, using additional scripting models (e.g., Symbolize Points, Symbolize Lines, Symbolize Polygons, and Symbolize OSM Data) to apply edit templates and group the layers according to the geometry type and map features. Enter the parameters for the model as specified below:
    • In the 'Extent of data download' input field, select 'Same as Display'.
    • If you want to extract tag values (e.g., see http://wiki.openstreetmap.org/wiki/Tags) into the resulting attribute table, select the "Extract OSM Tags into Standalone Attributes" option. Note: if you'd like to customize the information that is extracted - e.g., a specific tag like 'name - then see the Extracting Specific Tags topic.
    • In the 'Target Feature Dataset', browse to the location of your default geodatabase, and then append the name of the new feature dataset that will be created when the model is run.
    • In the 'OSM Group Layer', you can leave the default value or give the group layer a different name.
    • After entering the parameters, click OK. The model will begin to run. After it is completed, the downloaded OpenStreetMap data will be added as fully symbolized layers into the data frame.
The result of this tool is that data from OSM has been translated into a feature dataset with two accompanying tables (relation table and revision table). The points, lines, and polygons of the feature dataset have been added to your ArcMap table of contents. The accompanying tables are not necessary for you to view or edit, but are used by the software for maintaining OSM relation information and tracking the edits you make to the downloaded data. For more information on the resulting feature dataset, see Details on the OSM Feature Dataset.

Now you can use the downloaded OSM data just like any other data in ArcMap. See the Edit OSM Data and Upload to OSM topic if you want to edit the data and upload it back to OpenStreetMap.

Note There are separate tools for downloading data to a PostgreSQL SDE repository. See Tools#postgresNote for details.

Use the Download OSM Data (XAPI) tool to download OSM data

The Download OSM Data (XAPI) tool will download data from an OSM xapi endpoint and convert it into an .osm file (known as a planet file). It is possible to filter what features are downloaded from the endpoint. To use the tool, follow the steps below.

  1. Add a basemap or reference data to your ArcMap document so you can define the area that you want to download.
  2. Once you have located your area of interest, zoom in so the area you see in the ArcMap interface is the area you'd like to download. Note that the larger extent you choose, the longer the download time will be.
  3. Verify that the Coordinate System of your Data Frame is set to Geographic (not Projected) WGS 1984. The data frame must use this coordinate system for the tool to work, as this is the coordinate system for the XAPI OSM data. To set the Data Frame coordinate system, right click on the Data Frame in ArcMap (typically, the top most item in the Table of Contents, usually called "Layers" by default), and select "Properties". When the Data Frame Properties window opens, select the "Coordinate System" tab. At the top of the Coordinate System interface, click the "clear" button to clear the existing Coordinate System. In the second half of the window in the Select a Coordinate System section, browse to the "Predefined" folder, select "Geographic Coordinate Systems", then select "World", and within that folder select the "WGS 1984" option. Then click OK.
  4. In your ArcGIS Editor for OpenStreetMap toolbox, doubleclick on the Download OSM Data (XAPI) model. This model allows you to download the data in a .osm format. Enter the parameters for the model as specified below:
    • In the 'Download URL' field, you can use any OSM XAPI endpoint. If the default one is not responding, you can designate a different server. A list of xapi servers is available at http://wiki.openstreetmap.org/wiki/Xapi#jXAPI. When entering in a different server endpoint, the trailing forward slash must be present (e.g., http://open.mapquestapi.com/xapi/api/0.6/ note the forward slash after '0.6').
    • In the 'Extent of data download' input field, select 'Same as Display'.
    • In the 'Download File Location', browse to the directory where you'd like the .osm file to be written and give the file a name with the '.osm' extension.
    • In the 'predicate' field, you can leave it blank or restrict your download to certain features. It is useful to restrict the features that are downloaded especially if you are downloading a large extent. For example amenity=hospital would retrieve only features where the amenity attribute is set to hospital.
    • Click OK, and the script should begin to run.
After the script finishes running, you should have a .osm file downloaded to your designated file location. It will not be added to the user interface because ArcMap does not natively support .osm files. If you want to load the .osm file in ArcMap for use or editing, use the Load OSM File tool, which will load the newly created .osm file into the map document as a feature dataset.
Previous topic: Documentation

Next topic: Edit OSM Data and Upload to OSM