[Gdal-dev] Re: your GDAL in C#
szekerest at gmail.com
Sat Nov 18 15:32:51 EST 2006
It would be considerable to use the GDAL SWIG C# interface since it
seems to be easier to support along with the evolution of the GDAL
core. We are planning to expose most of the required functionality for
the next release.
However if you decide to use this interface feel free to share your
experiences and help us to discover the missing but required
functionalities and the possible problems. So as to collect these
problems we have also created a bugzilla component dedicated
exclusively to the C# interface.
2006/11/17, Simon Perkins <sy at perkins.net>:
> It's been a while since I looked at that code - the standard thing to do
> now is to migrate to using the SWIG generated C# bindings, though those
> are far from complete.
> OK, just looked at the code. GDALGetMetadaExt() is the declaration of
> the external (to C#) native GDAL function GDALGetMetadata(), that uses
> raw strings and pointers and so forth. However, to make the function
> easier from C#, the C# GDALGetMetadata() function has an API that uses a
> Dictionary object. The C# GDALGetMetadata() method simply calls
> GDALGetMetadataExt() to do the work, which in turn calls the underlying
> GDAL function.
> If you're getting zeros, I would check that you can use GDAL withe the
> C++ API first. Note that most file formats don't support metadata and
> will silently return null pointers. The "domain" flag should generally
> be null - it allows different metadata namespaces to be set up but I
> don't think any formats support that.
> BTW, the gdal-dev list is the place to ask questions like this. I've
> copied the list with my answer, for the record.
> MIKAH JAMES TRENT wrote:
> > Hi Simon,
> > I am working with the UW-Madison ecology labs as a student programmer. I am trying to use your C# code that you posted on
> > http://article.gmane.org/gmane.comp.gis.gdal.devel/6177
> > to see if we can use or extend your C# wrapper to incorporate GDAL into our own projects (see http://www.landis.forest.wisc.edu).
> > Could you help me understand what the function "GDALGetMetadataExt" does, or maybe just point me to where it is defined?? The following line of code (from InterOp.cs, in your function GDALGetMetaData):
> > void** stringList = (void**) GDALGetMetadataExt(hDataset, domain);
> > always returns 0 for me, even when I am certain the dataset is not empty. You also have 'domain' set to "null" (in Dataset.cs) when you call GDALGetMetaData. Could this have something to do with it??
> > I'm a little new to the whole system, so any help you could provide, even if it's just pointing me somewhere, would be great. Thanks a bunch,
> > -Mikah
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
More information about the Gdal-dev