GPX Plug-in Version 1.2 for Andre

39 views
Skip to first unread message

Landon Blake

unread,
Nov 29, 2011, 3:06:40 PM11/29/11
to OpenJump develop and use, openjum...@googlegroups.com
Andre,

You can download the 1.2 version of my GPX plug-in here:

https://sourceforge.net/projects/surveyos/files/SurveyOS%20OpenJUMP%20Plug-Ins/GPX/

You need to put the contents of the "lib" folder in the lib folder of
your OpenJUMP installation folder. You need to put the contents of the
"ext" folder in the zip file into the lib/ext folder of your OpenJUMP
installation folder.

If the plug-in installs correctly you should have a new "SurveyOS"
menu with a menu item to import a GPX file.

If the plug-in doesn't install properly or you get an error message,
let me know and I will try to help you fix the problem.

The plug-in was compiled in the latest stable version of Eclipse using
JDK 7 and a 1.6 Java version compiler setting.

It was tested on the latest stable release of OpenJUMP on my Windows 7
computer and opened a GPX file with no problems.

I hope this helps!

Landon

edgar....@web.de

unread,
Nov 29, 2011, 4:10:15 PM11/29/11
to openjum...@googlegroups.com
why did you choose 1.6 compliance? oj is 1.5 .. ede

Landon Blake <sunburned...@gmail.com> schrieb:

andre tanoe

unread,
Nov 29, 2011, 9:46:04 PM11/29/11
to openjump-users
hello Landon,

i got an error message window saying:
No Class Def Found Error
Org/jdom/input/SAXBuilder (No Class Def Found Error)

and when i press the 'show details button', found this statement:
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
at
com.vividsolutions.jump.workbench.WorkbenchPropertiesFile.<init>(WorkbenchPropertiesFile.java:
70)
at
com.vividsolutions.jump.workbench.JUMPWorkbench.<init>(JUMPWorkbench.java:
253)
at
com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:
373)
at
com.vividsolutions.jump.workbench.JUMPWorkbench.main(JUMPWorkbench.java:
340)
Caused by: java.lang.ClassNotFoundException: org.jdom.input.SAXBuilder
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more

I am using windows 7, but im not sure about my java program. i tried
to search, i found these programs are installed in my computer:
- java 2 runtime environtment standard edition v1.3.1_20
- java (TM) 6 update 17
- java (TM) 6 update 24

hope it helps you to find the cause. thank you very much.


On Nov 29, 3:06 pm, Landon Blake <sunburned.surve...@gmail.com> wrote:
> Andre,
>
> You can download the 1.2 version of my GPX plug-in here:
>

> https://sourceforge.net/projects/surveyos/files/SurveyOS%20OpenJUMP%2...

Landon Blake

unread,
Nov 29, 2011, 9:51:07 PM11/29/11
to openjum...@googlegroups.com
Hmmmm. Maybe OJ has an older version of JDOM than the one I'm using in
my build. Can you tell me if there is a JDOM JAR file in the lib
directory of your installation?

Please be patient with me. We will get it working...I promise. :]

Landon

andre tanoe

unread,
Nov 29, 2011, 11:01:16 PM11/29/11
to openjump-users
No, currently there is no JDOM.
previously i got the JDOM from GPX plug-in v1.1, but i removed all
files from v1.1. before installing your v1.2

after you mention it, i tried to add JDOM again from v1.1.
My OJ opens without error, when i trying to open GPX, the list of
choices does not contain GPX format. and still cannot open gpx files.

hahaha.........
i really appreciate your help Landon, we dont know each other but you
are willing to help me. that is really something.
so, dont worry. patient is my middle name. Thank you for your
attention.

Chris Cooper

unread,
Jan 12, 2012, 4:38:06 PM1/12/12
to openjum...@googlegroups.com
Thanks to Landon's post above - this solved one problem for me. I had previously installed the OLD 2003/6? code still available on Vivid's website somewhere.
I soon found the real repository and installed the current version. However despite the new install, the old JDOM files were still resident in a different directory.

OJ worked fine, until I installed the Roadmatcher plugin - at which point it mysteriously switched to starting the OLD JDOM file - and crashing.
I found I could run the Window .bat file to make it work, but the .exe file would always crash - even if I removed the plugin files - i.e. the 'state' changed somehow.
I checked the Windows Registry and ini files, but could find no clues. But the post above led me to hunt for an 'old' JDOM file - and sure enough there it was in a temp folder!

I removed it, and this has worked - now it opens the current version, and with the RoadMatcher plugin.

HOWEVER - I still can't get the GPX plugin to work. All files unzipped and installed to lib and ext directories as meant to. But the menu item SurveyOS does not appear.
My setup seems identical to my colleagues, who runs Linux - yet he HAS got the GPX plugin menu item.

Using his setup, we can load GPX files and see them on the map, but can't then save the project, or run RoadMatcher, due to errors.
I was told there was some slight update to the GPX plugin on these forums (later than up on Sourceforge), which we tried but still to no avail.

I am very new to OpenJump, and very keen to make it work - and want to get some dev on it ... but I really need to get GPX files working first.

Any more on this thread?

Chris Cooper

unread,
Jan 15, 2012, 10:39:52 PM1/15/12
to openjum...@googlegroups.com
ISSUE 1
The latest OJ seems version 1.5 according to http://sourceforge.net/projects/jump-pilot/files/OpenJUMP/1.5.0/
But the installer advertising the 'Latest version' is the earlier 1.4 release? I accept the 1.5 was only just released though :-)

ISSUE 2
Diagnosed my own GPX issue - I was on Java 6, but seems it needs Java 7... which is NOT the latest release for Vista - you have to hunt and get it from Oracle if not on Win7.
On Java 6, the SurveyOS menu item never appears... but on Java 7 is is there.

ISSUE 3
Diagnosed my 'save' project Java bug when a GPX file is loaded. The JDOM.jar is being shipped with the GPX Plugin, but it is not compatible with the main OJ version of this file.
So you may need to install the GPX plugin, and then re-install OJ - or at least copy the older, smaller JDOM file from the main OJ install folder, to make saving projects work with GPX files (and RoadMatcher too I think).

Seems the main OJ is compiled with an earlier version of Java (5 or maybe 6?) than the GPX plugin (7) - so users who compile everything probably see no problem, but those who run the installer .exe may have problems in this case, as the plugins and installer .exe may not be quite compatible at present in terms of the Java version.

ISSUE 4
I think the shortcut keys in Help > Shortcut keys may be out-dated. Is Zoom in using Alt?

Landon Blake

unread,
Jan 17, 2012, 1:14:28 PM1/17/12
to openjum...@googlegroups.com
Chris,

Thanks for reporting your problems with the GPX plug-in. I'm glad you
got it working on at least one computer.

I thought I compiled for Java 6 last time. Apparently that didn't
work. I'll see if I have time to look at it again this week. Would you
be willing to test a build of the plug-in for Java 6 if I have time to
put one together?

Thanks.

Landon

Chris Cooper

unread,
Jan 17, 2012, 5:44:43 PM1/17/12
to openjum...@googlegroups.com
Hi Landon,

Thanks for the warm welcome and support from the community (+ you and Stefan)

Happy to test, but have now upgraded to Java 7 in my Vista PC.
I can test on Windows XP - which is presumably not on Java 7 (not checked)

I am also running OJ 1.5 but not using the Installer - not sure if this makes a difference?, but installing seems unnecessary if you can just run OJ direct from the downloaded folder of files.

Thanks,

Chris

Jukka Rahkonen

unread,
Jan 18, 2012, 5:41:20 AM1/18/12
to openjum...@googlegroups.com
Hi,

For information, GDAL is very good tool for reading and converting GPX
files. It finds 5 layers from a GPX file. Here is an ogrinfo listing about
one gpx file

D:\temp\gpxtest>ogrinfo kotka.gpx
Had to open data source read-only.
INFO: Open of `kotka.gpx'
using driver `GPX' successful.
1: waypoints (Point)
2: routes (Line String)
3: tracks (Multi Line String)
4: route_points (Point)
5: track_points (Point)

All these layers can be converted into individual shapefiles. Track_points
layer is interesting and useful because it holds all the points which are
making the track with whole lot of attributes like elevation, timestamp,
speed, course, GPS fix type, satellites in view and three DOP values.

Much better than to convert to shapefiles is to convert GPX file into
Spatialite database. The following command converts all the five layers to
Spatialite database. GDAL version 1.9 is recommended because of fresh
improvements in Spatialite driver.

ogr2ogr -f "SQLite" -dsco spatialite=yes kotka.sqlite kotka.gpx

The resulting database "kotka.sqlite" can be read with the OpenJUMP DB
Query plugin. However, I need to recommend Quantum GIS for this because it
gives a nice GUI and query builder tool for reading data from Spatialite.

Link to GDAL GPX driver page http://gdal.org/ogr/drv_gpx.html

Spatialite is not Java but it is so damn good that we should have a well
working Spatialite reader with GUI in the +PLUS version.

-Jukka Rahkonen-

Landon Blake kirjoitti:

Landon Blake

unread,
Jan 19, 2012, 5:59:13 PM1/19/12
to openjum...@googlegroups.com
OK Chris. I'll see if I can get a Java Version 6 build of the plug-in
out tomorrow.

Andre: Are you still willing to help me test this plug-in?

Landon

Stefan Steiniger

unread,
Jan 19, 2012, 10:18:56 PM1/19/12
to openjum...@googlegroups.com
Hei Chris,

no - no should be no difference if from installer or not.
Most of us "project users/developers" actually prefer to "unzip & start"
with the *.bat file, I would say.

cheers,
stefan

Am 17.01.12 15:44, schrieb Chris Cooper:

edgar....@web.de

unread,
Jan 20, 2012, 6:16:45 AM1/20/12
to openjum...@googlegroups.com
currently using the exe launcher some things might not work as expected (using native libs, save log to user settings folder ). so using oj_windows.bat is suggested .. ede

andre tanoe

unread,
Jan 20, 2012, 8:59:13 PM1/20/12
to openjump-users
Hello Landon,

yes, of course.
Reply all
Reply to author
Forward
0 new messages