[gdal-dev] OGRCoordinateTransformation::Transform with multiple threads

Heiskanen Mika (FMI) Mika.Heiskanen at fmi.fi
Tue Aug 25 03:04:10 PDT 2020


?

> ?> my question is

> > starting from gdal-3.x OGRCoordinateTransformation object (::Transform() in

> > particular) is not intended to be used by multiple threads? With gdal-2.4

> > it worked fine.

> > OGRCoordinateTransformation, as most objects in GDAL, instances have never been

> intended from being used by multiple threads. That it might have worked in 2.4 was an implementation detail.

> > Even


The OGRCoordinateTransformation implementation class defines several (over 20) data members. Some of
them are altered during a transformation, and hence the implementation is not thread safe. At least the
variables used for reverse checking the result could be placed into the Transform method instead to improve
thread safety. However, since there were some many member variables I did not check them all.

Mika

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200825/c65ce89b/attachment.html>


More information about the gdal-dev mailing list