<div dir="ltr"><div>Hello,</div><div><br></div><div>Okay, all of that is well-taken. Thank you for your response.</div><div><br></div><div>> If you're not interested in the pixel values, using GDALSuggestedWarpOutput2() </div><div>
is a better fit.</div><div><br></div><div>Yes, my question was worded a bit unclearly: I am essentially interested in retrieving warped tiles so the pixels are of primary interest.</div><div><br></div><div>Thank you,</div><div>James McClain</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Feb 15, 2019 at 4:58 AM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On vendredi 15 février 2019 00:06:28 CET James McClain wrote:<br>
> Hello,<br>
> <br>
> If I may, I would like to a few questions regarding how best to use the<br>
> GDALWarp function (<br>
> <a href="https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdalwarp_lib.cpp#L748-L7" rel="noreferrer" target="_blank">https://github.com/OSGeo/gdal/blob/master/gdal/apps/gdalwarp_lib.cpp#L748-L7</a><br>
> 70) and the datasets that it creates.<br>
> <br>
> In particular, I am experimenting with using such datasets to read warped<br>
> extents on an on-demand basis and in a thread-safe way.<br>
> <br>
> I have found that the VRT output format is lazy with respect to computation<br>
> and allocation which is great for my use case, but it appears not to be<br>
> thread safe with respect to reading from a single warped dataset from<br>
> multiple threads.<br>
<br>
No single GDALDataset object of any driver should be used simultaneously by <br>
multiple threads (this extends to any GDAL/OGR class instance). If this seems <br>
to work for GTiff, you're just lucky, but that might just fail as well.<br>
If you need to access a dataset from several threads, each one should have its <br>
own GDALDataset object (so this won't work for the MEM driver)<br>
<br>
> <br>
> On a more meta level, are datasets created by GDALWarp the right approach<br>
> (if I want to lazy get warped extents in a thread-safe manner) or should I<br>
> look elsewhere?<br>
<br>
If you're not interested in the pixel values, using GDALSuggestedWarpOutput2() <br>
is a better fit.<br>
<br>
Even<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a></blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">"I prayed for freedom for twenty years, but received no answer until I prayed with my legs."<br> -- Frederick Douglass<br><br></div></div></div></div>