1

I'm trying to use GraphHopper core to create a indoor navigation app. I already create a .osm file of the building(with 2 floors) containing all the possible routes inside the building.

The problem that I'm facing now is that there is no way to filter points by floors, i.e, when I make a call to the web API /route the points only have lat/lon and no floor or something similar to distinguish between to points with the same lat/lon.

How can I solve this problem? Anyone can give me some hints to accomplish this task?


Side question: How can integrate GraphHopper jsprit with GraphHopper core? Where can I find some documentation about that?

nuno407
  • 13
  • 5

1 Answers1

0

This is a missing feature. See this issue https://github.com/graphhopper/graphhopper/issues/646

You could attach a z-component for every edge (or node) and use an EdgeFilter to pick the correct floor.

Karussell
  • 17,085
  • 16
  • 97
  • 197
  • Hi @Karussell. There is some documentation/example how to attach this Z component to edges and nodes? Thank you. – nuno407 Mar 13 '17 at 16:13
  • You'll have to tweak the OSMReader to store this information. But there are no docs for this, sorry. Storing it as edge property is probably the easiest and you can use the edge 'flags', see e.g. how to store the height of a way into it in the DataFlagEncoder -> heightEncoder. – Karussell Mar 13 '17 at 17:23
  • Thank you! I will take a look into that! – nuno407 Mar 13 '17 at 18:01
  • Hi @Karussell. I have being trying but without success. I'm using the stable version of graphhopper (0.8.2). Where exactly is made the conversion between coordinates points and a edge or node? – nuno407 Mar 21 '17 at 17:57
  • This is a bit hidden in OSMReader. Read also the docs https://github.com/graphhopper/graphhopper/blob/master/docs/core/low-level-api.md – Karussell Mar 22 '17 at 14:50
  • So a cordinate [lat,lon] is always converted to a TowerNode right? For this specific case we can use the elevation parameter (GHPoint3D) and use the elevation to filter the floors? Thank you for your time – nuno407 Mar 22 '17 at 16:16
  • Just for indoor this can work, yes. But only a coordinate which acts as a junction is converted into a tower node, others inbetween will be 'pillar' nodes and create the geometry of an edge – Karussell Mar 22 '17 at 21:02
  • Ok. In this case (for my master thesis) I just need indoor routing. I already change the method getElevation(ReaderNode node) in OSMReader to return the value of the floor tag. Now I have some doubts. How can I access the elevation in the lookup and findClosest function in LocationIndexTree? Because they useGHPoint2d but not 3d. Thank you for your time – nuno407 Mar 22 '17 at 22:04