[postgis-users] different results from PGobject.getValue()

Markus Schaber schabi at logix-tt.com
Tue Feb 13 06:51:40 PST 2007


Hi, Claude,

"Claude Eisenhut" <ce at eisenhutinformatik.ch> wrote:

> > > Is it expected behaviour that PGobject.getValue() returns different
> results,
> > > depending if postgis.jar is on the classpath?
> >
> > Yes, it is expected.
> 
> I would prefer, if the semantic of the base is not changed.
> Why not a different function in PGgeometry?

Because the semantic for "getValue()" is "give me the string
representation of whatever the server can parse". So, using a different
function defeats the porpose of PGObject, and always returning the hex
value breaks compatibility with old PostGIS releases (as the PGgeometry
object has no idea for which server it's called).

You can, however, turn of the automagic registration (or redirect it to
PGgeometrylw) by editing the org/postgresql/driverconfig.properties
file in the postgis.jar

Btw, we might drop PostGIS 0.X support eventually, or change the
autoregistration to use the PGgeometrylw class, what do you think about
that?

Regards,
Markus

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

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



More information about the postgis-users mailing list