thursday tip day converting free contour data for use in gis
Firstly, if you’ve seen this post before, apologies. It got lost in a previous re-organisation of the blog and I thought it was worth re-posting…
You can get free contour data for the UK from the Scottish Mountaineering Club website. It’s based on public domain NASA data, cleaned up by the club and made freely available. It comes in garmin .img format, in several zip files, which roughly represent areas of the country. See their web page for an explanation of the areas.
Edit: Leszek has some great alternatives methods and options for data- check the comments.
-
To convert the img files to something (more) useful, the best programme I’ve found is gpsmapedit. You need to register it to get the full functionality. This costs 42 euros (umm, about 32 pounds at the moment) but allows you to use the programme on up to four computers.
-
In gpsmapedit, click “open” or “add” and load up all the img files you want to convert. Note that they will be merged into one big file so for the sake of your poor computer, choose only the areas that you need.
-
Go to file/export/mapinfo file, select level “0”, this includes the minor contours (down to 10m) as well as the major contours (100m)
-
When it has finished exporting, you can shut it down. If you’re using mapinfo, then skip to step 6.
-
In ArcGIS, crack open ArcCatalog, and load the “Arcview 8.x tools” toolbar. Move your mapinfo files to a location on your computer that has no spaces in it’s path name and a short path. No really, do. It will crash otherwise. Choose the “mif to shapefile” converter. Alternatively, you could do this with ogr2ogr. See the website for usage.
-
The resulting file (mapinfo or shape) is in wgs84 projection, with the height values in feet, so for use in a British National Grid environment you need to re-project it. The height values are in the attribute field “label”, so add another field for holding the converted height and use the tool of your choice to convert the values in the “label” column to metres.
Note that this data is good for broad-based terrain modelling only. If you need something more accurate you’re going to have to buy it…
If you have any alternatives to this method let me know in the comments!