I am using osm2po to generate a routable network (by importing .sql files from osm2po into a PostgreSQL/Postgis database).
This works great using the post process filters PgRoutingWriter and PgVertexWriter.
However, I also want to take elevation data into account.
The first thing I did is to use the osmosis-srtm-plugin to add information about the height to the OSM export that I downloaded. At least when sticking to STRM3 this tool is very easy to use and as far as I can see, it should also be possible to use SRTM3 version 3 data.
The problem is that osm2po simply does not use this information (stored into tag "height" or "ele") at all when generating sql files.
I know that there is a answered question about adding ferry durations to ways, but when it comes to elevation information this does not work, since there is no field that can be used when writing nodes with PgVertexWriter. It might work for ways (although in my eyes it wouldn't be the best/very clean solution since it (mis)uses the osm_meta field), but I also need it for nodes.
There would be two possible solutions (that I can think of):
- Adding the possibility to add new fields to ways and nodes (maybe a (Sorted)Map called custom_columns)
- Adding the elevation information into the geom_vertex and geom_way columns
With both approaches the information could be used inside the PgVertexWriter/PgRoutingWriter (or any extending class) while writing the generated sql files.
However, I can not implement one of the suggested solutions, since neither can be implement by extending solely the WayTagResolver or NodeTagResolver classes (I would also need to change the SegmentedWay/Vertex classes that are not open-source).
Can elevation be added to nodes and ways in a different way (a.k.a: is there something else that I am missing)?
Also tried with the now suggested tag "ele" (instead of height)