Updateable peak register (with unique ids)

Hello guys,

first of all I’d like to say hello and thank you for all the good work on the OSM project.

I am currently developing a web platform as a university project where users can keep track of their personal “summit register”. So users can tag peaks or alpine huts they have been to so far and add pictures and stuff. The problem I am working on right now is to extract only the relevant data of peaks and huts from an OSM region (Austria in my case) and use it as a core for my database.

Best case scenario would be a minimalistic table (“peaks”) with records similar to this:

| id (unique and primary key) |     name     |   lat    |   long   | ele  |
| ...                         |              |          |          |      |
| 123456789                   | Grosglockner | xx.yyyyy | xx.yyyyy | 3798 |
| ...                         |              |          |          |      |
| 987654321                   | Matterhorn   | xx.yyyyy | xx.yyyyy | 4478 |
| ...                         |              |          |          |      |

What I have tried so far is to extract all nodes/ways which contain the tags natural=peak and tourism=alpine_hut of the latest austria.osm via osmfilter and import it into my databse with osm2postgresql and a very reduced style file.
However I am getting a rather complex table scheme (for my use case) with points/polygons/lines etc. in separate tables which means peaks and hut data is scattered over various tables. This makes sense for map rendering and routing but not if I only want a searchable register.

So I tried to extract everything as simple POIs with the OsmPoisPbf project on Github which gives me a csv similar to this (areas are being centered according to the readme on github):

tag type|osm id (N..node, W.. way)|lat|long|name

which is exactly what I was looking for (except that elevation is missing). But I am still looking for a way to keep things updateable and still keep the integrity of the connection between a peak and a user.

An example to make things clearer (I hope):

  1. User1 tags the peak “Mt. Everest” with the osm id 12345 for his register.
  2. I perform a diff with a new OSM version where “Mt. Everest” has been deleted and newly created with a new osm id 54321
  3. Now I either get a duplicate “Mt. Everest” entry in my db or lose the integrity between User1 <-> “Mt. Everest” since the id has changed

I hope my problem is somewhat understandable and someone can help me.

Ever had a look at wikidata.org ??

Maybe it is a better database to have a collection of peaks … try https://www.wikidata.org/wiki/Q1374 as a start.

It can even be that IDs of objects in wikidata are more stable than in OSM.

Thanks for your reply.

I generated a wikidata list export of all peaks of the center of Austria + 350km radius with the following query [625, 47.447719,13.334746, 350]

I still don’t know however, how to export the list in a csv or similar which I can import into my database with the necessary properties enabled (wikidata id/Q-value, name (german), elevation, coordinates). Is there even an elevation data available for the mountains?

I’m thinking about just using a current dump of all OSM peaks/huts which contain valid values (not null/empty) as a base and not use the diff feature at all. So at least I have a solid amount of usable peak data and I can let the users add missing ones on their own. How could I achieve a simple database import into a single table (like the one of my first post) with only my relevant fields with osm2postgresql or osmosis etc.?