com.esri.arcgis.location
Class GeocodeServer

java.lang.Object
  extended by com.esri.arcgis.location.GeocodeServer
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IGeocodeServer, IGeocodeServerObjects, IGeocodeServerSingleLine, IInitGeocodeServer, IServerObject, IServerObjectExtensionManager, IObjectConstruct, IRequestHandler, IRequestHandler2, Serializable

public class GeocodeServer
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IObjectConstruct, IRequestHandler, IRequestHandler2, IGeocodeServer, IGeocodeServerObjects, IGeocodeServerSingleLine, IInitGeocodeServer, IServerObject, IServerObjectExtensionManager

A class that provides geocoding as a service.

Remarks

A GeocodeServer object uses an address locator to provide coarse-grained geocoding functionality either in Desktop and Engine applications, or using ArcGIS Server over the network. In a Desktop or Engine environment, developers can use the GeocodeServer to perform coarse-grained geocoding tasks, such as geocoding a table of addresses, more easily than with the finer-grained geocoding ArcObjects. In an ArcGIS Server environment, GeocodeServer objects can be accessed over the network to provide geocoding functionality hosted by a remote server.

All of the coarse-grained functionality of the GeocodeServer can be accessed through the IGeocodeServer interface. Using this interface, you can geocode single addresses, geocode tables of addresses, find the address closest to a point, and access all of the support functionality required to accomplish these tasks.

In order to access the fine-grained ArcObjects that support the geocoding functionality of the GeocodeServer, use the IGeocodeServerObjects to obtain a reference to the address locator on which the GeocodeServer is based. From this address locator, developers can access all of the fine-grained ArcObjects associated with the address locator, such as the reference data used by the address locator. Note that the fine-grained objects that support the GeocodeServer are stateful, and so you should only use a non-pooled GeocodeServer when modifying these objects.

For more information on accessing ArcGIS Server objects in stateful and stateless applications, refer to the ArcGIS Server Administrator and Developer Guide.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IRequestHandler
IID, IID46a0e2ea_3b64_4a46_bd78_88a1660f35bb, xxDummy
 
Constructor Summary
GeocodeServer()
          Constructs a GeocodeServer using ArcGIS Engine.
GeocodeServer(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeocodeServer theGeocodeServer = (GeocodeServer) obj;
 
Method Summary
 void attachToLocator(ILocatorName locName)
          Attach this service to the locator specified by the locator name.
 void construct(IPropertySet props)
          Two phase object construction.
 boolean equals(Object o)
          Compare this object with another
 IRecordSet findAddressCandidates(IPropertySet address, IPropertySet propMods)
          Generates candidates for an address (normal or standardized form).
 IServerObjectExtension findExtensionByCLSID(String cLSID)
          Returns a server object extension found using a string representation of its class ID.
 IServerObjectExtension findExtensionByTypeName(String name)
          Returns a server object extension found using its type name.
 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.
 ILocator getAddressLocator()
          The address locator used by the geocode server.
 String getAdjustableProperties()
          The list of properties (comma delimited) that can be modified at runtime (for a given method).
 IFields getCandidateFields(IPropertySet propMods)
          Fields contained in a list of candidates.
static String getClsid()
          getClsid.
 String getConfigurationName()
          Name of the server object configuration that defines the server object.
 IPropertySet getDefaultInputFieldMapping()
          Suggested field name mappings for all input fields.
 Object getDefaultInputFieldNames()
          Recognized names for the single line input field.
 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.
 IField getSingleLineAddressField()
          Field needed to geocode a single line address.
 IFields getStandardizedFields()
          Fields contained in a standardized address.
 IFields getStandardizedIntersectionFields()
          Fields contained in a standardized intersection.
 int getSuggestedBatchSize()
          The suggested number of addresses to send to a server in one batch request.
 String getTypeName()
          Type of the server object (MapServer or GeocodeServer).
 byte[] handleBinaryRequest(byte[] request)
          Handles a binary request.
 byte[] handleBinaryRequest2(String capabilities, byte[] request)
          Handles a binary request with explicit capabilities.
 String handleStringRequest(String capabilities, String request)
          Handles a SOAP string request.
 int hashCode()
          the hashcode for this object
 IPropertySet reverseGeocode(IPoint location, boolean bReturnIntersection, IPropertySet propMods)
          Generates an address for a point.
 void setAdjustableProperties(String propertyList)
          The list of properties (comma delimited) that can be modified at runtime (for a given method).
 void setSuggestedBatchSize(int size)
          The suggested number of addresses to send to a server in one batch request.
 IPropertySet standardizeAddress(IPropertySet address, IPropertySet propMods)
          Standardizes an address.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

GeocodeServer

public GeocodeServer()
              throws IOException,
                     UnknownHostException
Constructs a GeocodeServer using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

GeocodeServer

public GeocodeServer(Object obj)
              throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeocodeServer theGeocodeServer = (GeocodeServer) obj;

Construct a GeocodeServer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GeocodeServer.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

construct

public void construct(IPropertySet props)
               throws IOException,
                      AutomationException
Two phase object construction.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
construct in interface IObjectConstruct
Parameters:
props - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest

public byte[] handleBinaryRequest(byte[] request)
                           throws IOException,
                                  AutomationException
Handles a binary request.

Specified by:
handleBinaryRequest in interface IRequestHandler
Parameters:
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleStringRequest

public String handleStringRequest(String capabilities,
                                  String request)
                           throws IOException,
                                  AutomationException
Handles a SOAP string request.

Specified by:
handleStringRequest in interface IRequestHandler
Parameters:
capabilities - The capabilities (in)
request - The request (in)
Returns:
The response
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest2

public byte[] handleBinaryRequest2(String capabilities,
                                   byte[] request)
                            throws IOException,
                                   AutomationException
Handles a binary request with explicit capabilities.

Product Availability

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

Specified by:
handleBinaryRequest2 in interface IRequestHandler2
Parameters:
capabilities - The capabilities (in)
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geocodeAddress

public 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

Specified by:
geocodeAddress in interface IGeocodeServer
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

public 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

Specified by:
geocodeAddresses in interface IGeocodeServer
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

public 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

Specified by:
standardizeAddress in interface IGeocodeServer
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

public 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

Specified by:
findAddressCandidates in interface IGeocodeServer
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

public 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

Specified by:
getAddressFields in interface IGeocodeServer
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

public 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

Specified by:
getCandidateFields in interface IGeocodeServer
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

public 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

Specified by:
getIntersectionCandidateFields in interface IGeocodeServer
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

public 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

Specified by:
getStandardizedFields in interface IGeocodeServer
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

public 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

Specified by:
getStandardizedIntersectionFields in interface IGeocodeServer
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

public 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

Specified by:
getResultFields in interface IGeocodeServer
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

public 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

Specified by:
getDefaultInputFieldMapping in interface IGeocodeServer
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

public 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

Specified by:
getLocatorProperties in interface IGeocodeServer
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

public 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

Specified by:
reverseGeocode in interface IGeocodeServer
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.

getAddressLocator

public ILocator getAddressLocator()
                           throws IOException,
                                  AutomationException
The address locator used by the geocode server.

Remarks

This IGeocodeServerObjects interface is available only if the GeocodeServer was obtained for use in a stateful manner (i.e., either by co-creating the GeocodeServer object or by obtaining a reference using a GISServerConnection object.)

The following example illustrates how to obtain a reference to the address locator that provides the geocoding functionality for a GeocodeServer:

    Dim pGISServerConnection As esriServer.IGISServerConnection

    Dim pServerObjectManager As esriServer.IServerObjectManager

    Dim pServerContext As esriServer.IServerContext

    Dim pGeocodeServerObjects As esriLocation.IGeocodeServerObjects

    Dim pLocator As esriGeoDatabase.ILocator



    '+++ connect to an ArcGIS Server and get the server object manager

    Set pGISServerConnection = New esriServer.GISServerConnection

    pGISServerConnection.Connect ("napanee")

    Set pServerObjectManager = pGISServerConnection.ServerObjectManager



    '+++ get a GeocodeServer object from its server context

    Set pServerContext = pServerObjectManager.CreateServerContext("RedlandsStreets", "GeocodeServer")

    Set pGeocodeServerObjects = pServerContext.ServerObject



    '+++ get the address locator from the GeocodeServer

    Set pLocator = pGeocodeServerObjects.AddressLocator



    '+++ release the server context after completing work with the GeocodeServer

    pServerContext.ReleaseContext

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAddressLocator in interface IGeocodeServerObjects
Returns:
A reference to a com.esri.arcgis.geodatabase.ILocator
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSingleLineAddressField

public IField getSingleLineAddressField()
                                 throws IOException,
                                        AutomationException
Field needed to geocode a single line address.

Product Availability

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

Specified by:
getSingleLineAddressField in interface IGeocodeServerSingleLine
Returns:
A reference to a com.esri.arcgis.geodatabase.IField
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDefaultInputFieldNames

public Object getDefaultInputFieldNames()
                                 throws IOException,
                                        AutomationException
Recognized names for the single line input field.

Product Availability

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

Specified by:
getDefaultInputFieldNames in interface IGeocodeServerSingleLine
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

attachToLocator

public void attachToLocator(ILocatorName locName)
                     throws IOException,
                            AutomationException
Attach this service to the locator specified by the locator name. This is the locator that the service will use internally.

Remarks

To create a new GeocodeServer in a Desktop or Engine environment, simply create a new GeocodeServer object and attach the address locator on which you want to base the GeocodeServer using the AttachToLocator method.

    Dim pLocatorManager As esriLocation.ILocatorManager

    Dim pLocatorWorkspace As esriGeoDatabase.ILocatorWorkspace

    Dim pLocatorName As esriGeoDatabase.ILocatorName

    Dim pInitGeocodeServer As esriLocation.IInitGeocodeServer



    '+++ get a reference to the locator on which to base the GeocodeServer

    Set pLocatorManager = New esriLocation.LocatorManager

    Set pLocatorWorkspace = _

        pLocatorManager.GetLocatorWorkspaceFromPath("D:\Workspace\ArcGIS Developer Help\GeocodeServer")

    Set pLocatorName = pLocatorWorkspace.GetLocatorName("Redlands Streets")



    '+++ create a new GeocodeServer

    Set pInitGeocodeServer = New esriLocation.GeocodeServer

    pInitGeocodeServer.AttachToLocator pLocatorName

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
attachToLocator in interface IInitGeocodeServer
Parameters:
locName - A reference to a com.esri.arcgis.geodatabase.ILocatorName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getAdjustableProperties

public String getAdjustableProperties()
                               throws IOException,
                                      AutomationException
The list of properties (comma delimited) that can be modified at runtime (for a given method).

Remarks

The IInitGeocodeServer interface is available only if the GeocodeServer was obtained for use in a stateful manner (i.e., either by co-creating the GeocodeServer object or by obtaining a reference using a GISServerConnection object.)

The AdjustableProperties method returns a comma-delimited string containing the list of properties that a user or developer can modify at runtime when using a GeocodeServer. Use this method to inspect and restrict the set of properties that users and developers can modify. Refer to the IGeocodeServer::GetLocatorProperties method for a list of property names that can be used.

The following example illustrates how to modify the set of adjustable properties so that users and developers cannot change the minimum candidate score used by the GeocodeServer at runtime:

Public Sub SetAdjustableProperties()

    Dim pGISServerConnection As esriServer.IGISServerConnection

    Dim pServerObjectManager As esriServer.IServerObjectManager

    Dim pServerContext As esriServer.IServerContext

    Dim pInitGeocodeServer As esriLocation.IInitGeocodeServer

    Dim varAdjustableProperties As Variant

    Dim strAdjustableProperties() As String

    Dim lngPropertyIndex As Long



    On Error GoTo ErrorHandler



    '+++ connect to an ArcGIS Server and get the server object manager

    Set pGISServerConnection = New esriServer.GISServerConnection

    pGISServerConnection.Connect ("napanee")

    Set pServerObjectManager = pGISServerConnection.ServerObjectManager



    '+++ get a GeocodeServer object from its server context

    Set pServerContext = pServerObjectManager.CreateServerContext("RedlandsStreets", "GeocodeServer")

    Set pInitGeocodeServer = pServerContext.ServerObject



    '+++ get the set of adjustable properties and remove the minimum candidate score

    varAdjustableProperties = Split(pInitGeocodeServer.AdjustableProperties, ",")

    For lngPropertyIndex = LBound(varAdjustableProperties) To UBound(varAdjustableProperties)

        If varAdjustableProperties(lngPropertyIndex) <> "MinimumCandidateScore" Then

            ReDim Preserve strAdjustableProperties(0 To UBound(strAdjustableProperties) + 1)

            strAdjustableProperties(UBound(strAdjustableProperties)) = _

                varAdjustableProperties(lngPropertyIndex)

        End If

    Next lngPropertyIndex

    pInitGeocodeServer.AdjustableProperties = Join(strAdjustableProperties, ",")



    '+++ release the server context after completing work with the GeocodeServer

    pServerContext.ReleaseContext



    Exit Sub



ErrorHandler:

    If Err.Number = 9 Then  '+++ subscript out of range error

        ReDim strAdjustableProperties(0 To 0)

        Resume Next

    End If



End Sub

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getAdjustableProperties in interface IInitGeocodeServer
Returns:
The propertyList
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAdjustableProperties

public void setAdjustableProperties(String propertyList)
                             throws IOException,
                                    AutomationException
The list of properties (comma delimited) that can be modified at runtime (for a given method).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setAdjustableProperties in interface IInitGeocodeServer
Parameters:
propertyList - The propertyList (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSuggestedBatchSize

public int getSuggestedBatchSize()
                          throws IOException,
                                 AutomationException
The suggested number of addresses to send to a server in one batch request.

Remarks

Refer to the ArcGIS Server Administrator and Developer Guide for more information on the suggested batch size.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSuggestedBatchSize in interface IInitGeocodeServer
Returns:
The size
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSuggestedBatchSize

public void setSuggestedBatchSize(int size)
                           throws IOException,
                                  AutomationException
The suggested number of addresses to send to a server in one batch request.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSuggestedBatchSize in interface IInitGeocodeServer
Parameters:
size - The size (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationName

public String getConfigurationName()
                            throws IOException,
                                   AutomationException
Name of the server object configuration that defines the server object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConfigurationName in interface IServerObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTypeName

public String getTypeName()
                   throws IOException,
                          AutomationException
Type of the server object (MapServer or GeocodeServer).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTypeName in interface IServerObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtensionByCLSID

public IServerObjectExtension findExtensionByCLSID(String cLSID)
                                            throws IOException,
                                                   AutomationException
Returns a server object extension found using a string representation of its class ID.

Product Availability

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

Specified by:
findExtensionByCLSID in interface IServerObjectExtensionManager
Parameters:
cLSID - The cLSID (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtensionByTypeName

public IServerObjectExtension findExtensionByTypeName(String name)
                                               throws IOException,
                                                      AutomationException
Returns a server object extension found using its type name.

Product Availability

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

Specified by:
findExtensionByTypeName in interface IServerObjectExtensionManager
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.