使用Wikimedia API获取位置 [英] Get location with Wikimedia API

查看:70
本文介绍了使用Wikimedia API获取位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Mediawiki API从城市/国家/地区获取Wikipedia文章的位置?假设我要确定圣家堂大教堂位于哪个国家/地区?我应该使用什么财产?

How to get location of the Wikipedia article with Mediawiki API in terms of city/country? Let's say I want to determine what country, what city the Sagrada Familia cathedral is located in? What property should I use?

推荐答案

尝试以下查询:

有关文档,请参见扩展名:GeoData .

我不确定是否可以使用Wikipedia API获取城市名称,但是有一些方法可以将坐标转换为城市名称,请参见:此答案中的副本,其半径和坐标已更改.)

I'm not sure if we can get the city name using Wikipedia API, but there are some ways to convert a coordinate to a city name, see: Given the lat/long coordinates, how can we find out the city/country? or use a SPARQL query on wikidata. (the query is a copy of the one in this answer, with radius and coordinates changed.)

这篇关于使用Wikimedia API获取位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆