[DB-SIG] thoughts about OpenGIS extensions

Federico Di Gregorio fog at initd.org
Tue Oct 3 11:55:10 CEST 2006


Il giorno mar, 03/10/2006 alle 11.49 +0200, Mario Frasca ha scritto:
> I'm starting to play around with OpenGIS extensions to MySQL and
> PostgreSQL.  well, a bit more than just playing around actually.
> 
> one thing I'm missing is the ability to handle OpenGIS objects as
> python OpenGIS objects.  right now I'm writing the queries so that I
> keep in memory (list of) point coordinates. 
> 
> where I'm working I would like to use the GPL library I've been working
> at since 2002.  but I miss a python OpenGIS class hierarchy.  actually I
> don't need that the library provides anything else than a class hierarchy,
> for the time being I don't need any operations on the OpenGIS objects...
> but I do need that the python interface modules recognize the OpenGIS
> data coming from the database as such.  
> 
> is this something I should add as user of the library, be it mysqldb or
> pgdb?  or should I expect the library to provide this data in a specific
> format? 

psycopg supports type adaptation and type-caster registration (yeah,
buzz-words) for any Python or PostgreSQL type. That means that you can
register adapters (Python->PostgreSQL) and type-casters
(PostgreSQL->Python) to convert your OpenGIS objects to PostgreSQL
OpenGIS types and vice versa.

This feature is used by the GeoTypes module that adds support for all
geometrical types to psycopg. See:

http://initd.org/tracker/psycopg/wiki/GeoTypes
http://initd.org/tracker/psycopg

Hope this helps,
federico

-- 
Federico Di Gregorio                         http://people.initd.org/fog
Debian GNU/Linux Developer                                fog at debian.org
INIT.D Developer                                           fog at initd.org
                  Beh un bacio, se ben dato, non si rifiuta. --  <laura>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
	firmata digitalmente
Url : http://mail.python.org/pipermail/db-sig/attachments/20061003/8cd07310/attachment.pgp 


More information about the DB-SIG mailing list