Re: Can't read in a Landsat geotiff and use multiple threads to write out different windows at the same time
toggle quoted messageShow quoted text
Thanks Sean, very helpful and makes sense.
The VRT_SHARED_SOURCE option only affects the connection pool within the VRT driver code and that's not relevant to your code as far as I can see.
Each of your threads will need exclusive use of a dataset object. The simplest way to achieve this is to call rasterio.open(..., sharing=False) in new threads to get a new dataset and then close it before the thread is joined. Another way is to create a suitably-sized pool of dataset objects (also using the sharing=False option) within your application and then assign these to your threads on a as-needed basis.
I hope this helps,
On Mon, May 6, 2019 at 7:02 PM <ravery@...
I moved this github issue over here since it seems like more of a usage/help question. Below is the issue with a reproducible example if you have a Landsat tif.
The program fails at different windows when writing out windows with threads. This issue is related to this issue https://github.com/mapnik/node-mapnik/issues/437#issuecomment-103806098
I tried setting VRT_SHARED_SOURCE=0 with the rasterion.Env() context manager to allow threads to not step on each other but it didn't do anything.
Have others encountered this issue and found a solution?
Graduate Student, WAVES Lab
Department of Geography
University of California, Santa Barbara
Join email@example.com to automatically receive all group messages.