[postgis-users] PostGIS support of Geography data type in java jdbc driver?
Jay Moss
jaymoss3 at gmail.com
Thu Feb 2 15:34:54 PST 2012
the real code has correct syntax, that's a copy/paste error on my part.
On Thu, Feb 2, 2012 at 4:13 PM, Charles Galpin <cgalpin at lhsw.com> wrote:
> I'm not sure about the support for geography but I see you need a comma
> between id and locGeog
>
> -- charles
>
> On Feb 2, 2012, at 5:58 PM, Jay Moss <jaymoss3 at gmail.com> wrote:
>
> > Is there any support for the Geography data type in the PostGIS JDBC
> driver?
> >
> > I received a classCastException if I try to cast a Geography colum to a
> PGgeometry:
> >
> > my table:
> >
> > CREATE TABLE k16View (
> > id character varying(255) NOT NULL,
> > locGeog geography
> > CONSTRAINT k16View_pkey PRIMARY KEY (id));
> >
> > my code:
> > ...
> > ResultSet r = s.executeQuery("select id locGeog from k16View");
> > String trackNumber = r.getString(1);
> > PGgeometry geog = (PGgeometry) r.getObject(2); // throws
> ClassCastException
> >
> >
> >
> >
> > _______________________________________________
> > postgis-users mailing list
> > postgis-users at postgis.refractions.net
> > http://postgis.refractions.net/mailman/listinfo/postgis-users
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120202/a93b24cf/attachment.html>
More information about the postgis-users
mailing list