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 [EMAIL PROTECTED] INIT.D Developer [EMAIL PROTECTED] Beh un bacio, se ben dato, non si rifiuta. -- <laura>
signature.asc
Description: Questa รจ una parte del messaggio firmata digitalmente
_______________________________________________ DB-SIG maillist - DB-SIG@python.org http://mail.python.org/mailman/listinfo/db-sig