MCPcopy Create free account
hub / github.com/comaps/comaps / ft2osm

Function ft2osm

tools/python/mwm/ft2osm.py:100–108  ·  view source on GitHub ↗
(path, ftid)

Source from the content-addressed store, hash-verified

98
99
100def ft2osm(path, ftid):
101 with open(path, "rb") as f:
102 ft2osm = read_osm2ft(f, ft2osm=True)
103
104 type_abbr = {"n": "node", "w": "way", "r": "relation"}
105 ftid = int(ftid)
106 if ftid in ft2osm:
107 return f"https://www.openstreetmap.org/{type_abbr[ft2osm[ftid][0]]}/{ft2osm[ftid][1]}"
108 return None

Callers 1

ft2osmMethod · 0.90

Calls 1

read_osm2ftFunction · 0.85

Tested by

no test coverage detected