I am looking to create a gridded DTM/DEM (Digital Terrain/Elevation Model) or TIN (Triangulated Irregular Network) from a set of contours. There are a number of similar questions on both this site and elsewhere, but they all use ArcGIS, GRASS, or QGIS. I wish to perform this operation from either the command line and/or a Python script, and I do not want to install a GIS system to do it.

I'm looking for an output in USGS DEM format. The input files have a number of different variations, such as SHP LineString with 'height' specified as a data field (ie. in the DBF file); SHP LineString with 'height' specified on the SHP z attribute; and an archaic text format that will probably need a Python script to read and/or convert. Hence the inclusion of Python as a calling method.

GDAL looked promising, but it looks like it can only create rasters from point data, and not contour data - this can create interpolation artifacts if the contours are 'forced' as input data points.

  • So you want to perform GIS processing without GIS software? – Vince Sep 25 '15 at 15:56
  • I want to use a library (to be called from within a script), or a command line operation - eg. like GDAL. – winwaed Sep 25 '15 at 19:47
  • Would installing QGIS but doing what you need by running a python script from your command line interface rather than opening and running a gui be acceptable? – Mr Purple Mar 21 '18 at 7:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.