Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-17 Thread edgar . soldin
On 17.12.2015 07:21, Rahkonen Jukka (MML) wrote: > edgar soldin wrote: > >> just assumed because of >> https://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDataStoreDriver.java#l69 >> "new SQLiteConfig().enableLoadExtension(true

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-16 Thread Rahkonen Jukka (MML)
edgar soldin wrote: > just assumed because of > https://sourceforge.net/p/jump-pilot/code/HEAD/tree/core/trunk/src/com/vividsolutions/jump/datastore/spatialite/SpatialiteDataStoreDriver.java#l69 > "new SQLiteConfig().enableLoadExtension(true);" > but obviously this just autoloads the sqlite nativ

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-16 Thread Larry Reeder
I think you guys have figured this out, more details if not: DBQuery requires "spatialite=mod_spatialite" because this tells the SQLite drivers to load the spatialite extensions. I didn't want to hardcode the string "mod_spatialite" in case the Spatialite author changed the name of the shared lib

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-16 Thread edgar . soldin
On 16.12.2015 16:44, Rahkonen Jukka (MML) wrote: > Lähettäjä: edgar.sol...@web.de [mailto:edgar.sol...@web.de] > > >> issue with the sqlite extension libs seems to be that they are loaded by >> sqlite itself. all _we've_ got is the >> sqlite jdbc that seems to have a config switch to turn on

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-16 Thread Rahkonen Jukka (MML)
Lähettäjä: edgar.sol...@web.de [mailto:edgar.sol...@web.de] > issue with the sqlite extension libs seems to be that they are loaded by > sqlite itself. all _we've_ got is the > sqlite jdbc that seems to have a config switch to turn on autoloading *OR* > the SELECT load_extension(...); > *OR

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-16 Thread edgar . soldin
hey Jukka, On 16.12.2015 09:34, Rahkonen Jukka (MML) wrote: > Hi, > > I have nothing at all to complain and I think that you managed to add the > SQLite/Spatialite datastore very quickly. It just appears that in my Windows > environment the mod_spatialite extension is not found if I put all the

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-16 Thread Rahkonen Jukka (MML)
Hi, I have nothing at all to complain and I think that you managed to add the SQLite/Spatialite datastore very quickly. It just appears that in my Windows environment the mod_spatialite extension is not found if I put all the dll files into lib\ext which was the only place where I could make th

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-15 Thread Nicolas Ribot
Jukka, The SQLite/Spatialite code in OJ is quite new and barely tested with all combinations of sqlite flavours. There is a lot of room for improvement, especially with regards to loaded extension. Currently, mod_spatialite loading is detected and a boolean is set to tell the code if spatialite fu

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-15 Thread Rahkonen Jukka (MML)
edgar soldin wrote: > yes. DBQuery seems to insist on having the parameter > "spatialite=mod_spatialite". seems like it does > not enable the autoloading. > Larry: any reason for that? I think it is the right thing to do because the key feature of DB Query is that it is robust. It can read a

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-15 Thread edgar . soldin
On 15.12.2015 07:11, Rahkonen Jukka (MML) wrote: > You can test if Spatialite is available by using some Spatialite function in > the "where" box of the connection, for example > [where] ST_Area(geometry)>2 > The ne_110m_admin_0_countries layer should have 153 rows now. For me the > count is 0 b

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Rahkonen Jukka (MML)
n_0_countries; -Jukka- -Alkuperäinen viesti- Lähettäjä: edgar.sol...@web.de [mailto:edgar.sol...@web.de] Lähetetty: 15. joulukuuta 2015 0:53 Vastaanottaja: OpenJump develop and use Kopio: Nicolas Ribot Aihe: Re: [JPP-Devel] Adding other spatial databases support in OJ core ok, loadin

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread edgar . soldin
ok, loading the dataset works. Nico: why can't i modify my request via 'layer name context menu/Database/Edit Query'? Jukka&Nico: how can i check if spatialite is working? ..ede On 14.12.2015 22:59, Rahkonen Jukka (MML) wrote: > Hi, > > The latest ones are these: > http://www.gaia-gis.it/gaia

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Rahkonen Jukka (MML)
Hi, The latest ones are these: http://www.gaia-gis.it/gaia-sins/windows-bin-x86-test/mod_spatialite-4.4.0-RC0-win-x86.7z http://www.gaia-gis.it/gaia-sins/windows-bin-amd64-test/mod_spatialite-4.4.0-RC0-win-amd64.7z The list of the SQL functions of this version is at http://www.gaia-gis.it/gaia-s

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread edgar . soldin
On 14.12.2015 14:33, Rahkonen Jukka (MML) wrote: > I will give a better example once I have managed to make the brand new > SpatiaLite v. 4.4.0 version to work with OpenJUMP. The RC0 was published > today but it seems to miss some dependencies. Jukka, what is the latest libspatialite version a

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Nicolas Ribot
Thanks for the research. I will make modifications. I like the oracle logo ;) On 14 December 2015 at 13:00, wrote: > On 14.12.2015 11:22, Nicolas Ribot wrote: > > 4. > > what is the licensing for the icons? where do they come from? > > > > > > > > Postgresql: From official icons/logo: >

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Nicolas Ribot
$1.doIntersectionPrivilege(Unknown Source) > > at java.awt.EventQueue$4.run(Unknown Source) > > at java.awt.EventQueue$4.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at > java.security.ProtectionDoma

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Rahkonen Jukka (MML)
other spatial databases support in OJ core Here you are: http://latuviitta.org/documents/Spatialite_datastore_in_OpenJUMP.pdf Sample data http://latuviitta.org/downloads/ne_countries.sqlite. I have not discovered yet how to make datastore to use Spatialite or other SQLite extensions. Part 2 of our

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Rahkonen Jukka (MML)
Here you are: http://latuviitta.org/documents/Spatialite_datastore_in_OpenJUMP.pdf Sample data http://latuviitta.org/downloads/ne_countries.sqlite. I have not discovered yet how to make datastore to use Spatialite or other SQLite extensions. Part 2 of our GeoPackage blog posts gives an example a

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread edgar . soldin
On 13.12.2015 23:59, Rahkonen Jukka (MML) wrote: > Works now but SQLite jdbc driver must still be in \lib. Using > \lib\ext\dbdatastore gives ClassNotFound error. hey Jukka, can you give me a short step-by-step on how to load an sqlite dataset plus an example sqlite file? maybe including spatia

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread edgar . soldin
On 14.12.2015 11:22, Nicolas Ribot wrote: > 4. > what is the licensing for the icons? where do they come from? > > > > Postgresql: From official icons/logo: > http://www.postgresql.org/community/propaganda/, reduced and colors modified ok these are, Creative Commons Attribution-ShareAl

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Rahkonen Jukka (MML)
gt; at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.run(Unknown Source) > > > -

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Nicolas Ribot
ege(Unknown Source) > > at java.awt.EventQueue$4.run(Unknown Source) > > at java.awt.EventQueue$4.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at > java.security.ProtectionDomain$1.doIntersectionPrivilege

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-14 Thread Nicolas Ribot
On 13 December 2015 at 19:33, wrote: > Nico, > > 1. > i reverted your changes to pom.xml, which cannot stay in this fashion > anyway as the libs would be packaged into CORE. for now DB connectivity is > a PLUS feature to keep the CORE footprint small. > > also my guess it that it stops the build

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread Rahkonen Jukka (MML)
ead.pumpEventsForFilter(Unknown Source) > at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchT

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread edgar . soldin
) > at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.pumpEvents(Unknown Source) > at java.awt.EventDispatchThread.run(Unknown Source) > > &

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread Rahkonen Jukka (MML)
...@web.de [mailto:edgar.sol...@web.de] Lähetetty: 13. joulukuuta 2015 21:40 Vastaanottaja: jump-pilot-devel@lists.sourceforge.net Aihe: Re: [JPP-Devel] Adding other spatial databases support in OJ core Jukka, please try r4614 PLUS.. ede On 13.12.2015 19:00, Rahkonen Jukka (MML) wrote: > V

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread edgar . soldin
Jukka, please try r4614 PLUS.. ede On 13.12.2015 19:00, Rahkonen Jukka (MML) wrote: > Very interesting. Unfortunately r4609 did not build > http://vorboss.dl.sourceforge.net/project/jump-pilot/OpenJUMP_snapshots/OpenJUMP-20151213-r4609.log. > > > > -Jukka Rahkonen- > > > > Nicolas Ribot

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread edgar . soldin
On 13.12.2015 19:33, edgar.sol...@web.de wrote: > 3. > we keep icons in a special folder, please move them there > com.vividsolutions.jump.workbench.ui.images there even is an IconLoader class which is easy to use.. e.g. IconLoader.icon("application_mosaic.png"); ..ede

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread edgar . soldin
Nico, 1. i reverted your changes to pom.xml, which cannot stay in this fashion anyway as the libs would be packaged into CORE. for now DB connectivity is a PLUS feature to keep the CORE footprint small. also my guess it that it stops the build that was fine before. let me see what dependencies

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread Rahkonen Jukka (MML)
Very interesting. Unfortunately r4609 did not build http://vorboss.dl.sourceforge.net/project/jump-pilot/OpenJUMP_snapshots/OpenJUMP-20151213-r4609.log. -Jukka Rahkonen- Nicolas Ribot wrote: Hi, I made a commit (r4609) adding Spatial databases support for MySQL/MariaDB and Spatialite. Some p

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread edgar . soldin
seek, and ye shall find :)).. ede On 13.12.2015 17:34, Nicolas Ribot wrote: > I completely forgot the validateInput() method: perfect place to detect > invalid layers before sending them... ^^ > > Nicolas > > On 13 December 2015 at 16:31, Nicolas Ribot > wrote:

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread Nicolas Ribot
I completely forgot the validateInput() method: perfect place to detect invalid layers before sending them... ^^ Nicolas On 13 December 2015 at 16:31, Nicolas Ribot wrote: > Yes, I will look at another solution. > BTW, ImageCacheRenderer is already catching the Throwable when rendering, > and i

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread Nicolas Ribot
Yes, I will look at another solution. BTW, ImageCacheRenderer is already catching the Throwable when rendering, and issues a user warning in the Frame statusbar in case of error. Nicolas On 13 December 2015 at 16:27, wrote: > On 13.12.2015 16:17, Nicolas Ribot wrote: > > AFAIU, when choosing a

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread edgar . soldin
On 13.12.2015 16:17, Nicolas Ribot wrote: > AFAIU, when choosing a layer from a datastore, the OJ Layer is added to the > panel, then a separate thread tries to load the Features. This thread > triggers the actual SQL code for the layer. > Instead of testing the layer each time a WHERE clause is

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread Nicolas Ribot
Hi, I made a commit (r4609) adding Spatial databases support for MySQL/MariaDB and Spatialite. Some points concerning this commit: • FilterQuery and Adhoc queries are supported for all spatial databases • When a wrong WHERE clause is added to a datasource, SQL error is displayed and layer is rem

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-13 Thread edgar . soldin
the functionally correct approach of course would be adding the layer only after the request went trough fine. you can create layers and feature collections and throw them away if it wont work out. ..ede On 13.12.2015 00:17, Nicolas Ribot wrote: > Yes good idea, I will add a test before loading

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-12 Thread Nicolas Ribot
Yes good idea, I will add a test before loading a layer. Nicolas On 12 December 2015 at 20:22, Michaël Michaud wrote: > Hi Nicolas, > > Thanks for your answer. > > Just one idea about the problem Jukka has mentionned : > Maybe the query should be tested before the Layer is created. > A way to d

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-12 Thread Rahkonen Jukka (MML)
Are WKB and WKT really used in Spatialite? FDO system is probably using WKB but I have never met WKT geometries. More useful might be to support GeoPackage geometries and I suppose that DB Query Plugin has good native parser for them. I suppose you are making a pure java solution because with Sp

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-12 Thread Michaël Michaud
Hi Nicolas, Thanks for your answer. Just one idea about the problem Jukka has mentionned : Maybe the query should be tested before the Layer is created. A way to do that would be to add (or replace) the LIMIT clause with value 0 to have a lightweight query giving the opportunity to catch a SQ

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-12 Thread Nicolas Ribot
Hi Michaël, Thanks for the insight. I'm currently refactoring a bit the SpatialDatabases code. The error you pointed out showed me some problems with current code, and as you noted, I have to instantiate a correct, concrete class for each detected DSConnection. I'm finalising my todo list, but r

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-12 Thread Michaël Michaud
Hi Nicolas, I had a look but did not find an easy way to fix the problem. In SpatialDatabasesDSConnection you added a comment that it is no more necessary to subclass to PostGIS... On the other hand, - SpatialDatabasesDSConnection instantiates - SpatialDatabasesResultSetConverter which in tur

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-10 Thread Nicolas Ribot
Hi Jukka, I agree, will correct that. Nicolas On 10 December 2015 at 08:52, Rahkonen Jukka (MML) < jukka.rahko...@maanmittauslaitos.fi> wrote: > Hi, > > > > This version makes connection with out Oracle rather fast and reading data > is successful. > > > > I have one suggestion: If adding a new

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-10 Thread Giuseppe Aruta
Hi Nicholas, I agree for your proposal to add MariaDB/MySQL and Spatialite codes Peppe 2015-12-10 8:52 GMT+01:00 Rahkonen Jukka (MML) < jukka.rahko...@maanmittauslaitos.fi>: > Hi, > > > > This version makes connection with out Oracle rather fast and reading data > is successful. > > > > I have on

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-09 Thread Rahkonen Jukka (MML)
Hi, This version makes connection with out Oracle rather fast and reading data is successful. I have one suggestion: If adding a new layer fails because of some ORA-error it would be better not to add the layer into the OpenJUMP project. Test case: Add a layer with invalid WHERE. It seems to b

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-08 Thread Nicolas Ribot
Hi Michaël, I will look at it. Nicolas On 7 December 2015 at 23:12, Michaël Michaud wrote: > Hi > > Waw, thanks for this refactoring Nicolas ! > > Just noticed the following regression > > in the File > Execute Query plugin > If I try to query a postgis table as I did before, I get the followi

Re: [JPP-Devel] Adding other spatial databases support in OJ core

2015-12-07 Thread Michaël Michaud
Hi Waw, thanks for this refactoring Nicolas ! Just noticed the following regression in the File > Execute Query plugin If I try to query a postgis table as I did before, I get the following NPE : java.lang.NullPointerException at com.vividsolutions.jump.datastore.spatialdatabases.SpatialDa

[JPP-Devel] Adding other spatial databases support in OJ core

2015-12-07 Thread Nicolas Ribot
Hi, Oracle Spatial support has been added to OJ core (read-only). It works the same way as Postgis support: define a DB connection to Oracle and choose spatial layers from the list of found layers to display them in OJ Oracle 9i -> 12c supported (though only tested recently with Oracle 11i and 12