[GraphHopper] Heights in Graphhopper

Peter K peathal at yahoo.de
Mon Jun 10 11:10:39 UTC 2013


Hi Robert,

> right now i am trying to get the height attributes to work.

what is your usecase? This one?
https://github.com/graphhopper/graphhopper/issues/43


> I've added a height_diff member to the Edge class

Note: the difference needs to be swapped similar to the direction flag ...


> Why is it pillarId + 3?

The import process is highly optimized regarding memory usage. And so we
point to pillar nodes via negative id and to tower nodes via positive.
As -2 to 2 are already used for markers (PILLAR_NODE, TOWER_NODE) in
phase1 of the import process we need to add the offset 3

pillar nodes are nodes not important for routing. Only for the shape of
the way only (those GPS coordinates end up in graphStorage.wayGeometry).


> It should work with my changes, but the flushing step takes a very
long time when creating the graph.

This should not be related to height. Are the existing graph tests still
working for your custom implementation?


> What's the SEGMENT_SIZE for?

The memory mapped data access as well as the in-memory data access need
its data in segments to grow without much memory/performance issues and
to grow beyond 8 or 2GB.


> Why is it 1<<20?

This value works reasonable for the server and for Android without
wasting too much disc space / RAM


Regards,
Peter.


> Hey Peter,
>
> right now i am trying to get the height attributes to work.
> What I've done so far:
> - I've added a height member to the Node class
> - I've added a height_diff member to the Edge class
>
> So here is my first question:
> nodeOsmIdToIndexMap.put(node.id(), pillarId + 3);
> Why is it pillarId + 3?
>
> And another question:
> What's the SEGMENT_SIZE for? Why is it 1<<20?
>
> It should work with my changes, but the flushing step takes a very
> long time when creating the graph.
> I think it has something to do with the segmentsize.
>
>
> Thanks for your help,
>
> Robert
>
>
> _______________________________________________
> GraphHopper mailing list
> GraphHopper at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/graphhopper

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/graphhopper/attachments/20130610/df0878e5/attachment-0001.html>


More information about the GraphHopper mailing list