3

マルチパートの結果を OGC WCS サービスから socket._fileobject (fo) として取得しています。fo.read() の結果は次のようになります。

--wcs
Content-Type: text/xml
Content-ID: wcs.xml

<?xml version="1.0" encoding="UTF-8"?>
<Coverages
     xmlns="http://www.opengis.net/wcs/1.1"
     xmlns:ows="http://www.opengis.net/ows"
     xmlns:xlink="http://www.w3.org/1999/xlink"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.opengis.net/ows/1.1 ../owsCoverages.xsd">
  <Coverage>
    <Reference xlink:href="cid:coverage/out.tif"/>
  </Coverage>
</Coverages>
--wcs
Content-Type: image/tiff
Content-Description: coverage data
Content-Transfer-Encoding: binary
Content-ID: coverage/out.tif
Content-Disposition: INLINE
(a lot of binary data)--wcs--

そのバイナリ部分をファイル (out.tif) に保存する必要があります。そのために使用する Python ライブラリをいくつかお勧めし、使用例を書いていただけませんか?

ありがとうございました!

4

0 に答える 0