[gdal-dev] OGRLayer.Intersection() question

Dheeraj Reddy Mamidi drmamidi at rothwellgroup.com
Thu Oct 10 09:24:50 PDT 2013


Hi list,

I have troubles with C# bindings of OGR. I was trying to perform
intersection on two feature classes (shape file formats) using
OSGeo.OGR.Layer.Intersection(), but have problems making it work. I keep
getting an error saying "AccessViolationException was unhandled. Attempted
to read or write protected memory. This is often an indication that other
memory is corrupt.

Is the above error something to do with SWIGTYPE_p_GDALProgressFunc
callback and OSGeo.OGR.SWIGTYPE_p_void callback_data arguments? I tried
passing those parameters null as suggested by some in the forums but I keep
getting the error "Attempt to dereference null GDALProgressFunc". I am not
sure what that means.

And when I instantiate callback as new SWIGTYPE_p_GDALProgressFunc() and
new callback_data as new SWIGTYPE_p_void(), I don't get error Attempt
to dereference
null GDALProgressFunc, but still have error saying AccessViolationException
was unhandled. Attempted to read or write protected memory. This is often
an indication that other memory is corrupt.

Can someone please help me figure this out and let me know how to make use
of OSGeo.OGR.Layer.Intersection() in the right way with c# bindings. Thank
you.

Thanks,
Dheeraj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20131010/009eea72/attachment.html>


More information about the gdal-dev mailing list