[postgis-users] JAVA and post GIS

Emily Gouge egouge at refractions.net
Mon Jan 30 08:26:16 PST 2006


Hi,

There is some documentation and an example on connecting to PostGIS using Java.  See:
http://postgis.refractions.net/docs/ch04.html#id2789526

You can add a datatype to the postgres connection and then the getObject() call will return a 
PGGeometry object:
((org.postgresql.Connection)conn).addDataType("geometry","org.postgis.PGgeometry");

Additionally you can also check out the postgis_jts jar, which provides the ability to return a 
JtsGeometry object (and subsequently to convert this object to a JTS Geometry object).

Emily



Fatemeh Abbasinejad wrote:
> I am new to PostGIS. Does anyone know how we can retrieve our defined data types 
> (like point,circle,...) from a ResultSet in java. I used getObject but it didn't work. 
>   -fatemeh
> 
> 		
> ---------------------------------
> Bring words and photos together (easily) with
>  PhotoMail  - it's free and works with Yahoo! Mail.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list