[Gdal-dev] GDALDataset as a Base Class

Ivan Lucena ILucena at clarku.edu
Thu Aug 31 09:53:14 EDT 2006

Hi there,

Mateusz Loskot wrote:
> And? Something wrong with those wrappers? I've never seen them, but
> I'm not sure what is the problem here, if any.

That is ok. I understand. The issue is more sensible to Frank. So I
believe his answer is good enough for both of us. 

> Pointers are nothing bad, even good, but only if used correctly.
> I'm not sure what to try to observe there.

I am showing a piece of my C++ implementation that uses GDALDataset
pointer as an attribute of my class. The things that Matt Hanson tried
to do in C++ I've tried too a year ago. But I finally give it up to the
"good use of pointer". It works and it is robust and I encouraging Matt
to keep doing this way. We both agree with that. I just have a sense
that the use of this kind of class-pointers is an indicator that
something is lacking. IMHO you should be able o develop in C++ without
ever looking to the GDAL C API.

But that leads to the discussion about the proliferation of GDAL
wrapper. So Frank had thought about that a long time ago, by adoption
SWIG. My questions is: Are we relying too much in SWIG and wrapper and
maybe there is something that could me done at once in GDAL?
> Idea about what?
> COM wrapper would good for Windows environment because COM provides
> highest flexibility of reuse -> scripting languages, .NET, VC6, and 
> even C/C++ -  without additional wrapping layer. 
> So, personally if I'd need a GDAL wrapper for .NET, I'd go with COM.
> Also COM-CORBA bridging is possible, but I don't see any
> application here.

So Mateusz, Now that you've got the "Idea", let's talk:

If you look around what the "competitors" (the GDAL's analogous) are
doing (there is a bunch of SDK to deal with geo-spatial data and
functionality out there, MapXtreme, ArcObject, BlueMarble, TatukGIS,
Abaco, etc.) They are developing in a "component" oriented fashion.
Don't you think so? Or whatever name you like to put on it. By doing
this way they can easily take the advantage of implementing the API
trough technologies like COM and have it done only once. Document once
too. For example, browsing at edn.esri.com I don't need to see only
Delphi example to learn some tricks. I can see then in C++, C# or
VB.NET, etc.

I have worked with UNIX for 10 years but I am out of it for 7, so I
don't know what is going on there. But I think that by exposing classes'
names and behavior and attributes though a C++ library it is not going
to make a lot of difference from a COM interface. That "COM-CORBA
bridging" think look interesting I will check it out...

GDAL architecture is really good. I use it trough C++, Python and trough
my own Delphi wrapper :-).  My Delphi plans are still the same: develop
a wrapper. It is fun. Some little tricks will make my wrapper easier to
user and therefore more productive. So, it looks like Matt and I have
the same goal.

Finally, if that is the philosophy of GDAL. I don't argue about It. It's
an excellent base layer and we will continue to create ours wrappers.

I guess that because we all want the best for GDAL, productive
discussions are welcome and I am hope that I wasn't misinterpreted as
rude. E-mail, you know...

Thanks Mateusz, Matt and thank you very much Frank,

Ivan Lucena

More information about the Gdal-dev mailing list