Last active
June 19, 2020 13:05
-
-
Save bdon/df0b72eb9700752fc7a06e3d8c53cb80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import freetype | |
import osmium | |
import sys | |
face = freetype.Face("/System/Library/Fonts/STHeiti Medium.ttc") | |
def check_tags(t,o): | |
for k,v in o.tags: | |
if k == 'name': | |
for char in v: | |
if face.get_char_index(char) == 0: | |
print(f'{char},{ord(char)},{v},https://openstreetmap.org/{t}/{o.id}') | |
class Handler(osmium.SimpleHandler): | |
def node(self,n): | |
check_tags('node',n) | |
def way(self, w): | |
check_tags('way',w) | |
def relation(self,r): | |
check_tags('relation',r) | |
Handler().apply_file(sys.argv[1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char | codepoint | value | url | |
---|---|---|---|---|
𫙮 | 177774 | 𫙮魚坑 | https://openstreetmap.org/node/2760134939 | |
| 60530 | 宏冠魠魚羹 | https://openstreetmap.org/node/4007798824 | |
𦬬 | 158508 | 𦬬萊宅 | https://openstreetmap.org/node/4208963908 | |
| 59595 | 佳相機 | https://openstreetmap.org/node/4338653289 | |
| 57410 | 石里倉庫 | https://openstreetmap.org/node/4891506572 | |
𫃎 | 176334 | 阿傳師手工𫃎糬 | https://openstreetmap.org/node/5498686509 | |
| 60530 | 香亭魠魚羮 | https://openstreetmap.org/node/5847492985 | |
𫙮 | 177774 | 𫙮魚隧道 | https://openstreetmap.org/way/122303868 | |
𫙮 | 177774 | 𫙮魚隧道 | https://openstreetmap.org/way/193636934 | |
𫙮 | 177774 | 𫙮魚坑路 | https://openstreetmap.org/way/266987885 | |
𡙒 | 136786 | 𡙒師傅便當 | https://openstreetmap.org/way/368060976 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment