[Marble-devel] Routino router
Niko Sams
niko.sams at gmail.com
Sat Jul 31 18:35:54 CEST 2010
On Sat, Jul 31, 2010 at 17:11, Dennis Nienhüser <earthwings at gentoo.org> wrote:
> Hi Niko,
>
> thanks for the patch, great work :-)
>
> On 31.07.2010 10:42, Niko Sams wrote:
>
> Hi,
>
> I started writing a router plugin using routino[1], basically it's just
> copying the gosmore plugin and adapting a few things.
> My motivation behind this is that routino allows defining custom profiles
> in an xml file, so I can use my own bicycle specific profiles.
> Please review the attached code.
>
> Looks good, only needs some coding style adjustments.
I'll try my best improving on that :D
> Usage:
> copy generated nodes.mem, segments.mem, ways.mem and profiles.xml,into
> ~/.local/share/marble/maps/earth/routino and make the router binary callable
> in
> PATH trough routino-router.
>
> Tried it, worked out of the box. Routino seems to be a bit faster than
> gosmore (using the same osm data origin).
faster? cool - I can't compare as gosmore crashes for me when importing data.
> One issue I have now is that with the current interface is that it's
> not possible to have
> router dependent settings. Like the custom profiles I'd like to
> support for routino.
> Any ideas how this could be solved?
>
>
> I plan to keep the current (user) interface pretty clean: Some important
> preferences should be changeable immediately (e.g. major transport types
> like it is now). More complex settings (e.g. speed mappings or seldomly used
> transport types) should go to a plugin specific config dialog.
>
> For routino, you could extend the code like this to support the currently
> available transport types and preferences:
>
> switch( route->routePreference() ) {
> case RouteSkeleton::CarFastest:
> params << "--transport=motorcar";
> break;
> case RouteSkeleton::CarShortest:
> params << "--transport=motorcar";
> params << "--shortest";
> break;
> case RouteSkeleton::Bicycle:
> params << "--transport=bicycle";
> break;
> case RouteSkeleton::Pedestrian:
> params << "--transport=foot";
> break;
> }
>
> if ( route->avoidFeatures() & RouteSkeleton::AvoidHighway ) {
> params << "--highway-motorway=0";
> }
>
> GeoDataLineString* wayPoints = d->retrieveWaypoints( params );
>
> The last line shows the entry point to the current code.
>
> Currently runner plugins can not show a settings dialog in Marble, but I
> plan to extend that in the near future. With that implemented, you could add
> a settings dialog for the routino plugin where the user can select mappings
> between transport types and routino profiles. You might even add a UI to
> customize the speed mappings and other preferences there.
Yeah, that would work.
But let me explain my personal use case:
I want to plan bicycle routes, using different profiles like racing
fastest with lots
of car traffic, racing with cycleways preferred, mtb. Opening an
routino configuration dialog
that changes profile used for bicycle would work, but is not so easy to use.
Although I see your point of keeping the interface clean - I just
wanted to explain my use case.
>
> I had a look at the routino output and was pleasantly surprised by the
> amount of information it delivers. There are no direct turn instructions,
> but enough information to calculate them. Actually the problem is very
> similar to generating turn instructions from gosmore instructions, which is
> implemented in [2]. I think I'll incorporate that in Marble and generalize
> it such that it can calculate turn instructions from routino as well. Moving
> the code into Marble would also mean free translations, which is a big plus.
Ah, interesting - yes a general solution would be great.
> To sum it up, I'd like to
> - (1) add your patch with the extension above to Marble
Great :D I have an svn account, I can commit myself. What commit
policies do you have?
> - (2) extend the Marble plugin interface to support configuration dialogs
> for all type of plugins
> - (3) incorporate gosmore-instructions into Marble to get translations and
> be able to use it without adding a dependency
> - (4) use it to generate turn instructions for both gosmore and routino
> output.
>
> With (2) done you could work on a settings dialog for the routino plugin
> that supports the kind of customization you are looking for. Sounds like a
> good plan to me, do you agree? ;-)
Yeah, sounds great!
thanks,
Niko
More information about the Marble-devel
mailing list