![]() |
This document is archived and information here might be outdated. Recommended version. |
Geocodes a table of addresses.
[Visual Basic .NET] Public Function GeocodeAddresses ( _ ByVal AddressTable As IRecordSet, _ ByVal addressFieldMapping As IPropertySet, _ ByVal propMods As IPropertySet _ ) As IRecordSet
[C#] public IRecordSet GeocodeAddresses ( IRecordSet AddressTable, IPropertySet addressFieldMapping, IPropertySet propMods );
[C++]
HRESULT GeocodeAddresses(
IRecordSet* AddressTable,
IPropertySet* addressFieldMapping,
IPropertySet* propMods
);
[C++] Parameters AddressTable [in]
AddressTable is a parameter of type IRecordSet* addressFieldMapping [in]
addressFieldMapping is a parameter of type IPropertySet* propMods [in]
propMods is a parameter of type IPropertySet*
The GeocodeAddresses method geocodes a RecordSet of addresses, and returns a RecordSet containing the match properties for each address.
The AddressTable parameter is a RecordSet containing the addresses to be geocoded. To create the RecordSet, first co-create a RecordSet coclass, then use the IRecordSetInit::SetSourceTable method set a reference to the table that contains the addresses to geocode. In order to reduce the amount of data that needs to be sent to the server, use the pFilter parameter on the IRecordSetInit::SetSourceTable method to define a QueryFilter that includes only the ObjectID and address fields from the address table.
The addressFieldMapping parameter defines the mapping of address fields used by the GeocodeServer to fields in the AddressTable RecordSet. The names of the properties in this PropertySet are the names of the address fields used by the GeocodeServer. Use the GetAddressFields method to get the set of fields used by the GeocodeServer. The values of the properties are the names of the corresponding fields in the RecordSet.
The propMods parameter is a PropertySet containing the GeocodeServer properties to use to geocode the address. The GetLocatorProperties method returns the set of default geocoding properties for the GeocodeServer. In some cases, you may want to modify the geocoding properties used to geocode addresses. For example, you may wish to change the spelling sensitivity used to search for matches for addresses, or you may want to change the side and end offset applied to the geocoded locations. Modify the properties in the PropertySet returned by the GetLocatorProperties method, and pass the modified PropertySet to the propMods parameter. The PropertySet passed to the propMods parameter only needs to contain properties that are different than the default properties for the GeocodeServer. If you don't wish to modify any of the default properties returned used by the GeocodeServer, you can either pass a null value to the propMods parameter, or pass the unmodified PropertySet returned by the GetLocatorProperties method.