ReverseGeocodeUSLocation
ReverseGeocodeUSLocation takes a latitude and longitude point as input and returns the address that is the best match for that point. For example, you could enter the following information:
Longitude: -105239771 Latitude: 40018912 Search Distance: 150 feet
This input would result in the following output:
4750 WALNUT ST BOULDER, CO 80301-2538
MatchCode = NS0
LocCode = AS0
Lon = -105239773
Lat = 40018911
Distances:
Search = 150
Offset = 50
Squeeze = 50
Nearest = 50.0
Pct Geocode = 94.0
SegID = 472881795
PtID = GDT
Block = 080130122032066
County Name = BOULDER COUNTY
DPBC = 50
ReverseGeocodeUSLocation processes geocodes in the following order:
- ReverseGeocodeUSLocation defines a small rectangle based on your input geocode and search distance.
- ReverseGeocodeUSLocation computes the distance between each street segment and the input location.
- If one segment is closest, ReverseGeocodeUSLocation finds the offset and interpolated percentage (using the squeeze factor) and the street side. It then computes an approximate house number based on this information.
If there is more than one segment that is equally close to the input location, a multi-match occurs. ReverseGeocodeUSLocation returns the information for all of the equally close segments so that you can determine which segment is applicable.
- ReverseGeocodeUSLocation returns the address information, including the segment range, the approximate house number, and the parity of the range along with other standard address information.
To use ReverseGeocodeUSLocation, you need additional data files, called GSX files. There is an option to install these files when you install the geocoding database. The GSX files must be installed the GSX subdirectory of the geocoding database. If you install the TomTom Points database, you must recreate the GSX files. Consult with Precisely Technical Support if you need more information about GSX files.
Resource URL
http://server:port/soap/ReverseGeocodeUSLocation
https://OnDemandServer/soap/ReverseGeocodeUSLocation
For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.
Example
The following shows a SOAP request:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:rev="http://www.pb.com/spectrum/services/ReverseGeocodeUSLocation">
<soapenv:Header/>
<soapenv:Body>
<rev:ReverseGeocodeUSLocationRequest>
<!--Optional:-->
<rev:input_port>
<!--Zero or more repetitions:-->
<rev:Coordinate>
<!--You may enter the following 3 items in any order-->
<!--Optional:-->
<rev:Longitude>-73549161</rev:Longitude>
<!--Optional:-->
<rev:Latitude>41071067</rev:Latitude>
<!--Optional:-->
<rev:user_fields>
<!--Zero or more repetitions:-->
<rev:user_field>
<rev:name>?</rev:name>
<rev:value>?</rev:value>
</rev:user_field>
</rev:user_fields>
</rev:Coordinate>
</rev:input_port>
</rev:ReverseGeocodeUSLocationRequest>
</soapenv:Body>
</soapenv:Envelope>
This would be the response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:ReverseGeocodeUSLocationResponse xmlns:ns2="http://spectrum.pb.com/"xmlns:ns3="http://www.pb.com/spectrum/services/ReverseGeocodeUSLocation">
<ns3:output_port>
<ns3:Address>
<ns3:Latitude>41.071067</ns3:Latitude>
<ns3:Longitude>-73.549161</ns3:Longitude>
<ns3:StreetSide>R</ns3:StreetSide>
<ns3:Distance>50.4</ns3:Distance>
<ns3:PercentGeocode>50.0</ns3:PercentGeocode>
<ns3:FirmName/>
<ns3:AddressLine1>2995 Summer St</ns3:AddressLine1>
<ns3:AddressLine2/>
<ns3:LastLine>Stamford, CT 06905</ns3:LastLine>
<ns3:AdditionalInputData/>
<ns3:City>Stamford</ns3:City>
<ns3:StateProvince>CT</ns3:StateProvince>
<ns3:PostalCode.Base>06905</ns3:PostalCode.Base>
<ns3:PostalCode.AddOn/>
<ns3:PostalCode>06905</ns3:PostalCode>
<ns3:USUrbanName/>
<ns3:Country>United States of America</ns3:Country>
<ns3:LocationCode>AS0</ns3:LocationCode>
<ns3:MatchCode>NS1</ns3:MatchCode>
<ns3:StreetDataType>TOMTOM</ns3:StreetDataType>
<ns3:Confidence>100.0</ns3:Confidence>
<ns3:ProcessedBy>KGL</ns3:ProcessedBy>
<ns3:PBKey/>
<ns3:Status/>
<ns3:Status.Code/>
<ns3:Status.Description/>
<ns3:user_fields/>
</ns3:Address>
</ns3:output_port>
</ns3:ReverseGeocodeUSLocationResponse>
</soap:Body>
</soap:Envelope>