This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Location > ESRI.ArcGIS.Location > Interfaces > IA > IAdvancedGeocoding2 Interface > IAdvancedGeocoding2.MatchRecordSet Method (ArcObjects .NET 10.4 SDK) |
Geocodes a cursor of addresses to a RecordSet.
[Visual Basic .NET] Public Sub MatchRecordSet ( _ ByVal addressCursor As ICursor, _ ByVal addressFieldNames As String, _ ByVal outputRecordSet As IRecordSetInit, _ ByVal outputFieldNames As String, _ ByVal fieldsToCopy As IPropertySet, _ ByVal cancelTracker As ITrackCancel _ )
[C#] public void MatchRecordSet ( ICursor addressCursor, string addressFieldNames, IRecordSetInit outputRecordSet, string outputFieldNames, IPropertySet fieldsToCopy, ITrackCancel cancelTracker );
[C++]
HRESULT MatchRecordSet(
ICursor* addressCursor,
BSTR addressFieldNames,
IRecordSetInit* outputRecordSet,
BSTR outputFieldNames,
IPropertySet* fieldsToCopy,
ITrackCancel* cancelTracker
);
[C++]
Parameters addressCursor [in]
addressCursor is a parameter of type ICursor addressFieldNames [in] addressFieldNames is a parameter of type BSTR outputRecordSet [in]
outputRecordSet is a parameter of type IRecordSetInit 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
When using the next generation geocoding engine, use IBatchGeocoding to access the MatchRecordSet method.
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.