Openmaptiles: Add OSM ID to more features 🙏

Created on 18 Mar 2020  ·  4Comments  ·  Source: openmaptiles/openmaptiles

Hi,

I have started to build an OSM application based on mapboxgl + openmaptiles (specificaly maptiler cloud MVT tiles). The app allows user to click any map feature, and it fetches current info from OSM API to show useful side panel. You may find it here: https://osmapp.org/

Unfortunately, the id in openmaptiles is still a mystery to me. I found out that id starting with 0 is a node and with 1 is a way, but very often the id is a small number which doesnt comply with this system. (?)

1) is it possible to make a more strict scheme about composing/parsing the id prop?

2) would be possible to use real OSM id for more features? You can try clicking eg. buildings, or even some(?) poi icons. And if there are not enough data, the text Mapový prvek type4 is shown in the bottom. (btw, l10n is the next step ;) )
In case your vector item is constructed from more OSM elements, one real id would be enough.

btw, thanks @xkomczax for the suggestion to ask here – you may see the related discussion in czech talk-cz forum.

schema-change

Most helpful comment

Hi @zbycz, thank you for using OpenMapTiles in your project.

OpenMapTiles using osm_id everywhere is it possible. Project using imposm3 as an import tool of OpenStreetMap data. Not all data are from OSM (e.g. Natural Earth data).

Maybe there are some barriers in imposm3:
There is osm_id duplication between features (https://github.com/omniscale/imposm3/issues/51) and some of the id are negated (https://imposm.org/docs/imposm3/latest/mapping.html#id)

All 4 comments

Hi @zbycz, thank you for using OpenMapTiles in your project.

OpenMapTiles using osm_id everywhere is it possible. Project using imposm3 as an import tool of OpenStreetMap data. Not all data are from OSM (e.g. Natural Earth data).

Maybe there are some barriers in imposm3:
There is osm_id duplication between features (https://github.com/omniscale/imposm3/issues/51) and some of the id are negated (https://imposm.org/docs/imposm3/latest/mapping.html#id)

Hi @zbycz, we are planning to organized the 3rd OpenMapTiles community meeting. The best date was selected on April 15th, at 11 AM ET (5 PM CET). We are using Google Hangouts (https://meet.google.com/eek-pfot-nji). If interested, please, let me know and I will add you to the Google Calendar Meeting. Thanks.

@TomPohys Hi Tom, thanks for the offer. I will be very glad to join! You can find my email at https://zby.cz

ad your previours message) I understand that these strange IDs in the map tiles are product of the imposm software, I am planning to ask on their github: https://github.com/omniscale/imposm3

Hi @TomPohys, thanks to the help in imposm github (https://github.com/omniscale/imposm3/issues/239) I managed to identify two issues which I mistaken as one:

1) openmaptiles outputs OSM ids only for some layers. I have mixed it all together, and was surprised that some ids are just sequential integers.

2) I discovered 0X=node and 1X=way, but didnt realised that 4X are really just relations. Now it works perfectly. (Fix already deployed to osmapp.org)

Now to my original question: Would it be please possible to add osm ids in the above form (2) to more layers? I have found that out of 16 source layers only 3 currently return the ids (place, poi, water_name).

Is there perhaps other issue to this topic which I am overlooking?

Thanks for your help 😀

Was this page helpful?
0 / 5 - 0 ratings