Re: [Libosmscout-development] About adding (overloading) a RoutePostprocessor
Library for OpenStreetMap offline rendering and routing
Status: Beta
Brought to you by:
tteuling
From: Vladimir V. <vla...@gm...> - 2014-06-22 19:19:12
|
Hi Tim ! Thanks for the long detailed reply ! I'll try asap using RouteDescription::Description as explained by you, although I'm a bit worried that DistanceAndTimePostprocessor is already fetching the locations but throwing them and I'll add another pass over the node list to fetch them again, perhaps not a big issue even with quite long routes ;-) Cheers, Vlad. On 22 juin 2014, at 20:02, Tim Teulings <ti...@fr...> wrote: > Hello Vladimir, > > > The relevant classes are in Route.h and and RoutePostprocessor.h > > A description of a route is mapped by the class RouteDescription. It > mainly holds the list of nodes that build up the route. > > The RouteDescription::Node class holds a number of basic attributes, > especially a list of Descriptions (RouteDescription::Description). In > fact it is not a list but a map, because Descriptions can get attached > to a node under a special name (this would allow to add multiple > instance of the same description under different names - which is nice > to have while I do not have a concrete example in mind - besides faster > access (hash map vs. list traversal)). > > > If you want to write your own Postprocessor that extends the information > hold in each route you would derive from RouteDescription::Description, > e.g. LocationDescription which holds lat/lon values of the node. The > RoutePostprocessor then would iterator over the route aggregate new > information and extend the route node information by adding a > LocationDescription instance to every node. This is already done for > other information and could get extended (POIDescription, > LandmarkDescription, SpeedCameraDescription, verhicle specific > additional information...). > > ... > > -- > Gruß... > Tim > > ------------------------------------------------------------------------------ |