0

I would like to create an commercial Android GPS app that allows to route a way depending on a speed limit and a vehicle restrictions such us its height and width. I picked GraphHooper as a routing engine and because it does not provide informations about the vehicle's size, I want to add some of the Truck QA Map tags (http://maxheight.bplaced.net/overpass/map.html) and apply it to the GraphHooper's algorithm.

The problem is that GraphHooper is written in Java and from what I see on the GitHub (https://github.com/mmd-osm/osm-maxheight-map), QA Map is based on javascript, php and css. My question is, is it possible to apply javascript, php and css code to the android project? At this moment I'm considering different solutions and I wonder if it could be done in general. If yes, how it can be done?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
cmd08
  • 1

2 Answers2

1

There seems to be a misunderstanding.

GraphHopper is a routing engine which is able to process OSM data. Likewise the OSM Truck QA Map is just using OSM data, too (especially the maxheight tag, the OSM wiki has more information about this map).

If GraphHopper doesn't support the maxheight tag yet then all you have to do is add it to GraphHopper. There is absolutely no need to extract it from the QA map because it is already contained in the data used by GraphHopper. You just need to tell GraphHopper to additionally check this tag when calculating its route the same way it already checks lots of other routing tags (like maxspeed, access and so on).

scai
  • 20,297
  • 4
  • 56
  • 72
  • 1
    +1 there is already an issue for truck stuff ;) https://github.com/graphhopper/graphhopper/issues/223 – Karussell Jul 18 '14 at 09:39
0

The main purpose of the OSM Truck QA Map is to help you spot any missing maxheight tags in the OpenStreetMap data or visualize already existing tags for trucks, such as maxheight, maxweight, etc. All the data comes in fact from the fabulous Overpass API, so there's not much point trying to extract the data form OSM Truck QA Map. It is really just a visualization tool and works completely in your browser.

Assuming you already have a OSM planet or some smaller extract available for testing, all those maxheight, maxweight, ... tags already exist in that data. You just need to include them in GraphHopper processing (see Scai's reply).

... and if some of the routing results look odd, you might want to check back on OSM Truck QA Map what the actual tagging looks like in the OSM data - or even check what it looked like some time back in the past.

mmd
  • 3,423
  • 1
  • 16
  • 23