[Routing] [OSM-talk] www.OpenRouteService.org now supports Bicycle Routing with OSM Data
Alex Wilson
alex_wilson at pobox.com
Tue Jul 8 10:49:11 BST 2008
I can't agree with this comment. The boost graph library carries no default
space overhead. It's header only and incredibly configurable. You can set up
your own graph datatypes - using as little space as you like (although the
available types are pretty efficient) and as long as you put an appropriate
interface on them, you can then use all the algorithms whilst retaining full
control over the space requirements. It's simply not true that there is an
unavoidable large space overhead.
Moreover in my last job I was involved in work that had a considerable
requirement for graph datastructures and algorithms. I implemented most of
the algorithms by hand using my own datastructures and algorithms (we were
constrained at the time to a compiler that couldn't compile the boost graph
library). Subsequently I've been using boost - and the resultant code is
considerably shorter, more readable and cleaner. Oh: and less error-prone,
because you're using other people's pre-tested work rather than having to
implement it yourself. Sometimes the BGL doesn't have the algo you want -
and in these circumstances you may have to reimplement: but I can't see
that's the case for the OSM routing tasks I've seen so far.
Finally: why would you want a library that combined routing and rendering?
They're two separate tasks: what advantage is there to combining them?
Cheers,
Alex
2008/7/8 Nic Roets <nroets at gmail.com>:
> > Haven't you done the very same yourself - written a routing app
> > although you could have used existing libraries?
>
> Existing libraries carry huge space overheads. That's unsuitable for
> mobile devices and it will require expensive hardware to host a planet
> wide service.
>
> Existing libraries rarely combine routing and rendering.
>
> But the main point is : Existing libraries like boost would not have
> lead to simpler code (Halstead metric or lines of code metric).
> Things like "add to heap" and "hash this value" are only one or two
> lines. If I needed balanced trees, I would have used a library.
>
> One (non-existent) library that all the OSM routing programs can
> benefit from will simply convert the OSMXML stream into a more regular
> structure. E.g. add foot={yes,no} to every way for which it's not
> specified. So it's not really a library, but more of a shell script.
>
> _______________________________________________
> Routing mailing list
> Routing at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/routing
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/routing/attachments/20080708/8e1143e5/attachment.html>
More information about the Routing
mailing list