Hi 
I'm using the OpenJump (v1.2) classes to read data from a postgis
database but I have some problems reading geometry columns. My code
looks as follows:

PostgisDataStoreDriver PgDriver = new PostgisDataStoreDriver();
PostgisDSConnection PgConn = (PostgisDSConnection)
PgDriver.createConnection(params);
AdhocQuery query = new AdhocQuery("SELECT * FROM
public.geo_gemeinden_v");

PostgisFeatureInputStream stream = (PostgisFeatureInputStream)
PgConn.executeAdhocQuery(query);
System.out.println(stream.getFeatureSchema().getGeometryIndex()); // ->
row number "2"

while(stream.hasNext()) {
  System.out.println(stream.next().getAttribute("name"));
  //System.out.println(stream.next().getGeometry());
}

The while loops just returns: "Unknown WKB type 48". Did I misunterstood
something with the AdhocQuery or do I have to treat geometry columns
different.  A query like "SELECT name, gem_bfs FROM
public.geo_gemeinden_v" works perfect.

Thanks for any help!

regards
Stefan



Mit freundlichem Gruss
Stefan Ziegler
Leiter Aufsicht

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn
Telefon 032 627 75 96
Telefax 032 627 75 98
[EMAIL PROTECTED]
http://www.so.ch

_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users

Reply via email to