[postgis-users] I cannot geometric object

Ahmet Temiz temiz at deprem.gov.tr
Mon May 11 01:24:42 PDT 2009


hello

I am trying to get geometric data in java using from pooled postgresql/
postgis database like this:


   PGobject pgobj = (PGobject)rs.getObject(2);  
   System.out.println(" -- "+pgobj.getClass());
   System.out.println(" pgobj.getValue() "+ pgobj.getValue());
		        	   
 PGpolygon pol1=(PGpolygon)pgobj;  here exception occurs like:

 java.lang.ClassCastException: org.postgresql.util.PGobject cannot be cast to
org.postgresql.geometric.PGpolygon


what can I do ?


regards

Ahmet Temiz

--
Open WebMail Project (http://openwebmail.org)


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the postgis-users mailing list