This document describes some freely available tools that let you process Ordnance Survey data.
The primary tools is GDAL, the Geospatial Data Abstraction Library. These open source tools are in use in a large number of commercial products.
We use UMN MapServer to render the data for use by various clients. OpenLayers will provide us with an open source JavaScript mapping client. It's worth noting that the performance we get by going down this route isn't great as MapServer wasn't really designed to serve lots of small tiles.
It should be possible to follow these instructions on a Windows 2000 PC even if you don't have local administrator rights.
To import the data, you're going to need some tools such as 'gdalinfo' and 'gdaltranslate'. You want to choose one of the following options.
This is the easiest option. Frank Warmerdam has developed most of these tools.
http://fwtools.maptools.org/After you have run the installer, the 'FWTools Shell' icon on your desktop will start a shell with the appropriate bits in your path.
A number of other installer exist for OS X and suchlike...
http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinariesYou can also build them from source on a large number of platforms.
Due to the obvious distortions, Latitude and Longitude coordinates aren't very useful when you're dealing with imagery data. For this reason, when we draw a map, we generally use functions ("projections") with names like "Transverse Mercator" to convert latitude and longitude to coordinates on our image.
For Ordnance Survey grid references (OSGR), we use a special projection called "OSGB 1936 / British National Grid". The Eurpean Petroleum Survey Group code for this is EPGS:27700. GPS coordinates use a Latitude / Longitude based system called WGS84 which is fixed on the american continental plate. ETRS89 is the european equivalent and at the moment WGS84 and ETR89 are considered to be the same however continents do move (10cm per year?). Most systems assume a simple mathematical projection when converting WGS84 to OSGR which is accurate to about 7 meters. The definitive transformation to ETRS89 is called OSTN02 - essentially a big lookup grid and some instructions for interpolating.
Some good documentation is available from the Ordnance Survey here http://www.ordnancesurvey.co.uk/oswebsite/gps/.
It's a complicated subject - just remember that all real world coordinate systems are relative and that no point on the earth is actually "fixed".
When working in the UK, it's generally best to keep everything in OS grid references.
OS raster data generally comes in large tiles with names that relate to where they are spatially. The names actually tell you where the bottom left corner is and don't strictly stick to the OS tile naming convention.
To correctly place the raster data, you need to georeference it. This is normally done with 'TFW' files which can currently be downloaded from Ordnance Survey here:
http://www.ordnancesurvey.co.uk/oswebsite/products/georeferencing/aboutpopup.htmlUnzip the files into the same directory as your images.
We can use gdalinfo to get information about an image which should include placement from the TFW eg... gdalinfo TQ.tif | moreC:\GIS1\Temp>dir ... Directory of C:\GIS1\Temp ... 21/04/2001 14:59 3,615,355 TQ.png 25/02/2004 18:12 127 TQ.TFW ... C:\GIS1\Temp>gdalinfo TQ.png | more Driver: PNG/Portable Network Graphics Size is 4000, 4000 Coordinate System is ' Origin = (500000.000000000000000,200000.000000000000000) Pixel Size = (25.000000000000000,-25.000000000000000) Corner Coordinates: Upper Left ( 500000.000, 200000.000) Lower Left ( 500000.000, 100000.000) Upper Right ( 600000.000, 200000.000) Lower Right ( 600000.000, 100000.000) Center ( 550000.000, 150000.000) Band 1 Block=4000x1 Type=Byte, ColorInterp=Palette Color Table (RGB with 256 entries) 0: 255,255,255,255 1: 59,43,47,255 2: 62,42,67,255 3: 61,41,90,255 -- More --
You can see we have "Corner Coordinates" from the TFW that are in OS grid references. We also have no cordinate system declared - that's probably OK for now - OS grid references get complicated. If you don't have a good TFW file, you'll probably have an upper left coordinate of 0 0 and it'll be placed in pixel coordinates, which you don't want.
Ordnance survey vector data comes in a number of formats.
Importing Shape and MIF/TAB data is covered elsewhere and there is no specific processing required for UK datasets.
Importing MasterMap data is a little harder. You can use the GDAL provided GML loader which does a surprisingly good job of infering the schema from the MasterMap data, however that's probably not going to be good enough for you.
Most GIS tools were developed in countries that don't have the level of detail of mapping that the Ordnance Survey provides. For that reason, you willl probably find that that tools don't cope very well with the volume of data. Ordnance Survey also specify a "style guide" which defines how data should be displayed. Most general GIS tools don't provide the level of display customisation required to implement this.
Edonica has developed a MasterMap importer that will load topographical data into postgres. This is available at http://www.edonica.com