Greetings,
I'm trying to get a geometry (object) from the database through JDBC. I
read the postgis documentation but I think it's not actualized - there
isn't any org.postgresql.Connection object but a
org.postgresql.PGConnection that hasn't any such method as
adddataType().
Example from POSGIS documentation:
---
...
((org.postgresql.Connection)conn).addDataType("geometry","org.postgis.PGgeometry");
((org.postgresql.Connection)conn).addDataType("box3d","org.postgis.PGbox3d");
Statement s = conn.createStatement();
ResultSet r = s.executeQuery("select AsText(geom) as geom,id from
geomtable");
while( r.next() ) {
PGgeometry geom = (PGgeometry)r.getObject(1);
...
---
How could I retrieve a geometry object from a postgresql (7.3.2)
database with postgis 0.7.4? How do I make a mapping or something like
that? I believe that AsText() delivers a text and not an object...
thanks,
Pedro Salazar.
P.S.- If this email is too much postgis than postgresql, I apologize for
the off-topic message.
--
PS
pedro-b-salazar@ptinovacao.pt
PGP:0E129E31D803BC61