简体   繁体   English

将Google建筑物ID映射到Open Street Map建筑物ID

[英]Mapping Google building Id's to Open Street Map building id's

I'm working on a mapping project that involves using Tangram (an awesome webgl mapping library) to visualize buildings on a map. 我正在做一个映射项目,涉及使用七巧板(一个很棒的webgl映射库)来可视化地图上的建筑物。 The Tangram buildings come from Open Street Maps, and use OSM id's: 七巧板建筑来自开放街道地图,并使用OSM ID:

在此处输入图片说明

As fortune would have it though, my data comes from Google's Location API, which has its own id system. 幸运的是,我的数据来自Google的Location API,该API具有自己的ID系统。 Using a request like: 使用如下请求:

curl https://maps.googleapis.com/maps/api/geocode/json?address=Timble-Bridge,%20Yorkshire%20Britain&key=API_KEY_HERE

one gets back (note at the bottom the place id hash): 一个回来(请注意在底部的地方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"
}

I'm now wondering if there's any extant database that maps OSM id's to Google location id's. 我现在想知道是否存在将OSM ID映射到Google Location ID的现有数据库。 If anyone knows of any such service, or any higher order mapping one can use to deterministically map OSM and Google id's to a higher-order identification service, I'd be very grateful for any insight you can offer. 如果有人知道任何此类服务,或者可以使用任何更高阶的映射来确定性地将OSM和Google ID映射到更高阶的识别服务,那么我将非常感谢您提供的任何见解。

No, such a database doesn't exist and it can't exist. 不,这样的数据库不存在,也不存在。

Such a mapping would require that: 这种映射将要求:

  • Both data sets are open. 这两个数据集都是开放的。 OSM is open but Google's data isn't. OSM已打开,但Google的数据未打开。
  • Buildings are mapped in a similar way. 建筑物以类似的方式映射。 This is not always the case. 这并非总是如此。 A building in Google may consist of several buildings in OSM, and vice versa. Google中的一座建筑物可能由OSM中的几座建筑物组成,反之亦然。
  • IDs are stable. ID是稳定的。 I don't know about Google's IDs but IDs in OSM can change. 我不知道Google的ID,但是OSM中的ID可以更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM