This document is archived and information here might be outdated.  Recommended version.


Working with locators and locator styles (ArcObjects .NET 10.6 SDK)
ArcObjects Help for .NET developers > Developing with ArcGIS > Learning ArcObjects > Spatial query and analysis > Geocoding > Working with locators and locator styles (ArcObjects .NET 10.6 SDK)

Working with locators and locator styles


Summary
A locator is an object that you can use to convert textual descriptions of locations into geographic features. Locators define the input, output, logic, and one or more reference datasets that are used to find locations. The most common locator is an address locator, which you can use to geocode addresses.
A locator style is a template for creating a locator. Each locator style class supports the required interfaces to specify the reference data and geocoding options for a locator object.

In this topic


Using ILocatorWorkspace

Use the ILocatorWorkspace interface to manage locators and locator styles in a locator workspace. Use this interface to retrieve locator and locator styles from the locator workspace and create, modify, and delete locators contained in the workspace.

Retrieving locators

Use GetLocator to retrieve a locator by name from a locator workspace. The Locators property returns an enumeration of the locators in the workspace. The LocatorNames property returns an enumeration of locator names representing the locators in the locator workspace.

Retrieving locator styles

Use GetLocatorStyle to retrieve locator styles by name from a locator workspace. The Locators property returns an enumeration of the locators in a workspace. The LocatorNames property returns an enumeration of locator names representing the locators in the locator workspace.

Adding locators to workspaces

Use AddLocator to add a locator to the locator workspace.

Creating locators

To create a locator, a developer does the following:
  • Retrieves the LocatorStyle on which the new locator will be based from a LocatorWorkspace
  • Specifies all properties on the style as required to define the new locator
  • Stores the modified LocatorStyle in the LocatorWorkspace using the AddLocator method on the ILocatorWorkspace interface

    For more information, see Creating an address locator.

Deleting locators or locator styles from workspaces

Use DeleteLocator to remove a locator or locator style from the workspace.

Rebuilding locators

Use RebuildLocator to rebuild an address locator, particularly if the reference data was modified.

Categorizing locators

Some methods require you to pass a locator category as a parameter. Address locators and address locator styles used with ArcGIS have an Address category.






Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS Desktop Basic ArcGIS Desktop Basic
ArcGIS Desktop Standard ArcGIS Desktop Standard
ArcGIS Desktop Advanced ArcGIS Desktop Advanced