GeoData: a new age of geotagging on Wikipedia

Translate this post

On mobile devices, GeoData will allow you to view Wikipedia or Wikivoyage pages about places close to your location.
On mobile devices, GeoData will allow you to view Wikipedia or Wikivoyage pages about places close to your location.

Have you ever wondered if there are Wikipedia articles about things near you? Well, wonder no more! Today, we present the GeoData extension for MediaWiki, which now provides a structured way to store geo-coordinates for articles, as well as an API to make queries around this information.

What does it do?

Coordinates added to articles are now stored separately in the database, as opposed to being stored arbitrarily in wiki markup. This makes it easy to query the coordinates of a particular page or a list of pages around a given set of coordinates. The Solr search engine is used for spatial queries, making the searches extremely fast. All the functionality is also available via the API, allowing developers to create tools that use this data.

Where will it be used?

One of the first major uses of GeoData information will be in the experimental mode of the Wikipedia mobile site, which will allow beta users to see a list of nearby articles. We expect to release this feature into our experimental mode in the coming weeks. In the future, we also hope to build this functionality into our contribution tools: for instance, we’d like to be able to show users a map of articles needing images near their location, so that they can easily take and upload photos of subjects around them missing an illustration.

How does it work?

GeoData adds a new MediaWiki parser function called {{#coordinates}} that saves coordinates passed to it into the database. For example, if the Wikimedia Foundation office is located at 37° 47′ 13.09″ North, 122° 23′ 58.84″ West, it can be tagged like that: {{#coordinates:primary|37|47|13.09|N|122|23|58.84|W}} or with decimals: {{#coordinates:primary|37.78697|-122.39967}}. primary indicates here that these are the coordinates of the article’s primary subject, as opposed to other coordinates mentioned in the article.

How do we add it to articles?

GeoData requires some manual setup to start collecting data on a given wiki. The {{#coordinates}} tag needs to be inserted into the template used for geotagging (example change), and the job queue will process the pages that use it. This can be done on all sites where the GeoData extension is enabled: all Wikipedia and Wikivoyage sites, as well as special projects (like Commons). At least four projects are already actively using it: Wikipedia in English, German, Simple English and Chinese.
It’s also recommended to create a tracking category to which GeoData will add pages with invalid coordinates. The name of this maintenance category can be localized by editing the MediaWiki:Geodata-broken-tags-category system message. If you need help setting up GeoData on your wiki, join us on the #wikimedia-mobile channel on Freenode IRC, and we’ll be happy to help.
Max Semenik
Software Engineer, Mobile

Archive notice: This is an archived post from blog.wikimedia.org, which operated under different editorial and content guidelines than Diff.

Can you help us translate this article?

In order for this article to reach as many people as possible we would like your help. Can you translate this article to get the message out?

15 Comments
Inline Feedbacks
View all comments

There are many GeoData on Wikipedia right now. Will they have to be changed manually to this format to be included? Or can the new extension use the data in the present form?
Will there be a separate database of GeoData? Yre there any plans to include this in WikiData?

[…] Wikipedia, that adds geographic data for individual wiki articles. Aimed primarily at mobile users, GeoData will make finding information about your present location easy and […]

Torsten, currently GeoData databases are per-wiki, however we have plans to centralise them through Wikidata.

That would have been my next question: Is this integrated into WikiData or can at least be integrated without much fuss? And will the Visual Editor be able to deal with it?
Otherwise I would suggest to shoot the head of development. We can’t allow several external data bases, with different software, different structures, different mark up and different what ever. Users simply won’t tolerate that.

[…] just announced an open standards based means for adding geodata to any article. They launched a new Wikimedia […]

[…] More on the technical side of things in this blog post. […]

My initial thoughts are that, while I am generally against mobile location data being accessible in the cloud, I trust Wikipedia enough that this doesn’t bother me at all. In fact, I think that this will be a great addition to the service. I can imagine sightseeing and finding out about other interesting sites that I may have missed out on otherwise.

[…] information announced its spatial-debut, we paid attention. Wikipedia recently introduced its GeoData extension. This streamlined, centralized source for geographic information means that ‘mapping […]

[…] information announced its spatial-debut, we paid attention. Wikipedia recently introduced its GeoData extension. This streamlined, centralized source for geographic information means that ‘mapping Wikipedia’ […]

Please utilise the existing coords template or info box location data can be automatically used and not require any manual rework.

[…] and geotagging – good idea and here is interesting post about GeoData extension for […]

[…] The coolest thing about this function will be discovering all sorts of interesting locations and monuments in your neighborhood that you probably didn’t even know existed. To learn more about how it works, check out the Wikimedia Foundation blog. […]

What is the status on the project now, three years out? Am evaluating this extension for use in a local city wiki.

[…] laufen Arbeiten, um die Koordinaten in Wikipedia einfacher nutzbar zu machen. Eine der ersten Anwendungen dafür […]

I love to see Castilians