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

Simon Perkins sy at perkins.net
Wed Mar 21 18:37:13 EDT 2007

Is there a reason why we wrap the C interface rather than the C++ 
interface? The C++ interface seems closer to the C# model. Does SWIG not 
support that?



P.S. Still trying to work out how to read a polygon geometry via the C 
API. Does it appear as a collection of LinearRings? Is the outer ring 
specified in some way?

Tamas Szekeres wrote:
> Simon,
> Currently - for all of the SWIG bindings - you can access the various
> geometry types through the Geometry base class therefore you cannot do
> much derived class specific operations. However, indeed, it would be a
> nice addition to support separate classes for the geometry types like
> Polygon, LineString, MultiPoligon etc.
> This kind of implementation requires a widespead decision of the
> developers since a C# only implementation would bring in a great
> degree of divergence between the languages that should be highly
> avoided.
> Best regards,
> Tamas
> 2007/3/21, Simon Perkins <sy at perkins.net>:
>> Simon Perkins wrote:
>> > Do the latest C# bindings include the concrete OGR geometry classes? I
>> > just realized that my current version doesn't have things like
>> > OGR.Polygon, so I can't actually access the points in a Feature via
>> > OGR (if I'm not missing something).
>> OK, just looked in a bit more detail - so, it appears that the C#
>> bindings follow the C API more than the C++ one, with methods like
>> Geometry.GetPoint() and so on. So, if the geometry is a polygon, how do
>> we access the inner and outer rings?
>> Are we likely to see OGR.Polygon, OGR.LineString and so forth at any 
>> point?
>> Cheers,
>> Simon
>> _______________________________________________
>> Gdal-dev mailing list
>> Gdal-dev at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/gdal-dev

More information about the Gdal-dev mailing list