ReverseGeocodeAllCountries

ReverseGeocodeAllCountries takes a latitude and longitude point as input and returns the address that is the best match for that point.

Resource URL

JSON endpoint:

https://OnDemandServer/rest/ReverseGeocodeAllCountries/results.json

XML endpoint:

https://OnDemandServer/rest/ReverseGeocodeAllCountries/results.xml

For a list of Spectrum OnDemand servers, see Connecting to Spectrum OnDemand Servers.

Example with JSON Response

The following example requests a JSON response:

https://spectrum.precisely.com/rest/ReverseGeocodeAllCountries/results.json?Data.Latitude=-8.84549&Data.Longitude=13.23447 

The JSON returned by this request would be:

            {
   "Output":[
      {
         "AddressLine1":"21 DE JANEIRO",
         "City":"MAIANGA",
         "Country":"AGO",
         "StateProvince":"LUANDA",
         "County":"LUANDA",
         "Latitude":"-8.84549",
         "Longitude":"13.23447",
         "HouseNumberHigh":"",
         "HouseNumberLow":"",
         "HouseNumberParity":"U",
         "LastLine":"MAIANGA",
         "Locality":"MARTIRES DE KIFANGONDO",
         "Geocoder.MatchCode":"RS4A",
         "SegmentParity":"L",
         "StreetDataType":"1",
         "StreetName":"21 DE JANEIRO",
         "NumberOfCandidateRanges":"1",
         "NumberOfRangeUnits":"0",
         "SegmentCode":"00004147-4f00-0400-0000-0000000b3e04",
         "Distance":"0.0",
         "Language":"pt",
         "Ranges":[
            
         ],
         "user_fields":[
            
         ]
      }
   ]
}

Example with XML Response

The following example requests a XML response:

https://spectrum.precisely.com/rest/ReverseGeocodeAllCountries/results.xml?Data.Latitude=-8.84549&Data.Longitude=13.23447

The XML returned by this request would be:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xml.ReverseGeocodeAllCountriesResponse xmlns="http://www.pb.com/spectrum/services/ReverseGeocodeAllCountries">
    <Output>
        <Row>
         <AddressLine1>21 DE JANEIRO</AddressLine1>
         <City>MAIANGA</City>
         <Country>AGO</Country>
         <County>LUANDA</County>
         <Distance>0.0</Distance>
         <Geocoder.MatchCode>RS4A</Geocoder.MatchCode>
         <HouseNumberHigh />
         <HouseNumberLow />
         <HouseNumberParity>U</HouseNumberParity>
         <Language>pt</Language>
         <LastLine>MAIANGA</LastLine>
         <Latitude>-8.84549</Latitude>
         <Locality>MARTIRES DE KIFANGONDO</Locality>
         <Longitude>13.23447</Longitude>
         <NumberOfCandidateRanges>1</NumberOfCandidateRanges>
         <NumberOfRangeUnits>0</NumberOfRangeUnits>
         <Ranges />
         <SegmentCode>00004147-4f00-0400-0000-0000000b3e04</SegmentCode>
         <SegmentParity>L</SegmentParity>
         <StateProvince>LUANDA</StateProvince>
         <StreetDataType>1</StreetDataType>
         <StreetName>21 DE JANEIRO</StreetName>
         <user_fields />
        </Row>
    </Output>
</xml.ValidatePhoneNumberResponse>