Hi, Because Jump DB Query plugin is doing things is a simple way it is also very robust. For example it has no troubles with reading data from new Spatialite v 4.0 databases. More sophisticated drivers and programs which are doing nice things by reading and interpreting metadata from the database are not backward compatible. As a user I appreciate very much this plugin which can always do the essential thing by reading geometries and attributes from database. It is missing advanced functions but I can tolerate that if I have the data. It is much better alternative than to have great possibilities but no data.
Spatialite is somewhat unreliable as a transfer format for geospatial data because the db engine is in the external SQLite and Spatialite binaries. The database data file, "sqlite database" may be created so that it is using advanced features but if user's application has binaries which do not support those functions then there will be troubles. For example on-the-fly reprojecting view "SELECT ST_Transform(geometry,4326)" does not work if user's SQLite driver does not load Spatialite extension or if it is loading so old extension that "ST_Transform" is only defined by another name "Transform". I consider that all Spatialite applications should be made to support a similar robust reading mode than Jump DB Query plugin. How about adding DB Query plugin to the OJ Plus version? The plugin itself is only 520 kB. Spatialite jdbc file makes additional 3 MB and Oracle jdbc file 1.5 MB. With 5 MB extra load we could offer a robust read access to both Oracle and Spatialite. Licenses seem to allow redistribution of drivers. -Jukka Rahkonen- Larry Reeder wrote: > > You're right, guys. As Jukka says, since spatialite and sqllite clients do > all the > work, without the typical database backend, you need to load the spatialite > libraries to get spatialite functions. > The Jump DB Query plugin doesn't load those libraries, and functions > don't work. The plugin just uses java code to extract features by > parsing the raw encoding in the spatialite DB. > > -lreeder > > On Mon, Mar 11, 2013 at 11:17 PM, Rahkonen Jukka > <jukka.rahko...@mmmtike.fi> wrote: > > Michaël Michaud wrote: > > > >> Hi Jukka, > > > >> I had a look on both plugins source code. > >> I could not see anything obvious, they seem to parse spatialite > geometries about the same way. > >> SQLite store geometries in a blob including ewkb + a few extra > information. EWKB part is parsed by JTS in both cases. > >> I must have a deeper look. > >> Also I don't understand why the second plugin can access database > functions and not the first. > >> Function execution is supposed to be performed by spatialite, not by the > plugin. > >> OK, I have to install all that if I want to make serious tests. > >> Will take some time... > > > > I understand it so that function execution is performed by SQLite. It > > does not have Spatialite functions before it loads them from > > Spatialite extension and Sandro was doing it in his Java test as > > > > import org.sqlite.SQLiteConfig; > > ... > > SQLiteConfig config = new SQLiteConfig; > > config.enableLoadExtension(true); Connection conn = > > DriverManager.getConnection("path", config.toProperties); Statement > > stmt = conn.createStatement(); stmt.execute("SELECT > > load_extension('/usr/local/lib/libspatialite.so')"); > > > > The calling SQLite part must have been compiled so that extension loading > is allowed. I am remembering that by default it is not. > > > > -Jukka- > > > > > > > > > >> Michaël > > > > > > Hi, > > > > I started a new thread about this plugin. > > > > We have two plugins for Spatialite. The first is Spatialite DB Query > > plugin and the second Spatialite Reader plugin. DB Query plugin works. > > However, it is not really a Spatialite plugin because it does not use > > any Spatialite extentions. It is a SQLite plugin which can read > > attributes and geometries from SQLite database through jdbc driver. > > There are two different ways for storing geometries into SQLite > > database and this plugin understands them both. However, DB Query > > plugin can't use special Spatialite functions in the SQL queries. The > > list of current Spatialite SQL functions shows what possibilities all > > we are missing because of this > > http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.0.0.html > > > > I had some troubles with DB Query plugin and with one certain Spatialite > database. I haven't been able to reproduce the problem so I think it was > nothing critical. > > > > The Spatialite Reader plugin can utilize Spatialite functions and on Windows > it happens through the "libspatialite-1.dll" library. The immediate problem > we have now with OpenJUMP 1.6 (actually all OJ versions since 1.3.1) is that > something goes wrong with converting Spatialite geometries into OJ > geometries. Results look pretty odd as you can see from the attached screen > capture. Geometries of point layers are placed on a horizontal line with zero > North coordinates while the East coordinates seem to be correct. Line layer > becomes a set of vertical lines. > > > > I put the plugin version which behaves for me like I described here > http://latuviitta.org/documents/spatialite_reader_plugin.zip. > > > > In addition to the geometry problem there would also be a need to update > the plugin. Spatialite database file holds just the data and some metadata > about the data and database and for running the database operations the > sqlite3 and spatialite libraries are used. I checked that with the libraries > included with the Spatialite reader plugin the new Spatialite databases > created with Spatialite 4.0 version can't be opened. I guess that a new > spatialite.dll version would be needed for that. And even if the database is > made with Spatialite 3.0 version some features, like the routing > VirtualNetwork tables can't be used. I suppose that this is because virtual > tables are a new SQLite feature and for using them the sqlite3 binaries > should be updated. > > > > Ideal solution would be do build the plugin again by using most recent > > SQLite and Spatialite version but I fear it is difficult. Programmers > > may understand how it goes from this blog post by Alessandro Furieri > > http://www.gaia-gis.it/gaia-sins/java-test/JavaTestCoverage.pdf > > > > Perhaps fixing the geometry conversion with OJ 1.6 would be an easier > task. > > > > -Jukka Rahkonen- > > > > > > > > > > ---------------------------------------------------------------------- > > -------- Symantec Endpoint Protection 12 positioned as A LEADER in The > > Forrester > > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in > > the endpoint security space. For insight on selecting the right > > partner to tackle endpoint security challenges, access the full report. > > http://p.sf.net/sfu/symantec-dev2dev > > > > > > > > _______________________________________________ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net<mailto:Jump-pilot-devel@lists.s > > ourceforge.net> > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > > > > > > > ---------------------------------------------------------------------- > > -------- Symantec Endpoint Protection 12 positioned as A LEADER in The > > Forrester > > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in > > the endpoint security space. For insight on selecting the right > > partner to tackle endpoint security challenges, access the full report. > > http://p.sf.net/sfu/symantec-dev2dev > > _______________________________________________ > > Jump-pilot-devel mailing list > > Jump-pilot-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics Download AppDynamics Lite > for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel