Skip To Content

Geocode Locations from Table

Geocode Locations from Table The Geocode Locations from Table tool is a convenient way to geocode large tables of addresses into points. The output is a feature layer in your ArcGIS Enterprise portal contents that can be used for analysis in ArcGIS Enterprise, ArcGIS Desktop, or other products. Geocode Locations from Table creates an item in your contents containing the geocoded data.

Workflow diagram

Geocode Locations from Table workflow diagram

Analysis using GeoAnalytics Tools

Analysis using GeoAnalytics Tools is run using distributed processing across multiple ArcGIS GeoAnalytics Server machines and cores. GeoAnalytics Tools and standard feature analysis tools in ArcGIS Enterprise have different parameters and capabilities. To learn more about these differences, see Feature analysis tool differences.

Examples

A national chain has multiple CSV files, each containing addresses of 100,000 transactions. The marketing director wants to know where the transactions are densely concentrated to determine where to locate new stores. The GIS analyst could use Geocode Locations from Table to geocode the 100,000 addresses. Once the feature layer has been geocoded, the analyst could then use the tool to find areas that would support another store.

Usage notes

When preparing to use the Geocode Locations From Table tool review Best Practices for geocoding with ArcGIS GeoAnalytics Server.

The Geocode Locations from Table tool requires a tabular input. You can use a tabular dataset from a big data file share, or a tabular layer in a feature service with at least one table or file. If you do not have any tables, CSV files, or XLS files in Content, the tool will be unavailable. You can add files to Content using the Add Item button.

Note:

You cannot upload a CSV file or XLS file to be geocoded by ArcGIS GeoAnalytics Server. Use the standard tool Geocode Locations from Table if you want to upload a dataset to be geocoded. To learn more about the tool, see Geocode Locations from Table.

The Country option only appears when the ArcGIS World Geocoder is selected. Using theArcGIS World Geocoder with the Geocode Locations from Table tool consumes credits.

If the input data is all in one field, click Single Field. If the table has multiple data fields that all contain different address information, click Multiple Fields.

Any features that are not matched in the geocoding process will be included in the output without a geometry.

You can choose to return additional geocoding fields that are provided by the locator. If you do not return these fields, your results will include the following:

  • Your original input data
  • Point geometry of geocoded locations
  • A new object ID field, as well as a globalid field if you store results in the spatiotemporal data store

If you decide to return the additional geocoding information, you will have additional fields returned. To see a sample of fields that may be returned by your locator, see Service output.

Limitations

How Geocode Locations from Table works

Locators must be configured for batch geocoding

For a locator to appear in the list of available locators, the locator must be configured for batch geocoding. The locator should be configured as follows:

  • The locator must be a portal utility service.
  • The locator should have the numThreads property configured on the locator service. The numThreads property is not required, but it may speed up the analysis job.

ArcGIS API for Python example

The Geocode Locations From Table tool is available through ArcGIS API for Python.

This example geocodes a big data file share of mailing addresses in the Northwest United States.

# Import the required ArcGIS API for Python modules
import arcgis
from arcgis.gis import GIS
from arcgis.geoanalytics import find_locations

# Connect to your ArcGIS Enterprise portal and confirm that GeoAnalytics is supported
portal = GIS("https://myportal.domain.com/portal", "gis_publisher", "my_password", verify_cert=False)
if not portal.geoanalytics.is_supported():
    print("Quitting, GeoAnalytics is not supported")
    exit(1)   

# Find the big data file share dataset you'll use for analysis
search_result = portal.content.search("", "Big Data File Share")

# Look through the search results for a big data file share with the matching name
bdfs_search = next(x for x in search_result if x.title == "bigDataFileShares_MailingAddresses")

# Look through the big data file share for the dataset containing Northwest addresses
NW_addresses = next(x for x in bdfs_search.layers if x.properties.name == "NorthWest")
geocode_server = "https://mymachine.domain.com/server/rest/services/USALocator/GeocodeServer"

geo_parameters =  {"field_info": "[[\"OBJECTID\", \"TEXT\", 255], [\"Street\", \"TEXT\", 255], [\"City\", \"TEXT\", 255], [\"State\", \"TEXT\", 255], [\"ZIP\", \"TEXT\", 255]]",
                   "column_names": "",
                   "file_type": "table",
                   "column_delimiter": "",
                   "text_qualifier": "",
                   "field_mapping": "[[\"Street\", \"Street\"], [\"City\", \"City\"], [\"State\", \"State\"], [\"ZIP\", \"ZIP\"]]",
                   "singleline_field": "Single Line Input",
                   "header_row_exists": "true"}

# Geocode the dataset containing written addresses to create corresponding latitude and longitude features
geocode_result = find_locations.geocode_locations(input_layer = NW_addresses, 
                                                  output_name = "geocoded_NW_USA",
                                                  geocode_service = geocode_server,
                                                  geocode_parameters = geo_parameters)


# Visualize the tool results if you are running Python in a Jupyter Notebook
processed_map = portal.map('Western USA', 5)
processed_map.add_layer(geocode_result)
processed_map

Similar tools

Use Geocode Locations from Tables to geocode tabular locations stored in tables in big data file shares and services. Other tools may be useful in solving similar but slightly different problems.

Map Viewer analysis tools

If you would like to geocode a CSV or XLS file, or use the ArcGIS World Geocoder, use the standard tool Geocode Locations from Table.

ArcGIS Desktop analysis tools

The standard tool Geocode Locations from Table is available in ArcGIS Pro.