com.esri.arcgis.location
Interface IBatchGeocoding

All Superinterfaces:
Serializable
All Known Implementing Classes:
ESRIGen2AddressLocator

public interface IBatchGeocoding
extends Serializable

Provides access to members for batch geocoding functions.

When To Use

IBatchGeocoding is implemented by every locator and it contains a subset of the methods that IAdvancedGeocoding contains.

IBatchGeocoding should be used instead of IAdvancedGeocoding when there is no need to access standardization methods or when a locator does not support standardization.

Product Availability

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


Method Summary
 void matchRecordSet(ICursor addressCursor, String addressFieldNames, IRecordSetInit outputRecordSet, String outputFieldNames, IPropertySet fieldsToCopy, ITrackCancel cancelTracker)
          Geocodes a cursor of addresses to a RecordSet.
 void rematchTable(ITable pInputTable, String inputFieldNames, String inputJoinFieldName, IFeatureClass resultTable, String outputFieldNames, String outputJoinFieldName, String whereClause, ITrackCancel cancelTracker)
          Rematches a geocoded feature class or shapefile.
 

Method Detail

rematchTable

void rematchTable(ITable pInputTable,
                  String inputFieldNames,
                  String inputJoinFieldName,
                  IFeatureClass resultTable,
                  String outputFieldNames,
                  String outputJoinFieldName,
                  String whereClause,
                  ITrackCancel cancelTracker)
                  throws IOException,
                         AutomationException
Rematches a geocoded feature class or shapefile.

Description

The RematchTable method rematches a geocoded feature class or shapefile. In general, you will use the RematchTable method on a locator that you retreived from an AttachedLocator on a geocoded feature class. You can get most of the parameters required by this function from the AttachedLocator.

The pInputTable parameter is a reference to the table that contains the address information, which is usually the geocoded feature class.

The pInputFieldNames parameter is a comma-delimited string containing the names of the fields in pInputTable that contain the address information. Usually, these fields are copied from the original address table to the geocoded feature class when the geocoded feature class is first created, and are prefixed with "ARC_". The field names in the string must be given in the same order as specified by the IAddressInputs::AddressFields property.

The InputJoinFieldName parameter is the name of the field in pInputTable that relates records in this table to records in resultTable. Usually, this parameter is not used because pInputTable and resultTable refer to the same feature class.

The resultTable parameter is the feature class that contains the geocoded addresses.

The outputFieldNames parameter is a comma-delimited string containing the names of the fields in resultTable that contain match information. You can use the IAddressGeocoding::MatchFields property to determine which fields contain the match information. The field names in the string must be given in the same order as specified by the IAddressGeocoding::MatchFields property.

The OuputJoinFieldName parameter is the name of the field in resultTable that relates records in this feature class to records in pInputTable. Usually, this parameter is not used because pInputTable and resultTable refer to the same feature class.

The WhereClause parameter is a string that contains a SQL clause specifying which records in pInputTable to rematch. To rematch all of the records, specify a blank string for this parameter.

The CancelTracker parameter is an optional parameter that you can use to specify a CancelTracker to display the progress of the rematch operation.

Product Availability

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

Parameters:
pInputTable - A reference to a com.esri.arcgis.geodatabase.ITable (in)
inputFieldNames - The inputFieldNames (in)
inputJoinFieldName - The inputJoinFieldName (in)
resultTable - A reference to a com.esri.arcgis.geodatabase.IFeatureClass (in)
outputFieldNames - The outputFieldNames (in)
outputJoinFieldName - The outputJoinFieldName (in)
whereClause - The whereClause (in)
cancelTracker - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

matchRecordSet

void matchRecordSet(ICursor addressCursor,
                    String addressFieldNames,
                    IRecordSetInit outputRecordSet,
                    String outputFieldNames,
                    IPropertySet fieldsToCopy,
                    ITrackCancel cancelTracker)
                    throws IOException,
                           AutomationException
Geocodes a cursor of addresses to a RecordSet.

Description

The MatchRecordSet method is similar to the IAddressGeocoding::MatchTable method, in that the locator geocodes a set of input address records to a set of output features. Unlike the IAddressGeocoding::MatchTable method, the output features are not stored in a feature class. Using this method is useful when geocoding multiple addresses and the geocoding results do not need to be persisted in a feature class.

The addressCursor parameter is a Cursor that contains the set of addresses to geocode. As a minimum, the cursor must contain all of the address fields required by the locator, and should contain as many address fields that can be used by the locator as are available. The cursor can contain additional fields, and these fields can be copied to the resulting RecordSet.

The addressFieldNames parameter is a comma-delimited string containing the field names in the cursor that correspond to the address fields used by the locator. The names of the fields given in this parameter must be specified in the same order as the order of the address fields returned by the IAddressInputs::AddressFields property.

The outputRecordSet parameter is a reference to the RecordSet object to which the locator will add the geocoded features. The Recordset must be co-created before passing it as a parameter to the MatchRecordSet method, and as a minimum, should contain the match fields generated by the locator. Use the IAddressGeocoding::MatchFields property to get the set of match fields generated by the locator. The RecordSet can optionally contain any fields for attributes that you want to copy from the addressCursor, as specified by the fieldsToCopy parameter. Use the IRecordSetInit::CreateTable method to initialize the RecordSet with the desired set of fields.

The outputFieldNames parameter is a comma-delimited string containing the names of the fields in the outputRecordSet corresponding to the match fields generated by the locator. The names ofthe fields given in this parameter must be specified in the same order and the order of the match fields returned by the IAddressGeocoding::MatchFields property.

The fieldsToCopy parameter is a PropertySet containing the mapping of fields in the addressCursor that you wish to copy to the outputRecordSet. The names of the properties in the PropertySet are the names of the fields in the outputRecordSet that will contain the copied values, and the value of the properties are the names of the fields in the addressCursor that contain the values to copy. If you do not wish to copy attributes from the addressCursor to the ouputRecordSet, you must still co-create an empty PropertySet and pass it to the MatchRecordSet method using this parameter.

The cancelTracker parameter is an optional reference to a CancelTracker object that allows you to display the progress while the locator geocodes the addressCursor.

Product Availability

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

Parameters:
addressCursor - A reference to a com.esri.arcgis.geodatabase.ICursor (in)
addressFieldNames - The addressFieldNames (in)
outputRecordSet - A reference to a com.esri.arcgis.geodatabase.IRecordSetInit (in)
outputFieldNames - The outputFieldNames (in)
fieldsToCopy - A reference to a com.esri.arcgis.system.IPropertySet (in)
cancelTracker - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.