Hi
I was just trying to parallelize buffering of a large set of polygons using
GDAL 2.1 in C#.
My code is something like the following:
List<Geometry> polygonList = List of polygons...
var result = new ConcurrentBag<Geometry>();
Parallel.ForEach(polygonList, polygon =>
{
var polygonBuffer = polygon.Buffer(1, 1);
result.Add(polygonBuffer);
});
I get a System.AccessViolationException in ogr_csharp.dll on the Buffer(...)
line. Since my method runs fine using a normal foreach or if I omit the
Buffer(...) method, I assume it has something to do with thread safety and OGR.
So is my problem just that OGR Buffer(...) isn't thread safe or am I doing
something wrong here?
Regards, Casper
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev