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


IAddressGeocoding.MatchTable Method (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Location > ESRI.ArcGIS.Location > Interfaces > IA > IAddressGeocoding Interface > IAddressGeocoding.MatchTable Method
ArcGIS Developer Help

IAddressGeocoding.MatchTable Method

Geocodes a table of addresses.

[Visual Basic .NET]
Public Sub MatchTable ( _
    ByVal AddressTable As ITable, _
    ByVal addressFieldNames As String, _
    ByVal whereClause As String, _
    ByVal outputFeatureClass As IFeatureClass, _
    ByVal outputFieldNames As String, _
    ByVal fieldsToCopy As IPropertySet, _
    ByVal cancelTracker As ITrackCancel _
)
[C#]
public void MatchTable (
    ITable AddressTable,
    string addressFieldNames,
    string whereClause,
    IFeatureClass outputFeatureClass,
    string outputFieldNames,
    IPropertySet fieldsToCopy,
    ITrackCancel cancelTracker
);
[C++]
HRESULT MatchTable(
  ITable* AddressTable,
  BSTR addressFieldNames,
  BSTR whereClause,
  IFeatureClass* outputFeatureClass,
  BSTR outputFieldNames,
  IPropertySet* fieldsToCopy,
  ITrackCancel* cancelTracker
);
[C++]
Parameters
AddressTable [in]

AddressTable is a parameter of type ITable* addressFieldNames [in]
addressFieldNames is a parameter of type BSTR whereClause [in]
whereClause is a parameter of type BSTR outputFeatureClass [in]
outputFeatureClass is a parameter of type IFeatureClass* outputFieldNames [in]
outputFieldNames is a parameter of type BSTR fieldsToCopy [in]
fieldsToCopy is a parameter of type IPropertySet* cancelTracker [in]
cancelTracker is a parameter of type ITrackCancel*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

The MatchTable method geocodes a table of addresses to a feature class.

Remarks

Before you geocode a table of addresses, you must first create the feature class that will contain the geocoded features. In addition to having an ObjectID and the match fields created by the locator, you can also specify fields from the address table to copy to the geocoded feature class. When you geocode a table of addresses using ArcGIS for Desktop, the output feature class contains two copies of the address fields from the address table. One copy is a static copy that contains the original values of the address components from the address table. The second copy is an editable copy that you can use to modify the address when rematching the geocoded feature class. The names of the latter set of address fields are prefixed with "ARC_". In general, it is a good idea to follow this pattern when programatically geocoding a table of addresses, since the locator that you attach to the geocoded feature class will then only need to refer to the geocoded feature class itself (and not the original address table) to be able to rematch the addresses in the geocoded feature class.

The addressFieldNames parameter is used to specify the names of the fields in the addressTable that contain address information. The field names are contained in a comma-delimited string, in the order required by the address locator. You can get the set of address fields for the geocoding service using IAddressInputs::AddressFields. Use the IField::Required property to determine which address fields are required by the address locator. You must specify the names of the required fields in the address table. If your address table does not contain an optional address field, do not specify a name in the this property.

The WhereClause parameter is used to restrict which addresses in the table are geocoded using a query.

The outputFeatureClass parameter is the feature class that will contain the geocoded addresses. This feature class must have an ObjectID field, and the match fields for the address locator. Use the MatchFields property to get the match fields for the address locator. In addition to the fields returned from the MatchFields property, the result feature class also contains the Match_type field indicating how an adddress was matched. The field may contain the following values assigned by IAddressGeocoding::MatchTable or IAddressUI::RematchTable  

To copy any additional fields from the address table, or to create new fields in the feature class, you must also add them to the feature class before geocoding the table.

The outputFieldNames parameter is a string containing a comma-delimited list of the names of the match fields in the feature class. The names of the fields must be specified in the same order as defined by the address locator. Use the MatchFields property to get the match fields for the address locator.

The fieldsToCopy parameter allows you to copy values from fields in the address table to the feature class. To copy a field, add a property to the PropertySet with the name of the destination field in the feature class, and with a value of the name of the field in the address table. You must add the the field to the feature class when you create it in order to copy values from the address table.

The CancelTracker parameter allows you to optionally display the progress while the geocoding service geocodes the table of addresses.

To be able to rematch a geocoded feature class, you must attach a locator to the geocoded feature class.

See Also

IAddressGeocoding Interface | IAddressGeocoding Interface | IAddressGeocoding.MatchTable Method | IAdvancedGeocoding.RematchTable Method | IAddressGeocoding.MatchAddress Method | ILocatorAttach2.AttachLocator Method | AttachedLocator Class | ILocatorAttach2 Interface | IAddressGeocoding.MatchTable Method | IAttachedLocator Interface | LocatorManager Class | IAttachedLocator Interface | AttachedLocator Class | ILocatorManager Interface | ILocatorManager2 Interface