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 three valid properties: ReverseDistance,
ReverseDistanceUnits, SideOffset, SideOffsetUnits, OutputSpatialReference.
|
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 the ReverseGeocode()
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 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.
|
ReverseDistanceUnits |
string |
The units in which to measure the ReverseDistance
value. 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.
|
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. |
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