Showing posts with label ordnance survey. Show all posts
Showing posts with label ordnance survey. Show all posts

Friday, December 02, 2011

Chopping OS 10k raster maps

Another post in the series 'things I found in my mailbox that I mailed myself as an aide-memoire'

This one relates to the chopping up of map tiles. In this case, the tiles were supplied in a directory tree.


The post:

10k files come in a tree so we need to flatten it:

Copy the OS files from the dir tree to a flat dir:

for /R d:\data %i IN (*.jpg) DO xcopy %i c:\dest /S


Add the associated .tab files (in order to provide geo-referencing)

http://www.ordnancesurvey.co.uk/oswebsite/products/georeferencing/aboutpopup.html


Download FWTools

http://fwtools.maptools.org/

and run the shell


Build a virtual raster

gdalbuildvrt 10k.vrt *.tif


Convert virtual raster to actual ECW (ERMapper Compressed Wavelets)

gdal_translate -of ECW -co LARGE_OK=YES -expand rgb -a_srs EPSG:27700 10k.vrt 10k.ecw


Process the ECW with a tiler such as

http://www.klokan.cz/projects/gdal2tiles/

or, with the GUI

http://www.maptiler.org/


A nice summary and related info

http://epsg27700.blogspot.com/2009/09/processing-ordnance-survey-rasters-with.html