Geocode services

Many popular Web applications allow a user to type in an address and receive a map with the geocoded result. The server, which contains the street data and the GIS software, does the work of finding the address and sends the result back to the client. Using ArcGIS Server, you can publish a geocoding service that provides this kind of address matching on the server.

To publish a geocode service, you first need to create an address locator in ArcGIS Desktop. Then, use Manager to publish the locator as a service. Once you have created the service, you can use Manager or the developer tools included with ArcGIS Server to create a client application that uses the geocode service.

Creating the address locator

The address locator is the main tool for geocoding in ArcGIS, and contains all of the data necessary to perform address matching. You can use ArcCatalog to create an address locator. For step-by-step instructions, refer to the topic Creating an Address Locator in the ArcGIS Desktop Help.

The locator you create should reside in a shared network directory so that all server object container (SOC) machines can access it. Additionally, the ArcGIS Server Object Container account must have appropriate permissions to access the directory where the locator is stored.

Publishing the address locator

After you have created and saved the address locator you can publish it as a geocode service by following the steps in  Publishing a GIS resource to the server. When prompted to specify the resource, browse to the locator you want to publish. Valid formats are locator files (.loc), ArcView 3 address locators (.mxs), ArcSDE address locators, personal geodatabase locators, and file geodatabase locators.

Tip: If you're using Manager to publish an ArcSDE locator, first copy your SDE connection file into a shared folder to which all SOC machines have access. The SDE connection file is created when you add a spatial database connection in ArcCatalog. It contains all of the connection information to the geodatabase. The file is suffixed .sde and is stored by default in your profile directory (often C:\Documents and Settings\myUserName\Application Data\ESRI\ArcCatalog). Once you've copied the .sde file into a shared directory, you will then be able to browse to the locator in Manager.

Using the geocode service

The Web ADF contains a Find Address task which you can add to a Web application to help users locate an address. The Find Address task makes use of a geocode service that you provide. You first add the Find Address task to your application, then select the geocode service that the task will use. Both Manager and all supported IDEs allow for configuration of the Find Address task.

If you're not using a geocode service as part of the Find Address task, you will need to consume it programmatically. The application needs to have an interface that receives addresses as inputs, and returns coordinates or maps of geocoded points to the users. Additionally, the application may perform some type of geoprocessing using the geocoded addresses. For example, you may want to select and clip features based on their proximity to a geocoded point.

The Web ADF and the ArcGIS Server API provide controls and classes for consuming geocode services. You can find documentation and samples for consuming geocode services in the Developer Help.