[postgis-users] PostGIS support of Geography data type in java jdbc driver?

Charles Galpin cgalpin at lhsw.com
Thu Feb 2 15:13:07 PST 2012


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



More information about the postgis-users mailing list