[Marble-devel] Routino router

Dennis Nienhüser earthwings at gentoo.org
Sat Jul 31 17:11:37 CEST 2010


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.

> 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).

> 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.

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.

To sum it up, I'd like to
   - (1) add your patch with the extension above to Marble
   - (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? ;-)

Regards,
Dennis

[2] http://gitorious.org/gosmore-instructions

> Niko
>
> [1] http://www.routino.org/
>    
>
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/marble-devel/attachments/20100731/e8e54838/attachment.htm 


More information about the Marble-devel mailing list