[Qgis-developer] Python bindings, GDAL, and SIP file help needed

Martin Dobias wonder.sk at gmail.com
Sun Oct 28 18:29:53 EDT 2007


On 10/28/07, Peter Ersts <ersts at amnh.org> wrote:
> Developers,
>
> I am currently working on refactoring the raster layer and have hit a
> brick wall with trying to generate a SIP file for on of the new classes.

Hi Peter,

I'm glad to see that you're trying to keep bindings up-to-date :)

> The basic SIP layout I have figured out by looking at the other SIP
> files, but I am running into problems referencing GDAL enums. I need
> access to GDALDataType, which is in gdal.h. Do I need to make another
> SIP file for gdal.h?

In this case I see several possibilities:
- do not wrap functions which need some external classes/enums
- wrap also that enum in a sip file
- replace that enum with some native qgis enum, use that one in functions

I would prefer the last option as it is the cleanest one. It's better
to have own types in public API instead of types of some 3rd party
tools / libraries. Moreover I think that what we would like to reach
in future is that raster layers implementation would be independent
from GDAL, so using own data type makes sense...

In case of some more troubles with SIP files don't hesitate to write again!

Bye
Martin



More information about the Qgis-developer mailing list