Geocode Service ReverseGeocode method

Reverse geocodes and returns the address closest to the given point, and within a specified search distance.

 

ReverseGeocode(Point Location, bool ReturnIntersection, PropertySet PropMods)

 

Parameter

Description

Location

A point (PointN) that represents the location at which to search for the closest address.

ReturnIntersection

A boolean value which indicates whether the geocode services should return the nearest intersection to the given point.

PropMods

 

A PropertySet containing the properties relevant for reverse geocoding. There are five valid properties: "ReverseDistance", "ReverseDistanceUnits", "SideOffset", "SideOffsetUnits", "OutputSpatialReference" (see Remarks for more information).
 

Use GetLocatorProperties to return default locator properties.

 

Return Value

 

A PropertySet containing property-value pairs 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 addition, the geometry that represents the actual location of the closest address is returned in a shape field.

 

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 point and output address information one can expect when using this method.



The input point passed to this method can have a different spatial reference than the reference data used by the geocode service. Set the PointN.SpatialReference property of the input point to a ProjectedCoordinateSystem or GeographicCoordinateSystem.  Both coordinate system types can be defined using a well-known id (WKID) or text (WKT). If a spatial reference is not defined for an input point, the spatial reference of the geocode service is assumed. To get the spatial reference of a geocode service, use the GetResultFields method to get the result fields then use the SpatialReference property on the shape field's GeometryDef object.   

The following locator properties can be modified for each reverse geocode operation:
 

Property name

Type

Description

ReverseDistance

double

The distance from the input point to search for an address.  

The default value is 0.

 

ReverseDistanceUnits

string

The units in which to measure the "ReverseDistance" value.  When specifying this 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 default value is "esriUnknownUnits".

 

SideOffset

integer

Geocode services can use reference data containing address range information for each side of the street, such as US Street address styles.  Locators based on these styles can determine which side of the street an address is located.

In a reverse geocode operation, the side offset has a dual purpose.  One, the point returned is a specified distance, the side offset, from the real segment on the correct side of the street.  And two, the side offset is appended to the search tolerance (ReverseDistance) to find a location on a segment.   The following diagram illustrates how the side offset and reverse distance are used to define the actual search tolerance for a reverse geocode operation.


 

SideOffsetUnits

Unit

The reference unit in which to specify the side offset (SideOffset property).

 

OutputSpatialReference

SpatialReference

The output spatial reference for the reverse geocoded point.  It can be different from the input point or geocode service.    
 

 

 

Examples

C#

VB.NET

Java