<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
Is it possible to define a bounding box in order to request a
coverage subset using the GDAL WCS Driver? I'm using the GDAL Java
API and need to access raster data delivered using GeoServer.<br>
<br>
The driver documentation (<a
href="http://www.gdal.org/frmt_wcs.html" rel="nofollow">http://www.gdal.org/frmt_wcs.html</a>)
does not contain a bounding box definition. I attempted to define
the bounding box in the xml configuration, but the requests
generated by the driver when using gdal.open(wcs.xml) return the
entire coverage instead of the requested area.<br>
<pre style="" class="lang-java prettyprint prettyprinted"><code><span class="pun"><</span><span class="pln">WCS_GDAL</span><span class="pun">></span><span class="pln">
</span><span class="pun"><</span><span class="typ">ServiceURL</span><span class="pun">></span><span class="pln">http</span><span class="pun">:</span><span class="com">//myserver/geoserver/wcs?</ServiceURL></span><span class="pln">
</span><span class="pun"><</span><span class="typ">Version</span><span class="pun">></span><span class="lit">1.1</span><span class="pun">.</span><span class="lit">0</span><span class="pun"></</span><span class="typ">Version</span><span class="pun">></span><span class="pln">
</span><span class="pun"><</span><span class="typ">CoverageName</span><span class="pun">></span><span class="typ">MyWorkspace</span><span class="pun">:</span><span class="typ">MyCoverage</span><span class="pun"></</span><span class="typ">CoverageName</span><span class="pun">></span><span class="pln">
</span><span class="pun"><</span><span class="typ">GetCoverageExtra</span><span class="pun">>&</span><span class="typ">BoundingBox</span><span class="pun">=</span><span class="lit">65.0104</span><span class="pun">,</span><span class="lit">31.1977</span><span class="pun">,</span><span class="lit">65.3287</span><span class="pun">,</span><span class="lit">31.4623</span><span class="pun">,</span><span class="pln">urn</span><span class="pun">:</span><span class="pln">ogc</span><span class="pun">:</span><span class="pln">def</span><span class="pun">:</span><span class="pln">crs</span><span class="pun">:</span><span class="pln">OGC</span><span class="pun">:</span><span class="lit">1.3</span><span class="pun">:</span><span class="pln">CRS84</span><span class="pun"></</span><span class="typ">GetCoverageExtra</span><span class="pun">></span><span class="pln">
</span><span class="pun"></</span><span class="pln">WCS_GDAL</span><span class="pun">></span></code></pre>
Ideally, I'd be able to retrieve the required data and process it
using tools provided by the GDAL. <br>
<br>
I'm able to define a url string (below) containing the desired
bounding box, open an HttpUrlConnection, and get a MimeMessage
containing the desired raster data as an InputStream. However, I
haven't attempted to use the InputStream to instantiate a GDAL
DataSet object.<br>
<pre style="" class="lang-java prettyprint prettyprinted"><code><span class="typ">String</span><span class="pln"> url </span><span class="pun">=</span><span class="pln"> </span><span class="str"><a class="moz-txt-link-rfc2396E" href="http://myserver/geoserver/wcs?service=wcs&version=1.1.1&request=GetCoverage&format=image/geotiff&identifier=MyWorkspace:MyCoverage&BoundingBox=65.0104,31.1977,65.3287,31.4623,urn:ogc:def:crs:OGC:1.3:CRS84">"http://myserver/geoserver/wcs?service=wcs&version=1.1.1&request=GetCoverage&format=image/geotiff&identifier=MyWorkspace:MyCoverage&BoundingBox=65.0104,31.1977,65.3287,31.4623,urn:ogc:def:crs:OGC:1.3:CRS84"</a></span><span class="pun">;
</span></code>
</pre>
<pre class="moz-signature" cols="72">--
Patrick</pre>
</body>
</html>