<div dir="ltr">Yes I am finding it can be dependent on the input dataset dimensions - Im only reproducing with a large raster. It is perhaps a small problem anyway since apparently MapInfo will not handle files > 2GB anyway.<div>I will try using VSIFTruncateL to initialize. </div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 July 2016 at 15:21, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Le mercredi 13 juillet 2016 15:41:36, jramm a écrit :<br>
> jramm wrote<br>
><br>
> > gdalwarp -of NWT_GRD -ot Float32 -t_srs EPSG:4326 test.tif test.grd<br>
> ><br>
> > very quickly returns<br>
><br>
> Sorry this meant to read:<br>
><br>
> very quickly returns:<br>
><br>
> 0ERROR 1: /home/jamesramm/test.grd, band 1: IReadBlock failed at X offset<br>
> 0, Y offset 0<br>
> ERROR 1: GetBlockRef failed at X block offset 0, Y block offset 0<br>
<br>
</span>I don't manage to reproduce. Might perhaps depend on the dimensions of the<br>
input dataset and/or cache size used<br>
<br>
That said, it is not inconsistant that some code tries to read blocks on the<br>
newly created dataset. Probably that the Create() method should use<br>
VSIFTruncateL() to set the file to the full size if filling with zeroes is OK<br>
for the format. Otherwise you may need to pad with more appropriate values.<br>
That way potential IReadBlock() won't error out.<br>
<span class=""><br>
><br>
><br>
><br>
><br>
> --<br>
> View this message in context:<br>
> <a href="http://osgeo-org.1560.x6.nabble.com/Error-in-GDALWarp-to-NWT-GRD-tp5276136" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/Error-in-GDALWarp-to-NWT-GRD-tp5276136</a><br>
</span>> p5276137.html Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
<div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> gdal-dev mailing list<br>
> <a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</font></span></blockquote></div><br></div>