<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Even Rouault kirjoitti 21.11.2017 klo 16:06:<br>
    <blockquote type="cite" cite="mid:3272820.QKutdsYveo@even-i700">
      <meta name="qrichtext" content="1">
      <style type="text/css">
p, li { white-space: pre-wrap; }</style>
      <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">gdal_translate (actually GDALDatasetCopyWholeRaster()) uses the INTERLEAVE=PIXEL/BAND metadata item of the IMAGE_STRUCTURE domain as a hint whether to read band by band or all bands together</p>
      <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">So if you add the following, it should request all bands :</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">poDS->SetMetadataItem("INTERLEAVE", "PIXEL", "IMAGE_STRUCTURE")</p>
    </blockquote>
    <br>
    I don't see that happening in the case of WCS driver:<br>
    <br>
    PIXEL_INTERLEAVE=TRUE is my option to set the metadata item but it
    could be set with option INTERLEAVE=PIXEL, which
    GDALDatasetCopyWholeRaster() examines.<br>
    <br>
    8<-------------------<br>
    gdal_translate -oo PIXEL_INTERLEAVE=TRUE -oo OriginAtBoundary -oo
    CACHE=wcs_cache -srcwin 0 0 2 2
"WCS:<a class="moz-txt-link-freetext" href="http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?version=1.0.0&coverage=BGS_EMODNET_CentralMed-MCol">http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?version=1.0.0&coverage=BGS_EMODNET_CentralMed-MCol</a>"
    x<br>
    GNM: GNMRegisterAllInternal<br>
    GNM: RegisterGNMFile<br>
    GNM: RegisterGNMdatabase<br>
    Setting INTERLEAVE to PIXEL<br>
    GDAL:
GDALOpen(WCS:<a class="moz-txt-link-freetext" href="http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?version=1.0.0&coverage=BGS_EMODNET_CentralMed-MCol">http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?version=1.0.0&coverage=BGS_EMODNET_CentralMed-MCol</a>,
    this=0x1256210) succeeds as WCS.<br>
    Input file size is 2977, 3883<br>
    0GTiff: Reopen with strip chop enabled<br>
    GDAL: GDAL_CACHEMAX = 585 MB<br>
    GDAL: GDALDatasetCopyWholeRaster(): 2*2 swaths, bInterleave=1<br>
URL=<a class="moz-txt-link-freetext" href="http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?SERVICE=WCS&REQUEST=GetCoverage&VERSION=1.0.0&COVERAGE=BGS_EMODNET_CentralMed-MCol&FORMAT=GTiff&BBOX=9.83125,44.05624829,14.09792008,46.18958333&WIDTH=1024&HEIGHT=512&CRS=EPSG:4326&bands=1">http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?SERVICE=WCS&REQUEST=GetCoverage&VERSION=1.0.0&COVERAGE=BGS_EMODNET_CentralMed-MCol&FORMAT=GTiff&BBOX=9.83125,44.05624829,14.09792008,46.18958333&WIDTH=1024&HEIGHT=512&CRS=EPSG:4326&bands=1</a><br>
    HTTP:
Fetch(<a class="moz-txt-link-freetext" href="http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?SERVICE=WCS&REQUEST=GetCoverage&VERSION=1.0.0&COVERAGE=BGS_EMODNET_CentralMed-MCol&FORMAT=GTiff&BBOX=9.83125,44.05624829,14.09792008,46.18958333&WIDTH=1024&HEIGHT=512&CRS=EPSG:4326&bands=1">http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?SERVICE=WCS&REQUEST=GetCoverage&VERSION=1.0.0&COVERAGE=BGS_EMODNET_CentralMed-MCol&FORMAT=GTiff&BBOX=9.83125,44.05624829,14.09792008,46.18958333&WIDTH=1024&HEIGHT=512&CRS=EPSG:4326&bands=1</a>)<br>
    HTTP: libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32
    librtmp/2.3<br>
    WCS: GDALOpenResult() on content-type: image/tiff<br>
    GDAL: GDALOpen(/vsimem/wcs/0x1256210/wcsresult.dat, this=0x12a2610)
    succeeds as GTiff.<br>
    ERROR 1: Returned tile does not match expected band configuration.<br>
    Got 3 bands instead of one although the coverage has band range
    type.<br>
    <br>
    GDAL: GDALClose(/vsimem/wcs/0x1256210/wcsresult.dat, this=0x12a2610)<br>
    ERROR 1: wcs_cache/znQnc.xml, band 1: IReadBlock failed at X offset
    0, Y offset 0: Returned tile does not match expected band
    configuration.<br>
    Got 3 bands instead of one although the coverage has band range
    type.<br>
    <br>
    GDAL: GDALClose(wcs_cache/znQnc.xml, this=0x1256210)<br>
    GDAL: In GDALDestroy - unloading GDAL shared library.<br>
    8<-------------------<br>
    <br>
    <br>
    <br>
    Ari<br>
    <br>
  </body>
</html>