Skip to content

Extracting specific tags

Christine White edited this page Nov 3, 2013 · 2 revisions

When you download data from OSM using the ArcGIS Editor for OSM tools, you may find that certain information captured in the OSM tags is not downloaded with the features. This is because only information that is used for categorizing and symbolizing the data is downloaded automatically; if all the tag information was downloaded, the result would be an unwieldy attribute table with hundreds of columns, with most of the values being 'Null'.

If in your workflows you are always interested in a specific tag value, you should update the 'Download, Extract, and Symbolize OSM Data' model to include that tag.

Table of Contents

How to Update the Model to Extract Specific Tags

Follow the steps here to see how to update the 'Download, Extract, and Symbolize OSM Data' model. In our example, we will update the model to extract the 'name' field field.

Step 1: Launch ArcMap

Note, you will need to launch ArcMap as an Administrator in order to edit the model, if you are using Windows 7.

Step 2: Open the Model in Edit Mode

Once you've launched ArcMap, go to the ArcCatalog window and open the OpenStreetMap toolbox. Find the Download, Extract, and Symbolize OSM Data' Model in the toolbox, and right click on it. Select "Edit" from the menu. The model builder window should open with the model shown as below.

.

Step 3: Edit the OSM Attribute Selector Processes

In the model, you will notice a blue circle near the left side that reads "Extract OSM". Connected to it are three instances of the 'OSM Attribute Selector' process. Each instance operates on a different type of feature - one for the points, one for the lines, one for the polygons. You will need to edit each of these three instances. To edit, double click on the instance. An interface like the following will appear:

In this tool interface, click in the 'Select OSM Tag Keys' field. Here, type in the name of the tag you want to extract (note, the dropdown will not be helpful here; you must type the name). In our example, we type "name", for the OSM 'name' tag. After typing in the tag name, click the plus sign just below the dropdown. This adds your tag value to the list. Note, the default "ALL" is already listed there; that is okay, just leave it there. Also, you can choose additional tags to extract if desired, using this same process of typing the tag name in the field and adding it with the plus button.

Now click 'OK'. Repeat this process for the other two instances of the 'OSM Attribute Selector' process.

Step 4: Save the Model

After you've edited the 'OSM Attribute Selector' processes, click the Save button at the upper left corner of the model. After saving, you can close the model. Note, with this small change, you don't have to run the "Validate" tools to validate your model.

Step 5: Test

To test, you must make sure you check the "Extract OSM tags into Standalone Attributes" box when you run the Download, Extract, and Symbolize OSM Data model. This extracts the tags that you had listed in the OSM Attribute Selector processes in your model. After the data is downloaded, you should be able to see the information corresponding to your tag in the Attribute tables for each layer in the table of contents.


Back to Documentation