<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Martin,</p>
<p>I bet you have GDAL_FORCE_CACHING=YES set. At least that was the
only way I could trigger the error.</p>
<p>I've queued in <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/6464">https://github.com/OSGeo/gdal/pull/6464</a> a fix for
that.</p>
<p>The first commit is sufficient to fix the issue despite being a
bit hacky, but you could cherry-pick it without changing GDAL ABI</p>
<p>The second commit is a cleaner fix.</p>
<p>Even<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 03/10/2022 à 19:05,
<a class="moz-txt-link-abbreviated" href="mailto:mchapman@hyperacktive.com">mchapman@hyperacktive.com</a> a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:00b701d8d74a$62942f60$27bc8e20$@hyperacktive.com">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<div class="WordSection1">
<p class="MsoNormal">All,</p>
<p class="MsoNormal"> </p>
<pre>I have an ECRG dataset that fails when reading pixels from the gdalrasterband object on one of the subdatasets. It appears that the underlying proxy dataset has a macro check called <span>RB_PROXY_METHOD_WITH_RET_WITH_INIT_BLOCK that fails because the block sizes are different. This happens for all the ECRG subdatasets that I read from, in other words it’s not just specific to a single dataset. FYI, the same code works fine for RPFTOC datasets and all other GDAL formats. I am using GDAL version 3.4.2.</span></pre>
<pre><span> </span></pre>
<pre><span>// code snippet from gdalproxydataset.cpp line 247</span></pre>
<pre><span>else if( nSrcBlockXSize != nBlockXSize || nSrcBlockYSize != nBlockYSize) \</span></pre>
<pre><span>{ \</span></pre>
<pre><span> CPLError(CE_Failure, CPLE_AppDefined, "Inconsistent block dimensions between proxy and source"); \</span></pre>
<pre><span> ret = CE_Failure; \</span></pre>
<pre><span>} \</span></pre>
<pre><span> </span></pre>
<pre><span>The variables nBlockXSize and nBlockYSize are (2304, 1) and nSrcBlockXSize and nSrcBlockYSize are {128, 128).</span></pre>
<pre><span> </span></pre>
<pre><span>I think this is because the ECRG frame size is 2304 x 2304 but the block size of the frame file is 128 x 128.</span></pre>
<pre><span> </span></pre>
<pre><span>Does anybody know what my problem might be or is this an error in the driver code?</span></pre>
<pre><span> </span></pre>
<pre><span>Best regards,</span></pre>
<pre><span>Martin</span></pre>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>