我正在做一个涉及使用 Tangram(一个很棒的 webgl 映射库)在地图上可视化建筑物的映射项目。Tangram 建筑物来自 Open Street Maps,并使用 OSM id:
幸运的是,我的数据来自 Google 的 Location API,它有自己的 id 系统。使用如下请求:
curl https://maps.googleapis.com/maps/api/geocode/json?address=Timble-Bridge,%20Yorkshire%20Britain&key=API_KEY_HERE
一个回来(注意底部的地方ID哈希):
{
"results": [
{
"address_components": [
{
"long_name": "59",
"short_name": "59",
"types": [
"street_number"
]
},
{
"long_name": "Long Lane",
"short_name": "Long Ln",
"types": [
"route"
]
},
{
"long_name": "London",
"short_name": "London",
"types": [
"postal_town"
]
},
{
"long_name": "Greater London",
"short_name": "Greater London",
"types": [
"administrative_area_level_2",
"political"
]
},
{
"long_name": "England",
"short_name": "England",
"types": [
"administrative_area_level_1",
"political"
]
},
{
"long_name": "United Kingdom",
"short_name": "GB",
"types": [
"country",
"political"
]
},
{
"long_name": "EC1A 9EJ",
"short_name": "EC1A 9EJ",
"types": [
"postal_code"
]
}
],
"formatted_address": "59 Long Ln, London EC1A 9EJ, UK",
"geometry": {
"location": {
"lat": 51.5192377,
"lng": -0.0998815
},
"location_type": "ROOFTOP",
"viewport": {
"northeast": {
"lat": 51.52058668029149,
"lng": -0.09853251970849797
},
"southwest": {
"lat": 51.51788871970849,
"lng": -0.101230480291502
}
}
},
"partial_match": true,
"place_id": "ChIJ5UYg9FMbdkgRBOslATQK-ok",
"types": [
"cafe",
"establishment",
"food",
"point_of_interest"
]
}
],
"status": "OK"
}
我现在想知道是否有任何现存的数据库可以将 OSM id 映射到 Google 位置 id。如果有人知道任何这样的服务,或者任何更高阶的映射可以用来确定地将 OSM 和 Google id 映射到更高阶的识别服务,我将非常感谢您提供的任何见解。