How to standardize an address

In this topic

Standardizing an address

Locators and locator styles support the ISimpleStandardization interface, which can be used to standardize single addresses, or tables and feature classes containing address information. The most common usage for this interface is to use the SimpleStandardizeTable method to standardize the address information in a feature class that will be used as reference data for a locator.
It is a good idea to standardize the address information in reference data feature classes so that address locators that were created using those reference data feature classes, standardize addresses in the same way that they are standardized in the reference data.
The InputTable parameter is a reference to the table or feature class containing the address information that you want to standardize.
The inputFieldsToConcatenate parameter is a comma-delimited string containing the names of the fields in the input dataset that when concatenated, form an address that can be standardized.
This set of field names should include a numeric field that can represent a house number.

Standardizing a dataset

When standardizing a dataset, you must create the table or feature class that contains the standardized records and pass it to the SimpleStandardizeTable method using the OutputTable parameter. At a minimum, the standardized dataset must contain an ObjectID field and all the standardization fields defined by the SimpleStandardizeFields property. It is also a good idea to create a shape field in the output dataset (that is, create an output feature class) if you are standardizing the address information in a feature class and to copy the shapes from the input feature class to the output feature class.
The outputFieldNames parameter is a comma-delimited string that contains the names of the standardization fields in the standardized dataset. The names of the fields in this string must be specified in the same order as the field objects in the fields collection returned by the SimpleStandardizeFields property.
The fieldsToCopy parameter is a PropertySet defining the fields from the input dataset to copy to the output dataset. The names of the properties are the names of the fields in the output dataset, and the names of the properties are the names of the corresponding fields in the input dataset.
The following code example shows how to standardize the address information in a feature class using the ISimpleStandardization interface:
// Open an ArcSDE workspace.
IPropertySet connProperties = new PropertySet();
connProperties.setProperty("server", "mendota");
connProperties.setProperty("instance", "esri_sde");
connProperties.setProperty("database", "arcobjects");
connProperties.setProperty("user", "sde");
connProperties.setProperty("password", "sde");
connProperties.setProperty("version", "SDE.Default");
IWorkspaceFactory factory = new SdeWorkspaceFactory();
IFeatureWorkspace featureWorkspace = new IFeatureWorkspaceProxy(
    (connProperties, 0));

// Open the feature class to standardize.
IFeatureClass featureClass = featureWorkspace.openFeatureClass(

// Get the locator style to use to standardize the feature class.
ILocatorManager locatorManager = new LocatorManager();
ILocatorWorkspace locatorWorkspace = locatorManager.getLocatorWorkspace(new
ISimpleStandardization simpleStdzation = new ISimpleStandardizationProxy
    (locatorWorkspace.getLocatorStyle("US Address - Dual Ranges"));

// Create the feature class in which to write the standardization results.
// The feature class must contain an ObjectID field, a shape field, and the standardization fields.
IFieldsEdit fieldsEdit = new Fields();
IFieldEdit fieldEdit = new Field();
IFields stdzationFields = simpleStdzation.getSimpleStandardizeFields();
String standardizedFieldNames = "";

for (int i = 0; i < stdzationFields.getFieldCount(); i++){
    standardizedFieldNames += (stdzationFields.getField(i).getName() + ",");

UID uid = new UID();
IFeatureClass standardizedFeatureClass = featureWorkspace.createFeatureClass(
    "Redlands_Standardized", fieldsEdit, uid, null, esriFeatureType.esriFTSimple,
    featureClass.getShapeFieldName(), "");

// Standardize the feature class.
IPropertySet fieldsToCopy = new PropertySet();
simpleStdzation.simpleStandardizeTable(new ITableProxy(featureClass), 
    "OBJECTID,FULL_NAME", "", new ITableProxy(standardizedFeatureClass),
    standardizedFieldNames, fieldsToCopy, null);

See Also:

Location library overview

Development licensingDeployment licensing
Engine Developer KitEngine
ArcGIS for Desktop BasicArcGIS for Desktop Basic
ArcGIS for Desktop StandardArcGIS for Desktop Standard
ArcGIS for Desktop AdvancedArcGIS for Desktop Advanced