You cannot use more than one dataset for each primary role, so when building a locator, if you have more than one dataset that you want to assign to the same role, you can combine the data prior to building the locator using the Merge geoprocessing tool. Then you can search against all of your datasets with a single locator. This tutorial also demonstrates how to search by category using POI data.
Download the data
Download the data for this tutorial from arcgis.com.
- Go to the item description web page of the geocoding tutorial data on arcgis.com.
- Click Download, and save the file locally.
- Unzip the downloaded file.
Combine the data
First, combine the datasets to build a locator with a single role.
- Start ArcGIS Pro.
- Create a project from the Map template.
- Right-click Folders in the Catalog pane, and click Add Folder Connection.
- On the Add Folder Connection dialog box, browse to the geocoding tutorial folder and click OK.
- Expand Folders in the Catalog pane, and expand the geocoding tutorial folder that you added in the previous step.
- Expand the Denver geodatabase in the geocoding tutorial folder.
- Drag the Parks feature class from the folder onto the map.
The map zooms to Denver, Colorado, and a polygon layer is visible on the map. The polygon layer is also shown in the Contents pane.
- Drag the Dog_Parks feature class from the folder onto the map.
A new polygon layer is visible on the map. The polygon layer is also shown in the Contents pane
- Drag the Skate_Parks feature class from the folder onto the map.
A new polygon layer is visible on the map. The polygon layer is also shown in the Contents pane.
- In the Geoprocessing pane, type merge in the search box.
If the Geoprocessing pane is not open, on the Analysis tab, click Tools to open the Geoprocessing pane.
- Click the Merge (Data Management) tool to open the tool in the Geoprocessing pane.
- For the Input Datasets parameter, select Parks from the drop-down menu.
A second drop-down menu is available below the first after you select the first layer.
- For the Input Datasets parameter, select Dog_Parks from the drop-down menu.
A third drop-down menu is available below the first after you select the first layer.
- For the Input Datasets parameter, select Skate_Parks from the drop-down menu.
- For the Output Dataset parameter, rename the output dataset Denver_AllParks.
- For the Field Map parameter, keep the default field mapping values.
- Click Run to create the new combined dataset of Denver parks.
The output dataset is created in the project geodatabase by default.
- Browse to the project geodatabase in the Catalog pane, and drag the Denver_AllParks feature class onto the map.
A new polygon layer is visible on the map. The polygon layer is also shown in the Contents pane.
Create a POI locator
Use the new combined dataset to create a POI locator with categories and subcategories.
- Click the Back button to return to the main view of the Geoprocessing pane.
- In the Geoprocessing pane, type create locator in the search box.
If the Geoprocessing pane is not open, on the Analysis tab, click Tools to open the Geoprocessing pane.
- Click the Create Locator tool to open the tool in the Geoprocessing pane.
- In the Create Locator tool, leave the Country or Region parameter as the default value of United States.
- For the Primary Table parameter, select Denver_AllParks from the drop-down menu.
The layer is available in the drop-down menu because it has been added to the map.
- For the Role parameter, select POI from the drop-down menu.
For information about other roles you can use to build locators, see Primary locator roles.
- In the Field Mapping portion of the tool, select the appropriate field from the Alias Name drop-down menu for each relevant field name in the Role: POI section to map the fields.
- Select LOCATION for Place Name.
- Select PARK_TYPE for Place Category.
- Select PARK_CLASS for Place Subcategory.
For more information about the types of values expected for each locator role field, see Locator role fields.
- For the Output Locator parameter, rename the output locator DenverParks.
- Select English from the Language Code drop-down menu.
- Click Run to create the Denver parks POI locator.
A warning message is returned after running the tool, which is expected because administrative zones (city, state, postal code) were not used in Field Mapping. For more details about the warning, click WARNING 003097. The Create Locator tool can show warning or error messages while using or after running the tool. Clicking the warning or error number opens a help topic that provides more details about the message.
The locator is created in the project folder by default and is automatically added to the project. You can use it in the Locate pane, in the Geocode Table pane, and anywhere else you use locators.
Tip:
Since the field mapping in the Create Locator tool can become complex when creating a multirole locator, consider building a model with ModelBuilder to create locators. When you build a model, you can re-create the locator if the reference data changes, if you need to modify the locator by adding custom output fields, or if you want to share how the locator was created with a colleague. Another option for keeping track of the settings used to build the locator is to create the locator with the Create Locator tool once and save the previously executed tool as either a Python script or a geoprocessing package from the History pane on the Geoprocessing tab.
The steps above create a locator based on the POI role that supports searching for points of interest—such as buildings, landmarks, parks, and restaurants—and features such as rivers, bridges, mountains, and so on. This locator can be used to search for various types of parks in Denver, Colorado, using place-names and categories. Using the Locate pane, search for the following by either copying the address into the search box and pressing Enter or typing the place or category in the search box and selecting a suggestion that appears as you type.
Tip:
To disable all other locators in the project before using the Denver parks locator, click the Options button , and uncheck the providers listed except for the Denver parks locator.
- DOGPARK
- SKATEP
- Trail
- Regional
- Echo Lake
- Greenway