I may be completely wrong here, but is seems that your geometry is encoded
as WKB (Well Known Binary), but the driver is trying to access it as WKT (Well
Known Text).
Inside PostgisValueConverterFactory there's this code:
...
public ValueConverter getConverter(ResultSetMetaData rsm, int columnIndex)
throws SQLException
...
// MD - this is slow - is there a better way?
if (dbTypeName.equalsIgnoreCase("geometry"))
return WKT_GEOMETRY_MAPPER;
if (dbTypeName.equalsIgnoreCase("bytea"))
return WKB_GEOMETRY_MAPPER;
...
so it seems the driver assumes WKT for a geometry field and WKB for a bytea
field,
but newer versions of PostGIS use WKB for geometry, because of better
performances.
You can try using the SISDB driver instead. You can download it from:
http://sourceforge.net/project/showfiles.php?group_id=118054
<http://sourceforge.net/project/showfiles.php?group_id=118054&package_id=217237>
&package_id=217237
instructions are in a text file inside the .zip.
Bye
Paolo Rizzi
-----Messaggio originale-----
Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] conto di Pedro Doria Meunier
Inviato: mercoledì 7 febbraio 2007 9.30
A: 'List for discussion of JPP development and use.'
Cc: 'JUMP Users Discussion'
Oggetto: [JPP-Devel] Datastore query
Priorità: Alta
Hi group,
Trying to execute a valid query for a valid geom. type (point) fires this baby:
The query:
select friendly_name, curr_location from units where id=80000135;
in the table definition:
CONSTRAINT enforce_point CHECK (geometrytype(curr_location) = 'POINT'::text)
The 'baby':
com.vividsolutions.jts.io.ParseException: Unknown geometry type:
0101000020E6100000C05B2041B14EA94038F8C264EAC999C0
at
com.vividsolutions.jts.io.WKTReader.readGeometryTaggedText(WKTReader.java:434)
at com.vividsolutions.jts.io.WKTReader.read(WKTReader.java:193)
at com.vividsolutions.jts.io.WKTReader.read(WKTReader.java:162)
at
com.vividsolutions.jump.datastore.postgis.PostgisValueConverterFactory$WKTGeometryValueConverter.getValue(PostgisValueConverterFactory.java:60)
at
com.vividsolutions.jump.datastore.postgis.PostgisResultSetConverter.getFeature(PostgisResultSetConverter.java:47)
at
com.vividsolutions.jump.datastore.postgis.PostgisFeatureInputStream.getFeature(PostgisFeatureInputStream.java:72)
at
com.vividsolutions.jump.datastore.postgis.PostgisFeatureInputStream.readNext(PostgisFeatureInputStream.java:66)
at
com.vividsolutions.jump.io.BaseFeatureInputStream.hasNext(BaseFeatureInputStream.java:38)
at
com.vividsolutions.jump.workbench.ui.plugin.datastore.RunDatastoreQueryPlugIn.createLayer(RunDatastoreQueryPlugIn.java:55)
at
com.vividsolutions.jump.workbench.ui.plugin.datastore.RunDatastoreQueryPlugIn.createLayerable(RunDatastoreQueryPlugIn.java:27)
at
com.vividsolutions.jump.workbench.ui.plugin.datastore.AbstractAddDatastoreLayerPlugIn.run(AbstractAddDatastoreLayerPlugIn.java:32)
at
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:149)
at java.lang.Thread.run(Unknown Source)
btw: the geometry is SRID=4326.
Using openjump-20061203-0014.
JTS ver = 1.7.2
Any ideas as to what is happening?
BR,
Pedro Doria Meunier
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel