- URL:
- https://<geoanalytics-url>/GeocodeLocations
- Methods:
GET
- Version Introduced:
- 10.6
Description
The Geocode
operation geocodes a table from a big data file share. The task uses a geocode utility service
configured with your portal. If you do not have a geocode utility service configured, talk to your administrator.
Learn more about configuring a locator service.
When preparing to use the Geocode
operation, be sure to review
Best practices for geocoding with GeoAnalytics.
Request parameters
Parameter | Details |
---|---|
| The tabular input that will be geocoded. Syntax: As described in Feature input, this parameter can be one of the following:
REST examples
|
| This includes parameters that help parse the input data as well as the field lengths and a field mapping. This JSON is the output from the AnalyzeGeocodeInput tool available on your server designated to geocode. It is important to inspect the field mapping closely and adjust them accordingly before submitting your job, otherwise your geocoding results may not be accurate. It is recommended that you use the output from AnalyzeGeocodeInput and modify the field mapping instead of constructing this JSON by hand. REST examples
|
| The REST URL of the geocode service that you want to geocode your addresses against. The URL must end in
REST examples
|
| Enter a REST examples
|
| Enter a category for more precise geocoding results, if applicable. Some geocoding services do not support a category, and the available options depend on your geocode service. REST examples
|
| A Boolean value to return the output fields from the geocoding service in the results. To output all
available REST examples
|
| Additional parameters specified to your locator. |
|
The task will create a feature service of the results. You define the name of the service. REST examples
|
| Context contains additional settings that affect task execution. For this task, there are three settings:
|
|
The response format. The default response format is Values: |
Example usage
Below is a sample request URL for Geocode
:
https://hostname.domain.com/webadaptor/rest/services/System/GeoAnalyticsTools/GPServer/GeocodeLocations/submitJob?inputLayer={"url": "https://myportal.domain.com/server/rest/services/Hosted/hurricaneTrack/FeatureServer/0", "filter": "Month = 'September'"}&geocodeParameters={"field_info": "[('ObjectID', 'TEXT', 255), ('SingleLine', 'TEXT', 255), ('Address', 'TEXT', 255), ('Region', 'TEXT', 255), ('Postal', 'TEXT', 255), ('PostalExt', 'TEXT', 255), ('Country', 'TEXT', 255), ('Source', 'TEXT', 255)]", "column_names": "", "file_type": "csv", "column_delimiter": ",", "text_qualifier": "", "field_mapping": "[['ObjectID', 'OBJECTID'], ['SingleLine', 'SingleLine'], ['Address', 'Address'], ['Region', 'Region'], ['Postal', 'Postal'], ['PostalExt', 'PostalExt'], ['Country', ''], ['Source', '']]", "header_row_exists": true}&geocodeServiceURL={"url": "https://mymachine.mydomain.com/server/rest/services/my_locator/GeocodeServer"}&outputName=myOutput&f=json
Response
When you submit a request, the service assigns a unique job ID for the transaction.
Syntax:
{
"jobId": "<unique job identifier>",
"jobStatus": "<job status>"
}
After the initial request is submitted, you can use job
to periodically check the status of the job and messages as described in Check job status. Once the job has successfully completed, use job
to retrieve the results. To track the status, you can make a request of the following form:
https://<analysis url>/GeocodeLocations/jobs/<jobId>
Access results
When the status of the job request is esri
, you can access the results of the analysis by making a request of the following form:
https://<analysis-url>/GeocodeLocations/jobs/<jobId>/results/output?token=<your token>&f=json
Response | Description |
---|---|
|
The result has properties for parameter name, data type, and value. The contents of
See Feature output for more information about how the result layer is accessed. |