[postgis-users] Retrieving and storing Geography column data through JDBC (Java/Hibernate)

Paul Ramsey pramsey at opengeo.org
Fri May 21 07:27:28 PDT 2010

You should file a ticket on it... I think if you create a function
geography(bytea) that just call the ST_GeogFromWKB() function that
should get around your casting problem.

        RETURNS geography
        AS 'SELECT ST_GeogFromWKB($1)'


On Fri, May 21, 2010 at 7:00 AM, Kristof Adriaenssens
<kristof.adriaenssens at gmail.com> wrote:
> Hi all,
> We used the GeometryType Hibernate UserType that gets delivered with Postgis
> 1.5 (java/ejb3) to store and retrieve Geometry column data.
> This works fine but unfortunately it does not seem to support the new
> Geography data type.
> We tried storing Point and LineString Geometry objects (SRID set to 4326)
> but we get an exception that a bytea can't be converted to Geography.
> We use the org.postgis.DriverWrapper Driver class name which is supposed to
> automatically load support for the spatial types.
> Is there a known work-around that would work for us, preferably through
> JDBC?  If not now then are there plans to support this?
> Thank you!
> Kristof
> _______________________________________________
> 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