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!
Comments(3)
The program dem2topo (mentioned in your link) will convert SRTM-90m 3-arc-second DEM files (GeoTiff format) from the USGS Seamless Server (seamless.usgs.gov) directly to shapefiles, and let you set both the contour intervals and the units:
http://freegeographytools.com/2007/converting-digital-elevation-models-to-shapefiledxf-contours
While the USGS SRTM-90 data is “finished”, i.e. voids and anomalies supposedly fixed, it still has issues. Looks like the Scots spent a lot of time cleaning up the data.
An alternative source of “finished” SRTM-90 data is CGIAR:
http://freegeographytools.com/2007/new-fixed-versions-of-srtm-90-data-available
Visually, this data looks a lot cleaner than the USGS SRTM data, and works with dem2topo if you download the DEMs in GeoTiff format.
The freeware GIS MicroDEM can also convert DEMs to contour shapefiles. It supports more DEM formats than dem2topo, but the shapefile output isn’t as good:
http://freegeographytools.com/2007/microdem-a-swiss-army-knife-of-terrain-and-gis-tools
The freeware GIS SAGA can also create contour shapefiles from a DEM in ESRI ArcGrid format (and a number of different grid formats, but not GeoTiff).
http://www.saga-gis.uni-goettingen.de/html/index.php
Hi Leszek,
Many thanks for these alternative options- really handy to know about, particularly as we can’t rely on the SMC always making the data available. I will edit the post to direct people to these alternatives.
Thanks for popping by!
Jo