GeoData: a new age of geotagging on Wikipedia

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

Categories: Mobile, Technology
Tags: ,
Categories:

Tags:
5 Show

5 Comments on GeoData: a new age of geotagging on Wikipedia

The-Pope 2 years

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

Social Bullets 2 years

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.

H-stt 2 years

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.

Max Semenik 2 years

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

Torsten Kleinz 2 years

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?

Leave a Reply

Your email address will not be published. Required fields are marked *