User:Plowboylifestyle~metawiki/Extensions

Hopefully this page can move
somewhere other than my User Page

Managing Geocoordinates with Extensions

edit

This is a proposal for a set of extensions that when used together will allow a level of geographical functionality to a mediawiki. The hope is that it could have a quite staggering possibilities on a wiki the size of Wikipedia. Creating a geographic database that links back to articles will allow relationships between articles to form that are not known to their respective editors and provide a new way to find interesting information about things on the surface of the earth.

This page describes one possible way to achieve this using a set of extensions that format, translate, and store geographical coodinates which can accessed by and provide access to SpecialPages with geographic information.

It is hoped that this design will allow more cartographic functionality beyond points to be implemented easily in the future.

<Tags> vs. Templates

edit

At the current time a set of templates exist on Wikipedia that standardize the formatting of geographic coordinates and incorporate them into a link to a map sources page this is described on Geographical coordinates WikiProject. While this system is very useful the way it stands, it unfortunately presents barriers to future developement because of specific issues with how templates are implemented.

Specifically creating a backend database of geocoordinates is greatly complicated by using templates. Such a database would have to be updated "On save" and there is no simple mechanism in mediawiki to expand templates, other than to render them to html first. Unlike templates <tags> are protected from other wikimarkup.

In mediawiki >1.4 there is a hook called '"ArticleSave'" which hands the entire text of the article to an extension. Without templates a simple preg_match can extract an array of geocoordinate information from the article for database manipulation.

Some interesting facts about templates are:

  • The are only expanded upon render. The mediawiki does not include seperate functions for expansion.
  • Extension <tags> cannot except template parameters as input. The parameters will not be expanded, every tag essentially acts a <nowiki> tag, so that whatever is between them is no longer treated as wikimarkup.

The problem is essentially that in order to build a database based on geographical data embedded in pages the mediawiki must scan for new geographic data as it is entered into wikipedia. If this data is implemented inside a template it is difficult to ensure that the scanning extension will recognize the template. Shifting things to an established special markup inside of a geo tag could add functionality and simplify implementation. (Is there a way to use both... would it be worth it? --Plowboylifestyle 05:53, 14 Mar 2005 (UTC))

Using extension tags also mean that the geocoordinates can be implemented as a system that is almost completely seperate from the core of the mediawiki. There is no requirement that a specific set of templates exist. This is an important design consideration and also useful politically.

Design Proposol

edit

This design specifies the creation of a set of extensions, any one of which could be absent, that when used together create a complete system that is immediately useful. This system can be implemented and used without interfacing with complicated map generating solutions.

 
A diagram of how the extensions could modify the mediawiki.

The following extension are proposed:

The following SpecialPages are proposed:

Big Questions for discussion

edit
  1. What the heck do we do about templates? We still need them.
  2. What is the best database to use for geo-coordinates. (MySQL?)