[gdal-dev] Is GDALFPolygonize thread safe ?

Jeff Lacoste jefflacostegdal at gmail.com
Thu Mar 14 08:56:33 PDT 2013


Great. Thanks Frank.

Yes I'm writing to distinct output OGR.

For GDAL drivers you mean that some of them might not be thread safe ? and
hence may not be used safely from multiple threads
even for read access ?

Is MapInfo OGR driver thread safe as long as i'm writing one distinct .tab
from one distinct thread ?

Jeff




On Thu, Mar 14, 2013 at 11:50 AM, Frank Warmerdam <warmerdam at pobox.com>wrote:

> Jeff,
>
> I reviewed the polygonize code and I don't see any multi-threading
> issues in it on quick inspection.
>
> The algorithm does read from GDAL and write to OGR so it would also be
> sensitive to issues with particular drivers.  The main GDAL drivers
> (ie. GeoTIFF, MEM) should be fine.  For writing OGR drivers like
> shapefile, or MEM should be ok.
>
> I'm assuming each thread is writing to a distinct output OGR supported
> datasource and layer.
>
> No guarantees unfortunately.
>
> Best regards,
> Frank
>
> On Thu, Mar 14, 2013 at 5:46 AM, Jeff Lacoste <jefflacostegdal at gmail.com>
> wrote:
> > Hi,
> >
> > 'GDALFPolygonize' create polygons from a raster band into a vector file.
> Can
> > this function called from multiple threads safely ?
> >
> > For ex. I have 10 raster files and would like to fire 10 threads. Every
> > thread opens a raster
> > and call GDALFPolygonize to generate a vector file in MapInfo format.
> >
> > Would this be concurrent safe ?
> >
> > Thanks
> >
> > Jeff
> >
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Software Developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130314/c1725062/attachment.html>


More information about the gdal-dev mailing list