如何使用MQL查询在Freebase中查找国家/地区的所有地理位置?

时间:2014-05-22 14:14:20

标签: freebase mql

我想通过使用MQL从freebase获取所有城市,地区,河流,山脉,村庄和地区。

目前我只使用此查询获取所有城市和地区:

[{"type": "/location/location",
 "containedby": "Germany",
 "name": null}]

目前我不明白如何获得德国的其他地理信息。

1 个答案:

答案 0 :(得分:1)

我现在通过执行2个不同的查询找到了这个解决方案,因为我没有找到如何在mql中执行UNION:

[{
  "type": "/location/location",
  "partially_containedby": "Germany",
  "de:name": {
    "lang":  "/lang/de",
    "value": null
  },
 "geolocation": {
    "latitude":  null,
    "longitude": null
  }
}]

[{
  "type": "/location/location",
  "containedby": "Germany",
  "de:name": {
    "lang": "/lang/de",
    "value": null
  },
  "geolocation": {
    "latitude": null,
    "longitude": null
  }
}]

两个查询都会通过返回德国,经度和纬度的位置名称来检索德国或德国部分地区的所有位置。

相关问题