Extension:GeoData

The GeoData extension allows articles to specify their geographical coordinates and publishes these coordinates via the HTTP API.

Usage
This extension adds a new parser function,  , that saves coordinates to the database. Function's input format is made as compatible as possible with GeoHack.

Glossary

 * Coordinates - see here
 * Globe - terrestrial body on which the coordinate resides. By default, Earth is assumed. Internally, globe is represented as lowercase strings. The following globes are supported: earth, mercury, venus, moon, mars, phobos, deimos, ganymede, callisto, io, europa, mimas, enceladus, tethys, dione, rhea, titan, hyperion, iapetus, phoebe, miranda, ariel, umbriel, titania, oberon, triton and pluto. Globes not mentioned in this list will be assumed to have generic characteristics: longitude range 0-360°, Eastern longitude is positive. Longitude sign for known globes is taken according to IAU's conventions.
 * dim - approximate size (or size's order of magnitude) of an object. Used by GeoData to restrict search and by Geohack for determining appropriate map zoom.
 * Primary vs. secondary coordinates: primary coordinates define article subject's location, while secondary coordinates are other coordinates mentioned in the article. There can be only one primary coordinate per article, but as many secondaries as you like barring technical restrictions.

Parser function
Function format:
 *  


 * latitude and longitude can be specified in several formats:
 * Direct signed input in degrees, e.g. 37.786971|-122.399677, which corresponds to 37° 47′ 13.1″ N, 122° 23′ 58.84″ W.
 * Degrees/minutes or degrees/minutes/seconds, e.g. 37|47.2183|-122|23.9807 or 37|47|13.1|-122|23|58.84.
 * Either of the above, but with sign specified by N/E/S/W letters:
 * 37.786971|N|122.399677|W
 * 37|47.2183|N|122|23.9807|W
 * 37|47|13.1|N|-122|23|58.84|W


 * primary keyword specifies that these coordinates are primary (see ).
 * Extra parameters are any combination of the following named parameters:
 * dim: approximate size of the object.
 * scale: Scale of map display for this object, e.g. scale of 300 is 1:300. Gets converted into dim internally using formula 'dim = scale / 10. If both scale and dim are set, dim has precendence.
 * globe, see.
 * region: ISO 3166-1 alpha-2 country code or an ISO 3166-2 region code.
 * type: type of object with these coordinates, can be one of the following: country, satellite, state, adm1st, adm2nd, adm3rd, city, isle, mountain, river, waterbody, event, forest, glacier, airport, railwaystation, edu, pass, camera, landmark.

Usage
This extension adds a new parser function,

Installation

 * 1) Download the files from SVN or download a snapshot (select your version of MediaWiki) and place the files under $IP/extensions/GeoData</tt>
 * 2) Add to the end of LocalSettings.php:
 * 3) Add the required tables to the database; on the command line, enter:  (Note: Your designated database user needs to have CREATE rights on your MediaWiki database.)
 * 4) Installation can now be verified through Special:Version on your wiki