[DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Mario Frasca
hallo list, 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

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Federico Di Gregorio
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.

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Mario Frasca
On 2006-1003 11:55:10, Federico Di Gregorio wrote: > psycopg supports type adaptation and type-caster registration > (yeah, buzz-words) for any Python or PostgreSQL type. yes, I had forgotten about psycopg2, sorry... :) I can't remember if type adaptation and type-caster registration are a prero

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Federico Di Gregorio
Il giorno mar, 03/10/2006 alle 13.17 +0200, Mario Frasca ha scritto: > I can't remember if type adaptation and type-caster registration are > a prerogative of psycopg2 or are in general available on all db-api2 > modules. They are a prerogative of psycopg but other drivers offer similar methods.

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Andy Dustman
On 10/3/06, Federico Di Gregorio <[EMAIL PROTECTED]> wrote: > > I just downloaded it. I'm mostly interested in seeing how you manage > > to translate data from postgresql to the client program. I mean: how > > you recognize it's gis data and not just any blob... > > Because they are real types i

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Mario Frasca
On 2006-1003 10:01:00, Andy Dustman wrote: > if you have a > function that does the necessary conversion into a Python type. ... do we need here to know the internal data format used by mysql? on their web site I could not find it. the only reference I say is at http://dev.mysql.com/doc/refman/

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Andy Dustman
On 10/3/06, Mario Frasca <[EMAIL PROTECTED]> wrote: > On 2006-1003 10:01:00, Andy Dustman wrote: > > if you have a > > function that does the necessary conversion into a Python type. > > ... do we need here to know the internal data format used by mysql? > on their web site I could not find it. t

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Mario Frasca
Hallo Andy On 2006-1003 10:24:42, Andy Dustman wrote: > http://dev.mysql.com/doc/refman/5.0/en/supported-spatial-data-formats.html > > I think these are OpenGIS formats. yes and no: these are the formats returned by the translation functions asBinary and asText. both take a geometry object an

Re: [DB-SIG] thoughts about OpenGIS extensions

2006-10-03 Thread Mario Frasca
just a note about parsing points, which worked... >>> import GeoTypes ... >>> cr.execute("select asBinary(geomFromText('POINT(34214.3412 34214.3412)'))") 1L >>> obj = cr.fetchone()[0] >>> obj '[EMAIL PROTECTED]@' >>> cr.execute("select geomFromText('POINT(34214.3412 34214.3412)')") 1L >>> obj = cr