ReverseGeocodeUSLocation
ReverseGeocodeUSLocation は、緯度と経度のポイントを入力として受け取り、そのポイントに最も近い住所を返します。例えば、次の情報を入力したとします。
Longitude: -105239771 Latitude: 40018912 Search Distance: 150 feet
この入力からは、次の出力が得られます。
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 は、次の手順でジオコードを処理します。
- ReverseGeocodeUSLocation は、入力されたジオコードと検索距離に基づいて小さな四角形を定義します。
- ReverseGeocodeUSLocation は、各通りセグメントから入力された場所までの距離を計算します。
- 最も近いセグメントを特定したら、ReverseGeocodeUSLocation は、オフセットと補完率を (圧縮係数を使って) 決定し、場所が通りのどちらの側かを判断します。次に、この情報を基にして近似の家番号を計算します。
入力された場所への距離が等しいセグメントが複数見つかった場合は、複数マッチが発生します。ReverseGeocodeUSLocation は、距離が等しいすべてのセグメントの情報を返すので、その中から適切なセグメントを判断できます。
- ReverseGeocodeUSLocation は、標準的な住所情報に加え、セグメントの範囲、近似の家番号、住所範囲の奇遇性なども返します。
ReverseGeocodeUSLocation を使うには、GSX ファイルという追加のデータ ファイルが必要です。ジオコーディング データベースをインストールする際に、これらのファイルをインストールするオプションを利用できます。GSX ファイルは、ジオコーディング データベースの GSX サブディレクトリに常にインストールします。Centrus Enhanced Points、Centrus Premium Points、または Centrus TomTom Points データベースをインストールする場合は、GSX ファイルを再作成する必要があります。GSX ファイルの詳細については、Pitney Bowes Software のテクニカル サポートにお問い合わせください。
リソース URL
http://server:port/soap/ReverseGeocodeUSLocation
例
SOAP リクエストを以下に示します。
<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>
<rev:input_port>
<rev:Coordinate>
<rev:Longitude>-73549161</rev:Longitude>
<rev:Latitude>41071067</rev:Latitude>
</rev:Coordinate>
</rev:input_port>
</rev:ReverseGeocodeUSLocationRequest>
</soapenv:Body>
</soapenv:Envelope>
応答は次のようになります。
<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>