[Marble-devel] Review Request: Routing instructions for gosmore and routino

Dennis Nienhüser earthwings at gentoo.org
Wed Sep 1 21:00:59 CEST 2010



> On 2010-08-31 07:21:07, Torsten Rahn wrote:
> > /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingPoint.cpp, line 35
> > <http://svn.reviewboard.kde.org/r/5142/diff/2/?file=34717#file34717line35>
> >
> >     I read that you need stuff "duplicated" in this case. So does it make sense to introduce something similar in addition inside GeoDataCoordinates:
> >     
> >     qreal GeoDataCoordinates::bearing( const GeoDataCoordinates & other ) const ?
> >     
> >

Yes, probably.


> On 2010-08-31 07:21:07, Torsten Rahn wrote:
> > /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingPoint.cpp, line 45
> > <http://svn.reviewboard.kde.org/r/5142/diff/2/?file=34717#file34717line45>
> >
> >     ok, this distance method's implementation is completely different from the one used in GeoDataCoordinates. Should we adjust the one in GeoDataCoordinates? What is your opinion about this?

Hmm, good question. I had this implementation lying around and knew it was working well. IIRC it's quite precise, but a bit slower. Possibly I don't need it to be too precise.

I compared the runtime of the three implementations (the one above as iteratitve, MarbleMath::distanceSphere and MarbleMath::distanceSphereApprox as the other two) with these results (1.000.000 iterations of the same distance calcuation):

distanceIterative: 1548 ms. 
distanceSphere:     328 ms. 
distanceApprox:     363 ms.

I wasn't suprised that the one implemented above is slower, but Marble's distanceApprox being slower than distanceSphere surprised me. Guess I'll switch to distanceSphere in my code. We should consider removing/deprecating distanceSphereApprox as well (it's not used in Marble).


- Dennis


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5142/#review7305
-----------------------------------------------------------


On 2010-08-26 12:12:36, Dennis Nienhüser wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5142/
> -----------------------------------------------------------
> 
> (Updated 2010-08-26 12:12:36)
> 
> 
> Review request for marble.
> 
> 
> Summary
> -------
> 
> This completes offline routing by adding support for the generation of human readable instructions for both gosmore and routino. With this committed, we can start working on an important use case: Dynamic, offline route adjustments on Maemo (automatically calculate a new route when the user deviates too much from the original one).
> 
> The patch is based on gosmore-instructions [1] and planned to fully replace it. Gosmore-instructions is already used in [2] and I plan to continue supporting this usage. Therefore a new binary routing-instructions is included (replacing the former gosmore-instructions) similar to Marble's tilecreator. It is meant to be used on a webserver and therefore kept minimalistic (only depending on QtCore). Just like the gosmore and routino runner plugins it uses the new classes in src/lib/routing/instructions/. You'll notice some (intentional) duplication in the added code: Yet another point class and methods to calculate geodetic distances. This is needed to avoid the heavier GUI dependencies which would come in when using the Marble classes. This in turn imposes a problem on shared webservers.
> 
> There are two types of usage:
> 
> Online-Routing via some webserver (e.g. dev.osm.org)
> PHP-Frontend => system ( gosmore | routing-instructions ) => KML => Marble => GeoDataDocument
> 
> Offline-Routing via the local system
> Marble => QProcess( gosmore ) => Instruction generation => GeoDataDocument
> 
> The code used to generate the instructions itself isn't much magic: It parses a csv like format (waypoints and road names), groups them by road name to get the instruction points, calculates the angles between adjacent roads and generates human readable instructions from that information.
> 
> [1] http://gitorious.org/gosmore-instructions
> [2] http://wiki.openstreetmap.org/wiki/Osm.org_Routing_Demo
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-around.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-continue.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-left.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-right.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-roundabout-far.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-roundabout-first.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-roundabout-second.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-roundabout-third.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-sharp-left.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-sharp-right.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-slight-left.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/bitmaps/turn-slight-right.png UNKNOWN 
>   /trunk/KDE/kdeedu/marble/data/svg/turn-indicators.svg PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/CMakeLists.txt 1167911 
>   /trunk/KDE/kdeedu/marble/src/lib/CMakeLists.txt 1167911 
>   /trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataExtendedData.h 1167911 
>   /trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataExtendedData.cpp 1167911 
>   /trunk/KDE/kdeedu/marble/src/lib/libmarble.qrc 1167911 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/RoutingModel.cpp 1167911 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/InstructionTransformation.h PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/InstructionTransformation.cpp PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingInstruction.h PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingInstruction.cpp PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingPoint.h PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingPoint.cpp PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingWaypoint.h PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/RoutingWaypoint.cpp PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/WaypointParser.h PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/lib/routing/instructions/WaypointParser.cpp PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/plugins/runner/gosmore/GosmoreRunner.cpp 1167911 
>   /trunk/KDE/kdeedu/marble/src/plugins/runner/routino/RoutinoRunner.cpp 1167911 
>   /trunk/KDE/kdeedu/marble/src/routing-instructions/CMakeLists.txt PRE-CREATION 
>   /trunk/KDE/kdeedu/marble/src/routing-instructions/main.cpp PRE-CREATION 
> 
> Diff: http://svn.reviewboard.kde.org/r/5142/diff
> 
> 
> Testing
> -------
> 
> A recent gosmore version from SVN (output with 6 fields and support for roundabouts, see screenshot)
> An older gosmore version (the one shipped with Ubuntu Lucid, output with 5 fields, different .pak format)
> Routino version 1.4.1
> 
> 
> Screenshots
> -----------
> 
> 
>   http://svn.reviewboard.kde.org/r/5142/s/487/
> 
>   http://svn.reviewboard.kde.org/r/5142/s/488/
> 
> 
> Thanks,
> 
> Dennis
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/marble-devel/attachments/20100901/8f0a7f0f/attachment-0001.htm 


More information about the Marble-devel mailing list