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


IGeocodeServer.FindAddressCandidates Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Location)  

IGeocodeServer.FindAddressCandidates Method

Generates candidates for an address (normal or standardized form).

[Visual Basic .NET]
Public Function FindAddressCandidates ( _
    ByVal address As IPropertySet, _
    ByVal propMods As IPropertySet _
) As IRecordSet
[C#]
public IRecordSet FindAddressCandidates (
    IPropertySet address,
    IPropertySet propMods
);
[C++]
HRESULT FindAddressCandidates(
  IPropertySet* address,
  IPropertySet* propMods,
  IRecordSet** results
);
[C++]

Parameters address [in]
address is a parameter of type IPropertySet propMods [in]
propMods is a parameter of type IPropertySet results [out, retval]
results is a parameter of type IRecordSet

Product Availability

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

Remarks

The FindAddressCandidates method finds candidates for a single address defined by the address PropertySet, and returns a Recordset containing the candidates.

The address parameter is a PropertySet containing the address for which to find candidates. The names of the properties in this PropertySet are the names of the address fields used by the GeocodeServer. The most common way to find candidates for an address using the FindAddressCandidates method is to allow the GeocodeServer to standardize the address before searching for candidates for the address. In this case, use the GetAddressFields method to retrieve the definitions of the address fields used by the GeocodeServer, and use the names of these fields as the names of the properties defined in the address PropertySet. The Required property on each Field object indicates whether the address field is required by the GeocodeServer. Failing to specify a required address property results in an error.

In some cases, you may want to geocode an address that has been standardized with the input of the user or through some other method. In these cases, use the GetStandardizedFields or GetStandardizedIntersectionFields methods to retrieve the names of the standardized address fields used by the GeocodeServer , and use the names of these fields as the names of the properties defined in the address PropertySet. You must also add an additional property to the address PropertySet to indicate that the address is a standardized address. The name of this property must be "ADDR_TYPE", and its value must be "A" for a standardized address, or "I" for a standardized intersection.

The propMods parameter is a PropertySet containing the GeocodeServer properties to use to find candidates for 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 find candidates for an address. For example, you may wish to change the spelling sensitivity used to search for candidates for the address, or you may want to change the side and end offset applied to the candidate 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.

The FindAddressCandidates method returns a Recordset that contains Rows that define candidates for the address found by the GeocodeServer. For non-intersection addresses, use the GetCandidateFields method to get the set of fields contained in the Recordset. For intersection addresses, use the GetIntersectionCandidateFields method to get the set of fields contained in the Recordset.

See Also

IGeocodeServer Interface