[Gdal-dev] Re: C# Geometry Classes?

Simon Perkins sy at perkins.net
Wed Mar 21 22:49:46 EDT 2007

I'm entirely new to SWIG, but if this follows a reasonably 
straightforward pattern I'd be happy to add this stuff.


- What files are going to need editing? Just swig/include/ogr.i?

- Is there a good template for what needs to be done? (or could you 
check in the start of one?)



Tamas Szekeres wrote:
> Simon,
> I could imagine a similar implementation like some of the gdal classes
> use MajorObject as a base class. For example we could add:
> %rename (Point) OGRPointShadow ;
> class OGRPointShadow : public OGRGeometryShadow {
> However we should still avoid exposing virtual methods, those might
> not be equally supported by the various SWIG language implementations.
> Best regards,
> Tamas
> 2007/3/22, Simon Perkins <sy at perkins.net>:
>> Howard Butler wrote:
>> >   Kevin and I's first cut actually wrapped the C++ API, but we were
>> > persuaded otherwise ;)
>> Yes, I remember the discussion... And the C API seemed to make sense for
>> GDAL, but now that I've started to use OGR as well, the C API seems a
>> little limited compared to the C++ one. The Geometry hierarchy in OGR
>> really cries out for an object oriented API, while GDAL doesn't seem to
>> have quite the same needs.
>> I wonder then, whether the OGR C API could do with some enhancements to
>> provide functions that are more focused on specific geometry types?
>> Cheers,
>> Sy

More information about the Gdal-dev mailing list