Hi,

This time I placed all the dll files into \lib and now connection seems to use 
mod_spatialite (Windows 7, Java 1.8.0_60 32-bit). I can verify that Spatialite 
is used by adding a WHERE filter like "ST_Area(geometry)>10000000". OJ log also 
shows that every request is made with ST_EnvIntersects

SELECT geometry,PK_UID,OGR_FID,ATTR_1,ATTR_2 FROM my_table WHERE 
st_envIntersects(geometry, 
-709866.989097,6610145.019159,1517040.459918,7803437.753982) AND (1)

I found a small bug: if I run OpenJUMP with Finnish locale the bounding box in 
st_envIntersects is having comma as a decimal separator and queries are 
failing. BBOX is like 
"-709866,989097,6610145,019159,1517040,459918,7803437,753982" and that 
naturally leads to an error
[SQLITE_ERROR] SQL error or missing database (wrong number of arguments to 
function st_envIntersects())
Workaround is to change into English locale with dot as a decimal separator.

I have still problem with "Run datastore query". It does work with the 
Spatialite connection for plain SQLite queries "SELECT * from table limit 20" 
but Spatialite functions fail and for example "select ST_Centroid(geometry) 
from my_table" gives

java.lang.Exception: SQL error:null
                             at 
com.vividsolutions.jump.datastore.spatialite.SpatialiteDSConnection.executeAdhocQuery(SpatialiteDSConnection.java:88)
                             at 
com.vividsolutions.jump.datastore.spatialdatabases.SpatialDatabasesDSConnection.execute(SpatialDatabasesDSConnection.java:63)
                             at 
com.vividsolutions.jump.workbench.ui.plugin.datastore.RunDatastoreQueryPlugIn.createLayer(RunDatastoreQueryPlugIn.java:77)
                             at 
com.vividsolutions.jump.workbench.ui.plugin.datastore.RunDatastoreQueryPlugIn.createLayerable(RunDatastoreQueryPlugIn.java:41)
                             at 
com.vividsolutions.jump.workbench.ui.plugin.datastore.AbstractAddDatastoreLayerPlugIn.run(AbstractAddDatastoreLayerPlugIn.java:33)
                             at 
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
                             at java.lang.Thread.run(Unknown Source)

-Jukka Rahkonen-





------------------------------------------------------------------------------
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to