GDAL Python Bindings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GDAL Python Bindings

whatnick-2
Hi,

GDAL already uses swig ngpython bindings, can't you reuse those ? There
is a gdalconst.py generated by swig which contains the enums.

Cheers,

Tishampati Dhar

 Software Developer

 APOGEE IMAGING INTERNATIONAL

 Building 12B

 1 Adelaide - Lobethal Road

 Lobethal SA 5241

  Telephone: +61 - 8 - 8389 5499

 Fax: +61 - 8 - 8389 5488

 Mobile: +61 - 406114165

Email: [hidden email] mailto:[hidden email]>

Web: www.apogee.com.au <http://www.apogee.com.au>

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"The information in this e-mail may be confidential and/or commercially
privileged. It is intended solely for the addressee. Access to this
e-mail by anyone else is unauthorised. If you are not the
intendedrecipient, any disclosure, copying, distribution or action taken
or omitted to be taken in reliance on it, is prohibited and may be
unlawful."



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of
[hidden email]
Sent: Monday, 29 October 2007 9:01 AM
To: [hidden email]
Subject: Qgis-developer Digest, Vol 20, Issue 25[Scanned]


Send Qgis-developer mailing list submissions to
        [hidden email]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
or, via email, send a message with subject or body 'help' to
        [hidden email]

You can reach the person managing the list at
        [hidden email]

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Qgis-developer digest..."


Today's Topics:

   1. Python bindings, GDAL, and SIP file help needed (Peter Ersts)


----------------------------------------------------------------------

Message: 1
Date: Sat, 27 Oct 2007 23:33:41 -0400
From: Peter Ersts <[hidden email]>
Subject: [Qgis-developer] Python bindings, GDAL, and SIP file help
        needed
To: qgis-developer <[hidden email]>
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

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.

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?

Can one of you python gurus give me a gentle kick in the right
direction?

Thanks in advance,
-pete

--
====================================
Peter J. Ersts, Project Specialist
American Museum of Natural History
Center for Biodiversity and Conservation
Central Park West at 79th Street
New York, New York 10024
Tel: (212)-496-3488 or (212)-769-5742
Fax: (212)-313-7295 or (212)-769-5292
Web: http://cbc.amnh.org
Web: http://geospatial.amnh.org

Open Source, Open Mind.
...evolving through community cooperation to change the world bit by bit




------------------------------

_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer


End of Qgis-developer Digest, Vol 20, Issue 25
**********************************************


_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: GDAL Python Bindings

Martin Dobias
On 10/29/07, Tisham Dhar <[hidden email]> wrote:
> Hi,
>
> GDAL already uses swig ngpython bindings, can't you reuse those ? There
> is a gdalconst.py generated by swig which contains the enums.

Hi Tisham,

I don't think this would be a good idea. First, we would introduce
dependency on GDAL python bindings. Second, and more importantly,
there seems to be a technical barrier - I have no idea how to connect
SIP and SWIG bindings. SIP must have complete information about the
types it uses, in this case it doesn't know what's the relation
between gdal headers and gdalconst.py.

Martin
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
Reply | Threaded
Open this post in threaded view
|

Re: GDAL Python Bindings

Mateusz Loskot
Martin Dobias wrote:

> On 10/29/07, Tisham Dhar <[hidden email]> wrote:
>> Hi,
>>
>> GDAL already uses swig ngpython bindings, can't you reuse those ? There
>> is a gdalconst.py generated by swig which contains the enums.
>
> Hi Tisham,
>
> I don't think this would be a good idea. First, we would introduce
> dependency on GDAL python bindings. Second, and more importantly,
> there seems to be a technical barrier - I have no idea how to connect
> SIP and SWIG bindings. SIP must have complete information about the
> types it uses, in this case it doesn't know what's the relation
> between gdal headers and gdalconst.py.

Tisham,

Dropping my 5 euro cents, I agree with Martin it's not a good idea as it
would be like reinventing the wheel. It's not a trivial taskand it took
a *lot* of time to achieve current state of Python bindings for GDAL.

The work was started 2.5 years ago by Kevin Ruland and then was taken
over by Howard Butler (hobu) who spend number of months this year to
bring the GDAL Python bindings stable and usable.

Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
_______________________________________________
Qgis-developer mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer