|
XML•Use the GetTile Web Method Listing 1. This TerraService SOAP request message to the GetTile Web method specifies a USGS aerial photo bitmap tile with a 16 m/px scale from the scene corresponding to UTM zone 10 (West Coast) and the tile at the zone's easting 170 and northing 1,307. The average 10K response message contains the 8-bit indexed 200-by-200-pixel gray-scale JPEG bitmap as an XML Schema base64Encoded byte array. Changing the SOAP request method's <theme> element value to 2 returns a 25K or larger response message with a USGS color topo map GIF. <?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap=
"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetTile xmlns="http://terraserver-usa.com/">
<id>
<Theme>1</Theme>
<Scale>Scale16m</Scale>
<Scene>10</Scene>
<X>170</X>
<Y>1307</Y>
</id>
</GetTile>
</soap:Body>
</soap:Envelope>
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:soap=
"http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetTileResponse
xmlns="http://terraserver-usa.com/">
<GetTileResult>
/9j/4AAQSkZJRgABAQAAAQABAAD...
<!-- Intervening 9,000 base64 bytes
omitted for brevity -->
... soI4PLtkRWkVck7jyuSeeRknsD0r//Z
</GetTileResult>
</GetTileResponse>
</soap:Body>
</soap:Envelope>
|