[OSM-dev] navigation/autorouting in josm
Christof Dallermassl
cdaller.hw at gmx.at
Sun Jul 29 22:28:55 BST 2007
Hi Ulf,
sorry for annoying you. Which version of josm did you use? Did you
enable the jgrapht library as a plugin in josm? Otherwise josm will not
load the jar file into its classloader. You need a pretty new
josm-latest.jar as well!
The plugin was under heavy development (that's why it was only available
via svn and not via the plugin page) for the last couple of days (or
better nights). Right now, it is in a state that comes quite close to
what I expect it to do: it provides useful routing information :-)
I just added weights to different types of highways that are
configurable in josm's preferences settings (higher values, prefered
routing). And I finally found the problem of multiple ways for one
segment and why it calculated quite strange routes before.
So a step by step installation guide:
1. svn co
http://svn.openstreetmap.org/applications/editors/josm/plugins/navigator/
2. cd navigator
3. adopt path to josm in build.xml
4. on linux "ant install": copies navigation.jar and
lib/jgrapht-jdk1.5.jar to ~/.josm/plugins. On windows use "ant dist" and
copy navigation.jar and lib/jgrapht-jdk1.5.jar to
"Anwendungsdaten\JOSM\plugins" manually.
5. start josm, enable navigator and jgrapht-jdk1.5 plugin
6. restart josm
7. load osm data
8. enable navigation mode (left toolbar, icon with flag)
9. click on nodes for start/middle/end nodes
10. select menu "Navigation/Navigation". The plugin creates a new layer
and displays the shortest (weighted) route. It prints to stdout the
description of it (no ToggleDialog up to now)
11. click middle button anywhere to delete the start/middle/end nodes
and the calculated route
if you change the osm data, you need to reset the graph (menu
"Navigation/Reset Graph"). On the next navigation, the new graph is
created and used.
I'm sorry that you had problems with my code! I was following "publish
early and often" and the plugins was alpha stadium. So I changed a lot
in the first couple of days.
Well, I hope I could motivate you to give it another chance. If not,
thanks anyway for trying!
regards
christof
Ulf Lamping schrieb:
> Christof Dallermassl schrieb:
>> Hi Ulf,
>>
>> Double bad luck,
>>
>> As Imi allowed jar files that are not plugins (or plugins that do not
>> provide josm code) in the plugins directory (was added in one of the
>> last josm versions) I changed the location of the jgrapht jar file
>> from the one you used to ~/.josm/plugins (linux version, for windows
>> use ...\Anwendungsdaten\JOSM\plugins).
>>
>> I thought you already used this path, as you did not had the exception
>> on your first try - sorry for the problems!
>>
> Still doesn't work, same exception.
>
> I wouldn't call it bad luck, I would call it annyoing ... and I don't
> tend to spend more time to try to test your code.
>
> Regards, ULFL
--
---------------------------------------------------------------------------
Christof Dallermassl
cdaller dot hw at gmx dot at
---------------------------------------------------------------------------
More information about the dev
mailing list