Extension:GeoData/blogpost

GeoData: a new age of geotagging on Wikipedia

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

What it does
Coordinates added to articles are stored separately in the database (as opposed to being stored arbitrarily in wiki markup), making 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 available via the API.

Where we use it
One of the first consumers of this data is the experimental mode of the Wikipedia mobile site which as of this week allows you to see a list of nearby articles. In the future we hope to build it right into our contributor pipelines. For instance we'd like to be able to show you a map of articles needing images near by and have you upload photos then and there.

How it works
GeoData adds a new parser function,  which saves coordinates passed to it into the database. For example, if Wikimedia Foundation headquarters is located at 37° 47′ 13.09″ North, 122° 23′ 58.84″ West, it can be tagged like that:   or with decimals:   . primary indicates here that these are the coordinates of article's primary subject, as opposed to other coordinates mentioned in the article.

Setting it up
GeoData requires some manual setup to start collecting the data. Typically, all that is needed is to insert the  tag into a template, and wait some time for the job queue to process the pages that use it (example changes). Currently, this extension is enabled on all Wikipedias, Wikivoyages and special projects (like Commons) with at least 4 projects already actively using it (English, German, Simple English and Chinese Wikipedias). Also, consider creating a tracking category where GeoData will add pages with invalid coordinates. This category's name is adjustable by editing the MediaWiki:Geodata-broken-tags-category system message.