ArcObjects Library Reference (Location)  

IGeocodeServer.GeocodeAddress Method

Geocodes a single address (normal or standardized form).

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

Parameters

address [in]

  address is a parameter of type IPropertySet

propMods [in]

  propMods is a parameter of type IPropertySet

result [out, retval]

  result is a parameter of type IPropertySet

Product Availability

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

Remarks

The GeocodeAddress method geocodes a single address defined by the address PropertySet, and returns a PropertySet containing the match property values.

The address parameter is a PropertySet containing the address to be geocoded. The names of the properties in this PropertySet are the names of the address fields used by the GeocodeServer. The most common way to geocode an address using the GeocodeAddress method is to allow the GeocodeServer to standardize the address before searching for a match 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 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 an address. For example, you may wish to change the spelling sensitivity used to search for a match for the address, or you may want to change the side and end offset applied to the geocoded location. 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 GeocodeAddress method returns a PropertySet that contains a set of properties that define the match found by the GeocodeServer . The names of these properties are defined by the names of the Field objects returned by the GetResultFields method.

See Also

IGeocodeServer Interface

.NET Related Topics

Server | Working with server contexts |