com.esri.arcgis.location
Interface IGeocodeServer

All Superinterfaces:
Serializable
All Known Implementing Classes:
GeocodeServer

public interface IGeocodeServer
extends Serializable

Provides access to members for geocoding addresses.

When To Use

Use the IGeocodeServer interface to perform high-level geocoding tasks such as finding a single address, geocoding a table of addresses, or finding the address closest to a point.

Product Availability

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


Method Summary
 IRecordSet findAddressCandidates(IPropertySet address, IPropertySet propMods)
          Generates candidates for an address (normal or standardized form).
 IPropertySet geocodeAddress(IPropertySet address, IPropertySet propMods)
          Geocodes a single address (normal or standardized form).
 IRecordSet geocodeAddresses(IRecordSet addressTable, IPropertySet addressFieldMapping, IPropertySet propMods)
          Geocodes a table of addresses.
 IFields getAddressFields()
          Fields needed to geocode a table of addresses.
 IFields getCandidateFields(IPropertySet propMods)
          Fields contained in a list of candidates.
 IPropertySet getDefaultInputFieldMapping()
          Suggested field name mappings for all input fields.
 IFields getIntersectionCandidateFields(IPropertySet propMods)
          Fields contained by intersection candidates.
 IPropertySet getLocatorProperties()
          Default properties for a locator.
 IFields getResultFields(IPropertySet propMods)
          Fields contained in the geocoding result.
 IFields getStandardizedFields()
          Fields contained in a standardized address.
 IFields getStandardizedIntersectionFields()
          Fields contained in a standardized intersection.
 IPropertySet reverseGeocode(IPoint location, boolean bReturnIntersection, IPropertySet propMods)
          Generates an address for a point.
 IPropertySet standardizeAddress(IPropertySet address, IPropertySet propMods)
          Standardizes an address.
 

Method Detail

geocodeAddress

IPropertySet geocodeAddress(IPropertySet address,
                            IPropertySet propMods)
                            throws IOException,
                                   AutomationException
Geocodes a single address (normal or standardized form).

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
address - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geocodeAddresses

IRecordSet geocodeAddresses(IRecordSet addressTable,
                            IPropertySet addressFieldMapping,
                            IPropertySet propMods)
                            throws IOException,
                                   AutomationException
Geocodes a table of addresses.

Remarks

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.

Note that, when passing objects as parameters to any member of the IGeocodeServer interface, all of the objects should be created from within the server context. Objects are created within a server context if they are retrieved from the ServerContext object corresponding to the GeocodeServer, of if they are created by other objects that belong to the server context.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
addressTable - A reference to a com.esri.arcgis.geodatabase.IRecordSet (in)
addressFieldMapping - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRecordSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

standardizeAddress

IPropertySet standardizeAddress(IPropertySet address,
                                IPropertySet propMods)
                                throws IOException,
                                       AutomationException
Standardizes an address. One of the properties returned indicates if it is an intersection or not.

Remarks

The StandardizeAddress method standardizes an address using the geocoding rules used by the GeocodeServer.

The address parameter is a PropertySet that contains the address to standardize. The names of the properties are the input address fields used by the GeocodeServer, as defined by the GetAddressFields method.

The propMods parameter is a PropertySet containing the GeocodeServer properties to use to standardize the address. The GetLocatorProperties method returns the set of default geocoding properties for the GeocodeServer. In some cases, you may want to modify the properties used to standardize an address. 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 GetLocatorPropertiesmethod.

The PropertySet returned by the StandardizeAddress method contains the standardized address. In addition to the standardized address components, this PropertySet contains a property named "Addr_type" that indicates the type of address. If the value of this property is "A", then the address was standardized as a non-intersection address. If the value of this property is "I", then the address was standardized as an intersection address. The set of remaining properties will depend on the value of this property. If the standardized address returned is a non-intersection address, then use the names of the fields returned by the GetStandardizedFields method to retrieve the components of the standardized address. If the standardized address returned is an intersection address, then use the names of the fields returned by the GetStandardizedIntersectionFields method to retrieve the components of the standardized address.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
address - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findAddressCandidates

IRecordSet findAddressCandidates(IPropertySet address,
                                 IPropertySet propMods)
                                 throws IOException,
                                        AutomationException
Generates candidates for an address (normal or standardized form).

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
address - A reference to a com.esri.arcgis.system.IPropertySet (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IRecordSet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAddressFields

IFields getAddressFields()
                         throws IOException,
                                AutomationException
Fields needed to geocode a table of addresses.

Remarks

The GetAddressFields method returns a Fields object containing the input address fields used by the GeocodeServer. The IField::Required property on each Field object indicates if the GeocodeServer requires this field when geocoding addresses.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCandidateFields

IFields getCandidateFields(IPropertySet propMods)
                           throws IOException,
                                  AutomationException
Fields contained in a list of candidates.

Remarks

The GetCandidateFields object returns a Fields object that contains definitions of the Fields in the Recordset returned by the FindAddressCandidates method for non-intersection addresses.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIntersectionCandidateFields

IFields getIntersectionCandidateFields(IPropertySet propMods)
                                       throws IOException,
                                              AutomationException
Fields contained by intersection candidates.

Remarks

The GetIntersectionCandidateFields object returns a Fields object that contains definitions of the Fields in the Recordset returned by the FindAddressCandidates method for intersection addresses.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStandardizedFields

IFields getStandardizedFields()
                              throws IOException,
                                     AutomationException
Fields contained in a standardized address.

Remarks

The GetStandardizedFields method returns a set of fields that define the elements of a standardized non-intersection address. Use this method when constructing a PropertySet that represents a standardized address to pass to the GeocodeAddress or FindAddressCandidates methods, and when inspecting an address that has been standardized using the StandardizeAddress method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStandardizedIntersectionFields

IFields getStandardizedIntersectionFields()
                                          throws IOException,
                                                 AutomationException
Fields contained in a standardized intersection.

Remarks

The GetStandardizedIntersectionFields method returns a set of fields that define the elements of a standardized intersection address. Use this method when constructing a PropertySet that represents a standardized address to pass to the GeocodeAddress or FindAddressCandidates methods, and when inspecting an address that has been standardized using the StandardizeAddress method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getResultFields

IFields getResultFields(IPropertySet propMods)
                        throws IOException,
                               AutomationException
Fields contained in the geocoding result.

Remarks

The GetResultFields property returns a Fields object that defines the fields returned by the address locator on which the GeocodeServer is based. For more information on the fields returned by address locators, see IAddressGeocoding::MatchFields.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geodatabase.IFields
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IAddressGeocoding.getMatchFields()

getDefaultInputFieldMapping

IPropertySet getDefaultInputFieldMapping()
                                         throws IOException,
                                                AutomationException
Suggested field name mappings for all input fields.

Remarks

The GetDefaultInputFieldMapping property returns suggested names for fields in an address table that map to input address fields used by the GeocodeServer. Use this method when preparing a table for the GeocodeAddresses method to automatically detect the fields in the address table that contain address information.

The names of the properties contained in the PropertySet returned by this method are the names of the input address fields. Use the GetAddressFields method to get the names of the input address fields used by the GeocodeServer. The value of each property is a comma-delimited list of suggested field names for each input address field.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLocatorProperties

IPropertySet getLocatorProperties()
                                  throws IOException,
                                         AutomationException
Default properties for a locator.

Remarks

The GetLocatorProperties method returns a PropertySet containing all of the geocoding properties used by the GeocodeServer. To change the geocoding properties used when calling other methods on the IGeocodeServer interface, modify the properties in this PropertySet, then pass the PropertySet to the method you are calling using the propMods parameter on the method.

The following table describes all of the properties that might be contained in the PropertySet returned by the GetLocatorProperties method:

Name Description Values
EndOffset The end offset used by the address locator. A long integer value between 0 and 50
IntersectionConnectors The intersection connectors used by the address locator. A string value containing the space-delimited list of intersection connectors (e.g., "| & @")
MatchIfScoresTie Indicates if the GeocodeServer should match an addresses to a candidate if two or more candidates share the same best candidate score. "TRUE" or "FALSE"
MinimumCandidateScore The minimum candidate score used by the address locator. A long integer value between 0 and 100
MinimumMatchScore The minimum match score used by the address locator. A long integer value between 0 and 100
ReverseDistance The search distance to use to search for reference data features when reverse geocoding. The ReverseDistance value is specified in the reverse distance units used by the address locator. A double floating-point value
ReverseDistanceUnits The search distance units used by the address locator when reverse geocoding. Valid values include all of the enumeration constant names included in the esriUnits enumeration, without the "esri" prefix (e.g., "Meters"). A string representing the reverse geocoding distance units
SideOffset The side offset used by the address locator. The SideOffset value is specified in the side offset units used by the address locator. A double floating-point value
SideOffsetUnits The side offset units used by the address locator. Valid values include all of the enumeration constant names included in the esriUnits enumeration, without the "esri" prefix (e.g., "Meters"). A string representing the side offset units
SpellingSensitivity The spelling sensitivity used by the address locator. A long integer value between 0 and 100
SuggestedBatchSize The batch size to use when batch geocoding a table of addresses. Refer to the ArcGIS Server Administrator and Developer Guide for more information on the suggested batch size. A long integer value
UICLSID The Class ID of the LocatorUI object to use for the GeocodeServer's user interface in desktop applications. A string value containing the CLSID

For more information on the properties listed above, please refer to the IGeocodingProperties interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reverseGeocode

IPropertySet reverseGeocode(IPoint location,
                            boolean bReturnIntersection,
                            IPropertySet propMods)
                            throws IOException,
                                   AutomationException
Generates an address for a point.

Remarks

The ReverseGeocode method returns the address closest to the given point, and within a specified search distance.

The location parameter is a Point object that represents the point at which to search for the closest address. Note that the Point passed to this parameter have the same spatial reference as the GeocodeServer's output. The easiest way to get the spatial reference from the GeocodeServer is to use the GetResultFields method to get the result Fields, and then get the spatial reference from the shape field's GeometryDef object. If the Point is in some other spatial reference (such as a point feature from another feature class), then you must first project the point into the GeocodeServer's output spatial reference. This is most easily done using the IPoint::Project method.

The bReturnIntersection parameter indicates whether the GeocodeServer should return the nearest intersection to the given point. If the value of this parameter is True, then the GeocodeServer will return the nearest intersection to the given point, provided that the GeocodeServer supports intersection geocoding, and provided that there is an intersection within the reverse geocoding search distance. If the value of this parameter is False, then the GeocodeServer will return the nearest address to the given point, provided that there is an address within the GeocodeServer 's reverse geocoding search tolerance.

The propMods parameter is a PropertySet containing the geocoding properties to use for reverse geocoding. There are two properties that are relevant to reverse geocoding. The ReverseDistance and ReverseDistanceUnits properties specify the distance from the given point to which to search for addresses. When specifying the ReverseDistanceUnits property, use a string to indicate the units to use. For example, when searching for an address using a search distance specified in esriMeters, use the string "Meters" to specify the search distance units. Refer to the esriUnits enumeration for a list of all supported search distance units.

The PropertySet returned by the ReverseGeocode method contains properties that describe the address. The names of the properties are the names of the Fields returned by the GetAddressFields method, and their values correspond to the components of the nearest address. In fact, the PropertySet returned by the ReverseGeocode method could be passed to the GeocodeAddress method to get the geometry of the closest address to the given point.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
location - A reference to a com.esri.arcgis.geometry.IPoint (in)
bReturnIntersection - The bReturnIntersection (in)
propMods - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.