Missing Elevation Tags in Raw Data

I am having some trouble figuring out how the height values for mountain peaks are being rendered on OSM mapping. For example, on the standard map base at www.openstreetmap.org I can see the height of Kilimanjaro (Uhuru Peak) in Tanzania is being rendered as 5895m. However, when I download the raw data for this area (PBF format from the Export function on www.openstreetmap.org), the point representing Uhuru Peak only has the following tags…
“description”=>“Highest peak in Africa.”,“is_in:country”=>“Tanzania”,“name:cs”=>“Kilimandžáro”,“name:en”=>“Kilimanjaro”,“name:ku”=>“Kilîmanjaro”,“natural”=>“peak”,“old_name”=>“Kaiser-Wilhelm-Spitze”,“url”=>“http://www.ultimatekilimanjaro.com/index.htm",“volcano:status”=>“dormant”,“volcano:type”=>“stratovolcano”,“website”=>“http://www.kilimanjaroroutes.com/”,“wikidata”=>“Q7296”,“wikipedia”=>"en:Mount Kilimanjaro”
I was expecting a tag called “ele” in there with the value 5895. Does anyone have any idea where the elevation value on the map is being rendered from?
Thanks.

If you look at the node information https://www.openstreetmap.org/node/32059197 , you will see that the ele tag is there. So something went wrong with your workflow to export the data. Hopefully someone else can point out what you did wrong.

Thanks for your reply and for the node information where I can see the correct elevation tag. However, I’ve downloaded this area using two methods and neither are including this tag in the data.

The first method was simply to use the Export button on www.openstreetmap.org. There are no parameters to export here other than the extent you want, and so I believe I am simply getting a dump of the data in OSM format (map.osm).

The second method I tried was to download the entire Africa continent from https://download.openstreetmap.fr/extracts/. This downloads in PBF format. I’ve loaded this into a PostgreSQL database.

In order to open either file, I am using QGIS…AddVectorLayer and then opening the Points layer. I simply use the Identify Features tool to query the point representing Uhuru Peak, and can see all the field attributes. ‘Other_tags’ looks to have all the node information except the ‘ele’ tag.

Using pgAdmin4’s SQL Query Tool in the PostgreSQL database also gives the following for this node:
"“website”=>“http://www.kilimanjaroroutes.com/",“name:en”=>“Kilimanjaro”,“natural”=>“peak”,“description”=>"Highest peak in Africa.”,“is_in:country”=>“Tanzania”,“url”=>“http://www.ultimatekilimanjaro.com/index.htm",“name:cs”=>“Kilimandžáro”,“wikipedia”=>"en:Mount Kilimanjaro”,“volcano:status”=>“dormant”,“name:ku”=>“Kilîmanjaro”,“volcano:type”=>“stratovolcano”,“old_name”=>“Kaiser-Wilhelm-Spitze”,“wikidata”=>“Q7296"”
Again, no ‘ele’ tag.

As you said, hopefully someone can see what I’m doing wrong, or test this for themselves.

Thanks.

EDIT: I should have mentioned that this isn’t restricted to just Uhuru Peak. There are no “ele” tags in the entire Africa dataset that I downloaded.

I exported from https://www.openstreetmap.org/export#map=19/-3.07641/37.35400&layers=N and it contains:

Incidentally, I would be suspicious about the source of this data. It looks like this peak may be accessible, so someone could have taken a GPS reading, but the elevation is still too precise for that.

You can’t determin how a specific kay/value has been aquired. Could be written down from a sign or measured by tape or measured by GPS…

The ele-tag for Uhuru Peak has been added by user FranBoon in 2008 (http://osm.mapki.com/history/node.php?id=32059197).

Thanks for exporting the data. Now that I look at the OSM file in Notepad, I too can see the “ele” tag so the raw data download must be working OK. For some reason this tag isn’t showing in either QGIS or the PostgreSQL SQL query so there’s definitely something weird going on. I’ll investigate further and report back if I can figure it out.

And thanks for the warning about the elevation value. In the case of Uhuru Peak, 5985m is the ‘official’ value, as seen on the sign at the summit…https://goo.gl/images/4s8knB.

I’m actually not too bothered about the values, just keen to get the tags working. Thanks.

I just tried exporting a (very!) small area around Kilimanjaro using the “export” button on the site. When looking at the XML file, the ele tag is there, as expected. However, when I load this into QGIS 3.2 (as the OP describes), I can’t see it! I.e, it looks like QGIS filters out the ‘ele’ tag, for some reason.

Since the OP did not state what tool was used for the Postgres import, I can’t comment on that. It is certainly odd that two completely different tools would have the same bug. Is there some kind of Recommended Tags Not To Import floating around? :slight_smile:

I used ogr2ogr for the PostgreSQL import, so again relying on QGIS tools. I’ve just imported it again using osm2pgsql and this does bring the ‘ele’ tag. (However, it doesn’t bring the different language name forms which is something that I need. - EDIT: I can get osm2pgsql to bring in the other name tags by using the --hstore parameter in the command line.)

I’m realising that the various import or viewing methods are dictating which XML tags are available to the user, and that the schemas change depending on the software. I hadn’t anticipated that this would happen as I just thought I’d be looking at the raw data in the GIS. As turepalsson has discovered, it does appear that QGIS is stripping out the ‘ele’ tag. It happens on both 3.2 and 2.14.

As it now seems like a QGIS bug rather than something to do with OSM itself then I might switch the problem to a QGIS forum. Thanks for all your help here.

For ogr2ogr, it looks like the default osmconf.ini file (http://svn.osgeo.org/gdal/trunk/gdal/data/osmconf.ini , look for the comment that reads “keys that should NOT be reported in the “other_tags” field”) strips out the ‘ele’ tag, but you should be able to provide your own file tailored to your needs.

That’s brilliant, thanks. I’ll have a play around with the osmconf.ini file to see if I can bring in the ele tags.