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

Mapping brain-dump archive

While clearing out my unused Gmail labels and I keep coming across tidbits that it appears I at one time felt would be useful to hang on to, if not for any practical technical purpose then as nostalgia.

Deciding that my mailbox isn't really the most appropriate place for such 'memories', I'm dumping them here.

Perhaps some day they'll be useful to me or some other soul.

Here are the links and their somewhat terse descriptions which obviously meant a lot at the time: