Hi, This sounds familiar. See http://www.mail-archive.com/jump-pilot-devel@lists.sourceforge.net/msg12342.html
I remember that the Spatialite db I had contained complicated and perhaps faulty multipolygons from some process. The error I got was the same "Unknown WKB type 0" "Unknown WKB type 0 java.sql.SQLException: Unknown WKB type 0 at org.freevoice.jumpdbqueryextension.spatialite.JumpSpatialiteDbQuery.ge tAttributeValueFrom Results(JumpSpatialiteDbQuery.java:359) What is odd is that this looks like jumpdbquery error, but with the same plugin and Spatialite db OpenJUMP r.3131 did not give me that error but version r3252 did. I will check if I have the data and those OJ versions on that computer but I am doubtful. I am pretty sure that this is not a multipolygon problem but a problem with some kind of multipolygons. Let's hope that Michaël or I can capture some problematic geometry. -Jukka Rahkonen- ________________________________________ Lähettäjä: Larry Reeder [lnree...@gmail.com] Lähetetty: 17. maaliskuuta 2013 16:36 Vastaanottaja: OpenJump develop and use Aihe: Re: [JPP-Devel] Spatialite reader plugin problem Michaël, my spatialite test dataset contains a mulitpolygon, and that loads without problems. Can you share your problematic DB file with me? Thanks.......... lreeder On Sun, Mar 17, 2013 at 6:00 AM, Michaël Michaud <michael.mich...@free.fr> wrote: > Hi Larry Reeder, Jukka, > > Just started to test OpenJUMP with spatialite plugins > > With JUMP DB Query Plugin, I cannot load a multipolygon > layer (coming from a shapefile). Is it a known limitation or did > I miss something ? > > - load shapefile containing multipolygons in spatialite (everything > is fine and multipolygon can be read and drawn with spatialite-gui) > - select from jump db query : get "Unknown WKB type 0" error message > > Change my multipolygon to simple polygons with OpenJUMP > - this tile, loading from OpenJUMP works smoothly > > Michaël > >> 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.sourceforge.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 ------------------------------------------------------------------------------ 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