blankblank blank




Converting Digital Elevation Models To Shapefile/DXF Contours



There are any number of ways to convert a digital elevation model (DEM) to shapefile vector contour lines, but most of the ones I’ve come across have had limitations of one sort or another. The best solution I’ve come across is the free program dem2topo; while it only supports a limited number of DEM formats, it has more flexibility in units and simplification than other methods, and the graphical interface is easy to use (unlike some command-line programs).

The program is written in IDL, an interpreted language, and you’ll have to download and install the IDL Virtual Machine first (free, but a 100 MB download, requires registration, and you may get a sales call). DEM formats supported are Canadian Digital Elevation Data (CDED), and nominally the GeoTiff format, but I’ve had some GeoTiff DEM rejected by the program for unknown reasons. NED GeoTiffs from the USGS Seamless Server work fine, and if you can open your DEM in the program 3DEM (which supports a number of DEM formats) and export it as a GeoTiff DEM from there, those should work with dem2topo as well. Once you’ve loaded your DEM into dem2topo:

11-24-2007-8.02.08 PM11-24-2007-8.03.14 PM12-15-2007-11.09.23 PM

you can choose contour intervals (meters or feet, regardless of what the original units were), the simplification factor (larger simplifies more, but at the cost of detail), whether to close the outer contours, and whether to display the contours as they’re being processed (for faster processing speed, leave these unchecked. More on these options is available in the helpfile.

Once configured, you have the option of converting the DEM into either shapefile contours, DXF contours, or into the .mp format used in creating maps for Garmin GPS units. For the shapefile format, major/intermediate/minor contour intervals are defined in the DBF file by the same hex code used in the .mp format: 0×0020 for minor contours, 0×0021 for intermediate, and 0×0022 for major . Processing speed will depend on the size of the DEM and level of detail, but don’t expect instant results. Converting the above 10-meter DEM to shapefile contours took well over an hour, albeit on my fairly pokey 2.4 GHz system; more memory also speeds up the process. But the results are worth the time; here’s a blow-up of the shapefile contour map of a very small section of this DEM:

contours

A simple process, and if you run into problems, the help file is well done.

sf Actual screenshot
See Real USGS Topo Maps, Aerial Photos And Scanned Maps On Your Garmin GPS With

Moagu:
The Mother Of All GPS Utilities


"... Moagu rocks! This really is revolutionary!"
The GPS Tracklog Blog

Click here for more info

sf Actual screenshot

Other posts in the GIS Tools series

  1. Converting E00 Vector Data To Shapefiles - A Free And Fairly Painless Approach
  2. Simplifying Line And Polygon Shapefiles
  3. Converting US Census TIGER Data Into Shapefiles For Free
  4. Converting Shapefiles and ArcINFO Coverages To AutoCAD DXF Format
  5. Converting Point Shapefiles To Text/Spreadsheet Format
  6. Converting Text/Spreadsheet Files To Point Shapefile Format
  7. An Easier Way To Convert Shapefiles to Text/Spreadsheet Format
  8. Converting Text/Spreadsheet Data To Line/Area Shapefiles
  9. Full Resolution Raster Map Combining, Subsetting And Export With The TatukGIS Viewer
  10. Viewing Vector Data In The TatukGIS Viewer
  11. The LizardTech Stand-Alone MRSID Viewer
  12. Converting Raster Area Images Into Polygon Shapefiles
  13. SAGA GIS 2.0 Released
  14. ILWIS GIS Is Now Open Source
  15. AVHRR Analysis Add-On For ILWIS
  16. Advanced Image Mosaicking With Regeemy
  17. A Free GIS Viewer (And Cheap GIS Editor) For Windows Mobile Systems
  18. Updates For MapWindow And Saga GIS Programs
  19. Updates For Two Open-Source GIS Programs
  20. Putting Together A Basic Linux GIS Workstation
  21. Free Online Courses For Open Source GIS
  22. GIS-Oriented Linux Distributions
  23. Tabular Terrain Elevation Data
  24. Quick Data Gridding With QuikGrid
  25. A Good Introduction To Geospatial Data Analysis
  26. Converting Digital Elevation Models To Shapefile/DXF Contours
  27. Fixing "Broken" Shapefiles
  28. A Simple DBF Editor
  29. Two Online Vector GIS/GPS/KML Conversion Utilities
  30. Another Shapefile Repair Tool
  31. Quantum GIS (qGIS) Version 0.10 Released
  32. Online Raster Map Georeferencing/Registration With Map Rectifier
  33. Using The Demo Version Of Global Mapper As A Raster/Vector Data Viewer
  34. New Stable Release Of MapWindow GIS
  35. The Big List Of Free Metadata Software I
  36. The Big List Of Free Metadata Software II


Subscribe to this blog's RSS feed

3 Responses to “Converting Digital Elevation Models To Shapefile/DXF Contours”


  1. 1 geofumadas

    what source file formats it supports?

  2. 2 Leszek Pawlowicz

    It supports CDED, USGS ASCII DTED, and some GeoTiff.

  3. 3 Javier

    Global Mapper is good for the same

Leave a Reply


Be sure to enter the "reCAPTCHA" below before submitting your comment.