[postgis-devel] JDBC: Setting/Getting JTS-geometries using bi nd-vars

Aron Olsen ArO at CARLBRO.DK
Wed Jan 11 01:49:17 PST 2006


Hi Markus,

I did try to use the driver-extension / wrapper, but I couldn't get it to
work with JTS 1.6 (maybe because the extension was written for a JTS 1.6
beta release, or maybe it was because our current PostGres/PostGis version
was too old - I can't remember exactly why).

Anyway, I think its better not to be dependent on a certain driver, and that
is what I believe I have achieved. Can I rely on, that if I use the "plain"
driver, then I can always get geometries via PGobjects without having to use
special SQL-syntax ?

The nice thing with PGobject / hex-encoded WKB is that you are completely
independent of a specific Geometry-model (except that one will need to
re-write XXXParser and XXXWriter for every Geometry-model you want to use).

Regards,
Aron.

-----Original Message-----
From: Markus Schaber [mailto:schabi at logix-tt.com] 
Sent: 9. januar 2006 17:36
To: PostGIS Development Discussion
Subject: Re: [postgis-devel] JDBC: Setting/Getting JTS-geometries using
bind-vars

Hi, Aron,

Aron Olsen wrote:

> I was looking for a way to get JTS-geoms from ResultSets and to set
> JTS-geoms in PreparedStatements using bind-vars, but what I found was not
> very usefull. Usually everybody seems to use WKT, which requires a special
> SQL-syntax. This was not acceptable to me.

Did you try to use the PostGIS JDBC Driver extensions? The newer
versions provide a basic JTS geometry interface in addition to the
PostGIS original one.

Schabi

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org





More information about the postgis-devel mailing list