Skip to content

Details on the OpenStreetMap to Qiekub matching algorithm.

Thomas Rosen edited this page Jun 13, 2020 · 3 revisions

TLDR: Add as many permanent tags as possible to OpenStreetMap.


How we match places from different sources (eg. OpenStreetMap).

If possible, use the following list to find a matching place. The place with the highest score is the best match.

(The current implementation can be found here: https://github.com/qiekub/api/blob/master/functions/osm/loadChanges.js)

unique ids that can change very frequently but stay the same if nothing changed (unique!)

(score: โˆž)

  • osm-id

unique references that won't changed (unique!)

(score: 6)

  • wikidata
  • iata
  • icao
  • ref:??? (not "ref", but: ref:whc, ref:isil, ref:dhis2, ref:vatin, ref:wmo, ref:wigos, ref:bag, ref:bufa, ...)
  • fhrs:id (UK Food Hygiene Rating Scheme)

geo information that change seldom

(score: 5)

  • Lng+Lat match up to the sixs decimal place
  • full addr:??? match

urls that change rarely and are mostly unique (not neccessarly unique!)

(score: 4)

  • wikipedia
  • website
  • facebook
  • twitter
  • phonenumber
  • email
  • contact:???

properties that can change but identify a place (not neccessarly unique!)

(score: 3)

  • official_name
  • long_name
  • name
  • short_name
  • alt_name

vague properties that can eventually identify (not neccessarly unique!)

(score: 2)

  • wikimedia_commons
  • mapillary
  • flickr
  • url
  • int_ref // international
  • nat_ref // national
  • reg_ref // regional
  • loc_ref // local
  • icn_ref // international cycle route
  • ncn_ref // national cycle route
  • rcn_ref // regional cycle route
  • lcn_ref // local cycle route

properties that identify a group of places (not unique but can narrow it down in combination!)

(score: 1)

  • ???:wikidata (operator:wikidata, network:wikidata, brand:wikidata, architect:wikidata, artist:wikidata, species:wikidata, subject:wikidata, name:etymology:wikidata, flag:wikidata, ...)
  • operator
  • network
  • brand
  • architect
  • artist
  • species
  • subject
  • name:etymology
  • flag
  • cycle_network

any other properties

  • ???

Further reading:

https://wiki.openstreetmap.org/wiki/Permanent_ID https://wiki.openstreetmap.org/wiki/Category:World_wide_external_reference_tag https://wiki.openstreetmap.org/wiki/Key:iata https://wiki.openstreetmap.org/wiki/Key:wikidata https://wiki.openstreetmap.org/wiki/Key:ref