Hei Guys,

I am traveling and have rarely time to read emails. I trust Michael if he wants to change something - if imediate need exists.

cheers from Zurich
stefan

Michaël Michaud schrieb:
Hi Rahkonen,

Hi,

I finally decided to have a try with PostGIS and OpenJUMP. That was mostly because I have been testing an extremely easy to use Windows utility for downloading OpenStreetMap data into PostGIS. I had no experience about PostGIS before last week and now I have been spending two evenings and trying to get OpenJUMP to play with PostGIS and now I think I have succeeded in that somehow. Here is my story, perhaps it will help somen other beginner one day.

OpenJUMP native tools "Add Datastore Layer" and "Run Datastore Query"

The only diificulty that I had with Add Datastore Layer was in making a new connection with connection manager. There the user must give the name for "Instance". It took me some time before I guessed that it means the same as the name of the database to be connected, isn't it? For me "database" would have been more natural term but there may be something in "instance" that I just do not know.
I agree. If others have no objection, I suggest we change "instance" to "database" or "database name"

After defining connection parameters lit a green light if everything was OK and very logically, otherwise not. And when the connection was right the rest was very simple. Datasets were selectable and "Where" window for writing in query worked just as I supposed.

"Run Datastore Query" was not just as easy. I has to browse through OpenJUMP mailing list archives before I learned that the query here must have SELECT AsBinary(geometry) for the geometry field. I really do not know it this must be in this way. I hope not because it means quite a lot of extra writing sometimes, but if it has to be this way I would add a hing for newbies in a very visible place. Perhaps in the Run Datastore Query dialog itself?
I agree this is not very easy to learn. I am not sure it is easy to simplify and to keep all the power of this free form. ...and it is more important for me to be able to make any query (as the "Add Datastore Layer" form can do easy queries, even with where clauses)
Note that :
AsBinary get a 2D geometry, even if the postgis geometry is 3D
To get the full 3D geometry, use AsEWKB


JUMP DB Query Plugin by Larry Reeder.
I have nothing bad to say about this plugin. I followed the installation procedure and after that the plugin worked as I supposed it to work. Very minory thing is that the manual does not tell clearly that Postgres driver should be droppen into the same jump_home/lib/ext folder than the other files. It was not too hard to guess, though.
Good to know.


PostGIS with SRID Plugin
The installation of this plugin went OK. However, I wonder why the Postgres driver must be copied into the Java directory instead of OpenJUMP lib or /lib/ext. Actually in the OpenJUMP installed from nightly build there seems to be newer Postres driver in /lib folder. Not a brand new that either. I wonder if I still need to copy that old driver into Java directory. In our managed environment I could not even do that by myself but I had to bother administrators. Strange thing with this plugin was that I managed to store new layers made with JUMP into new tables in PostGIS and read those self made tables back.
Writing capability is surely the main advantage of this plugin

However, I could not read the existing tables but got error messages like this:

java.lang.IllegalStateException: ERROR: syntax error at or near ","
at net.refractions.postgis.PostGISConnection.executeQuery(PostGISConnection.java:274) at net.refractions.postgis.PostGISConnection.executeQuery(PostGISConnection.java:1169) at org.openjump.core.ui.plugin.file.DataSourceQueryChooserOpenWizard.run(DataSourceQueryChooserOpenWizard.java:84) at org.openjump.core.ui.plugin.file.OpenWizardPlugIn.run(OpenWizardPlugIn.java:93) at com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:149)
at java.lang.Thread.run(Unknown Source)

SISDB plugin
I spent quite a long time installing and configurind this plugin for rather a stupid reason. When playing with the native connector I had learned that pressing Connect would lit a green light if settings were OK. This is not the case with SISDB but the red cross remains there even if the connection succeeds. The connection can be tested in the previous dialog by selecting the newly configured driver and opening the drop-down menu for available datasets. If the menu remains empty then the parameters are not set correctly. Once I realised that I had a database connection through SISDB plugin it was staright forward to perform Add Database Layer. It behaved just like the native PostGIS connector. However, Run Datastore Query with SISDB driver is used in another way because SISDB do not require "SELECT AsBinary" for the geometry field. Here I feel that SISDB way is better.
There is a hidden drawback with this nice plugin. The code is much more complex than the first one for about the same (apparent) capabilities.


I have had a lot of errors preventing data loading from PostGIS while playing with the different PostGIS plugins but I have not a clear vision yet about how I generate those. In conclusion I think that OpenJUMP support for PostGIS in not bad but it is not as good as is should be. First improvement might be to remove the need to use SELECT AsBinary with the native datastore query. Next I would like to see create/insert/update as a standard feature in OpenJUMP, and my third wish might be to have some kind of query builder. And if we need to have alternative plugins then perhaps all those might use same place for the postgres driver. Now I have that driver installed in four different places: java_home/lib/ext, jump_home/lib, jump_home/lib/ext and jump_home/lib/ext/sislib.
Thanks for your feedback


Regards,

-Jukka Rahkonen-
_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users



_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users


_______________________________________________
jump-users mailing list
[email protected]
http://lists.refractions.net/mailman/listinfo/jump-users

Reply via email to