Download Data from OSM

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.

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. 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 (version 2.0 and higher only). 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. 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
At version 2.0 and higher, there are separate tools for downloading data to a PostgreSQL SDE repository. See PostgreSQL Note 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 WGS 1984. The data frame must use this coordinate system for the tool to work. 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 the ArcCatalog window, browse to the directory where you installed ArcGIS Editor for OpenStreetMap (e.g., C:\Program Files\ESRI\OSMEditor) and the data folder. 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

Last edited Feb 13, 2013 at 7:10 PM by eggwhites, version 14

Comments

Kluichnikov Apr 24, 2013 at 10:13 AM 
I also got the error 000816 today, as well as Chandeepc. I tried to do something in ArcGIS 10.1 for Desktop along with ArcGIS Editor for OpenStreetMap 2.1.

chandeepc Sep 6, 2012 at 5:39 AM 
I get an error 000816 when I run the following from arcmap - arcpy.DownloadExtractSymbolizeOSMData2_osmtools("16206909.7325744 -1961894.71364018 16207292.7177154 -1961598.04898435","false","P:/2012/237_MalandaShowGrounds/Working/external/osm_malandashowgrounds_zone","OSM Group Layer")

I am in 10.1

robertcolombo May 4, 2012 at 10:50 AM 
is this version really functional with the latest service pack (may 2012) from ArcGIS? is there any specific format to import for the geodatabase to import OSM data? Is there any limitation to get the data, with the Ports on when using a network connection?
It is frustrating not being able to get the data.