I replaced the OpenJump classes with the "original" Jump 1.2 classes. Now everything works as expected. I was able to track it down to the PostgisValueConverterFactory class. Probably something with the WKBReader? I will take a deeper look into the sources of both classes in the next days.
regards Stefan > -----Ursprüngliche Nachricht----- > Von: Stefan Steiniger [mailto:[EMAIL PROTECTED] > Gesendet am: Freitag, 8. August 2008 02:46 > An: JUMP Users Discussion > Betreff: Re: [jump-users] Problems with Postgis classes > > I have no idea about Postgis, but don't you need to use as > AsBinary or so? > > stefan > > Ziegler Stefan schrieb: > > 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 > _______________________________________________ > jump-users mailing list > [email protected] > http://lists.refractions.net/mailman/listinfo/jump-users >
_______________________________________________ jump-users mailing list [email protected] http://lists.refractions.net/mailman/listinfo/jump-users
