How to make a contour map

Now and again one wants to create a contour map of a particular area or region. For this purpose a file of data points specified in terms of latitude, longitude and elevation is required. There are various ways of obtaining the data. The most obvious is to use a criss-cross track obtained from a good GPS device. Alternatively, a path obtained using Google Earth and exported in KML format can be used. DEM/LIDAR data are also available from a variety of sources, though the accuracy can be poor.

The best (free) contour production programme currently available is QuikGrid. This processes data supplied in the form of a CSV file containing three columms – x coordinate, y coordinate and elevation. Sadly, I’ve not been able to find free software that converts common formats such as KML and GPX directly into CSV without omitting the (obviously critical) elevation data. In consequence, the contour map production process is somewhat convoluted.

The steps required are as follows:

  1. Obtain the necessary GPX or KML file;
  2. Convert the GPX/KML file to an XLSX file using MyGeodata or equivalent;
  3. Use Excel to elimate all superfluous rows and columns from the XLSX file and then save it out as a CSV file;
  4. Load the CSV file into QuikGrid using the sequence File_Input scattered data points_Input metric data points;
  5. Manipulate the contour map in QuikGrid as required; and finally
  6. Export the contour map as a DXF file.

Further manipulation of the map (if required) is best undertaken using a (free) CAD programme such as nanoCAD, exporting the result as a DXF file.

Note that converting the DXF file to a GPX using the aforementioned MyGeodata makes possible display of the finished contour map in Google Earth.

Additional comments

The following points may be of interest:

  1. It is possible to load a GPX file directly into Excel as it follows the XML format, thus avoiding the conversion to XLSX using MyGeodata. The downside of this approach is that a modicum of skill is required to set up the Excel workbook in a way that makes x, y, z data extraction easy.
  2. The accuracy of elevation data obtained via Google Earth is variable and depends on the location. Inconsistencies between tiles have been reported. Overall, elevation data would seem to be within 7m of true.
  3. Garmin’s GPS units that contain a barometric altimeter properly calibrated (eg GPSMap 64s/65s) are accurate to plus or minus 10ft/3m over the elevation range -2,000 to 30,000ft.
  4. Increasingly, open source LIDAR (Light Detection & Ranging) datasets are becoming available. These can be used to create contour maps and can be manipulated in mapping programs such as QGIS. UK data is usually split into seven layers: Unclassified, Ground, Low Vegetation, Medium Vegetation, High Vegetation, Building & Low Point (Noise). Unfortunately, the elevation data in the “Ground” layer are unreliable where areas are covered in dense woodland and currently this restricts use of LIDAR datasets for contouring purposes.