简体   繁体   English

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

[英]How to find all geographical places in a country in Freebase by using MQL Query?

I would like to get all cities, regions, rivers, mountains, villages, areas from freebase by using MQL. 我想使用MQL从freebase获取所有城市,地区,河流,山脉,村庄,地区。

For now i only get all cities and district by using this query: 现在,我仅使用以下查询来获取所有城市和地区:

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

For now i do not understand how to get other geographical informations that are in germany. 目前,我不了解如何获取德国的其他地理信息。

I found now this solution by executing 2 different queries, because i do not found how to do an UNION in mql: 我现在通过执行2个不同的查询找到了该解决方案,因为我没有找到如何在mql中执行UNION:

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

and

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

Both Queries retrieve me all location that are in germany or part of germany by returning the location's name in german, latitude and longitude. 两个查询都通过返回德语,纬度和经度的位置名称来检索我在德国或德国部分地区的所有位置。

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

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