Select to view content in your preferred language

Geocoding using the SDK

2105
3
Jump to solution
04-19-2013 11:51 AM
AlexSarracino
New Contributor II
Hello,

The company I currently work for uses ArcGIS Desktop to geocode a bunch of addresses. We want to automate the process a bit, so I was wondering if it was possible to use a class like the locator or the localGeocodeService class with the .loc file we normally to automate this.

Thank you.
0 Kudos
1 Solution

Accepted Solutions
MarkBaird
Esri Regular Contributor
Hi

You should be able to write some basic Java code to extract the contents of a .loc file without too much difficulty.

The SDK has 2 geocode operations which may be of interest to you:

- Geocode - which takes in an address string and returns a geographical point
- Reverse Geocode - which takes a geographic point and returns an address string(s) for the address closest to that point

Both these bits of functionality are available offline (local server) or by using online services.

If you already have the SDK then there is a sample application which demonstrates how the above operations work.

I think you should be able to write a slick batch geocoder if you consider the use the thread pools to speed up the operation.  Geocoding or reverse geocoding large batches in a single thread (one after the other), might be a slow process.

Does this help?

Mark

View solution in original post

0 Kudos
3 Replies
MarkBaird
Esri Regular Contributor
Hi

You should be able to write some basic Java code to extract the contents of a .loc file without too much difficulty.

The SDK has 2 geocode operations which may be of interest to you:

- Geocode - which takes in an address string and returns a geographical point
- Reverse Geocode - which takes a geographic point and returns an address string(s) for the address closest to that point

Both these bits of functionality are available offline (local server) or by using online services.

If you already have the SDK then there is a sample application which demonstrates how the above operations work.

I think you should be able to write a slick batch geocoder if you consider the use the thread pools to speed up the operation.  Geocoding or reverse geocoding large batches in a single thread (one after the other), might be a slow process.

Does this help?

Mark
0 Kudos
EliseAcheson1
Occasional Contributor
Also note that in the same Locator class we have methods for batch geocoding, e.g. in our Javadoc here:

http://resources.arcgis.com/en/help/runtime-java/apiref/com/esri/core/tasks/ags/geocode/Locator.html...

Ultimately those take similar input as the (one at a time) geocoding methods in Locator, so you still have to read in/prepare your data in the same way.

~elise
0 Kudos
AlexSarracino
New Contributor II
Sorry for the late response, but thank you both. The information you gave me really helped.
0 Kudos