MediaWiki Extension: OSCoordinates 0.01

MediaWiki Extension: OSCoordinates is an extension that converts an Ordnance Survey grid reference.

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
GPL (GNU General Public License) 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Matthew Gates
HOMEPAGE:
porpoisehead.net
CATEGORY:
ROOT \ Utilities
MediaWiki Extension: OSCoordinates is an extension that converts an Ordnance Survey grid reference to a nice chunk of HTML containing:

The Coordinates in a consistent style (e.g. "NT 123 456")
The Coordinates are a hyperlink to the Ordnance Survey get-a-map site showing the map for those coordinates.
Longitude and latitude conversion

OS coordinates are split into two groups - Great Britian (including some of the islands), and Ireland. At present grid references from Ireland are not supported.

Using the Extension:

Extract the archive so that the OSCoordinate directory is in your "[wikiroot]/extensions" directory. Then add the following line to your LocalSettings.php file:

require_once("extensions/OSCoordinates/OSCoordinates.php");

Once you've done that, you can put your OS coordinates in your wiki text surrounded by the new < OSCoord > tag. E.g.

< OScoord >NT 049 935 in wikitext becomes:

{NZ 049 935 / 155'23" W 5514'8" N}

The format of the reference between the new tags is tolerant of whitespace and will cope with 2, 4, 6 and 8 character coordinates, i.e. all these are OK:

< OSCoord >NT1245< /OSCoord >
< OSCoord >NT12 45< /OSCoord >
< OSCoord >NT 123 456< /OSCoord >
< OSCoord >NT14< /OSCoord >
< OSCoord >NT< /OSCoord >

For 2, 4 and 6 character coordinates, the accuracy of the output is still an 8 character corrdinate, with 0 padding. e.g. "NT12" becomes "NT 100 200".

When the page is displayed, the output will look like this:

{NT 933 047 / 26'20" W 5520'11" N}

Where the "NT 933 047" is a hyperlink to the OS web site.

Last updated on September 26th, 2006

#MediaWiki Extension #OSCoordinates extension #converts Ordnance Survey #MediaWiki #Extension #OSCoordinates #converts

Add your review!

SUBMIT