Geocodes a single address and returns multiple results (candidates).
FindAddressCandidates(PropertySet Address, PropertySet PropMods)
Parameter |
Description |
Address
|
Address information stored as a PropertySet to be geocoded. Each property is associated with an address field defined for the geocoding service. Use GetAddressFields to get a list of fields. |
PropMods |
Modifications to the geocode service properties. Use GetLocatorProperties to get a list of default locator properties. |
Return Value
A RecordSet containing match candidates. Each row references an individual candidate. 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. In most cases, the RecordSet will contain the geocoded location (Geometry), score, and matched address.
Remarks
The following diagram illustrates the geocode server proxy methods commonly
used when working with this method. In addition, the diagram also includes
the input (address) and output (match) information one can expect when
using this method.
The input Address parameter is a PropertySet containing the address
for which to find candidates. The names of the properties in Address are the names of the address
fields used by the geocode service. The most common way to find candidates
for an address using the FindAddressCandidates method is to allow the
geocode service to standardize the address before searching for candidates.
In this case, use the GetAddressFields
method to retrieve the definitions of the address fields used by the geocode
service, and use the names of these fields as the names of the properties
defined in the Address. Each Field
object has a Required property which indicates
if the address field is required by the geocode service. Failing to specify
a required address property will return an error.
The PropMods parameter is a PropertySet containing the geocode service properties to use to find candidates for the address. The GetLocatorProperties method returns the set of default geocoding properties for the geocode service. In some cases, you may want to modify the geocoding properties used to find candidates for an address. For example, you may 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 object as the PropMods parameter. PropMods only needs to contain properties that are different than the default properties for the geocode service. If you do not need to modify any of the default properties returned used by the geocode service, the PropMods parameter can be null or you can pass the unmodified PropertySet returned by the GetLocatorProperties method.
Using pre-ArcGIS 10 locators
In some cases you may want to find candidates for an address that has already been standardized (thus the geocode service will not standardize any address input). Use the GetStandardizedFields or GetStandardizedIntersectionFields methods to retrieve the names of the standardized address fields used by the geocode service, 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 PropertySet only needs to contain properties that have a value, even if the standardized field is listed as required.
Examples