Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for an open source workflow to automate DEM construction. We have a series of sites that fall within a LIDAR dataset. We want to create site specific DEM's for each site, and we're looking to automate the process.

So far, we have automated:

  • data loading into PostGIS (LIDAR and site points)
  • creation of site boundaries (combination of st_buffer and st_envelope)

Now we're looking for options to interpolate the data subsets at each site and export them to Surfer7 grid files.

Currently, we're querying the data in the PostGIS database using QuantumGIS, exporting to csv files, then manually importing and gridding the data in Surfer7. Hopefully we can automate this as well.

So for this use case, we'd like to triangulate our lidar data to a DEM. Other potential cases we can think of involve different interpolation methods - so if there are options for inverse distance and kriging - we're interested!

This is very much a learning exercise for us - we're working in baby steps!

share|improve this question
I'd say you are ahead of the development team, whom have been discussing bringing the pointcloud datatype to PostGIS, and will hopefully be working on it soon. In the mean time, there is a points2grid utility for PDAL that looks interesting, but I haven't used it. – Mike T Dec 17 '12 at 3:08

You could do this automation with SAGA, in Windows or in Linux. SAGA can handle big point data sets, imported in SAGA format as pointcloud format (spc). Then you have functions for interpolation or triangulation, and also export to Surfer. The automation is performed by using SAGA command tool.

share|improve this answer
Import to CVS, you can put this to bashscript with psql command COPY (SELECT foo,bar FROM whatever) TO '/tmp/ouput.csv' DELIMITER ',' CSV HEADER; With that you can drop QGIS from tool chain – simplexio Mar 18 '13 at 8:03

If you have the original LIDAR data in .las/laz, you might use lastools, to deal with big LiDAR data. There's a las2tin and las2dem that look like they'd work directly, but I haven't used them. I have used the below to assemble a set of .laz files into a raster DEM within GRASS:

cat *.laz |~/Downloads/SRC/lastools/bin/las2txt -stdin  -parse xyztc -header pound -otxt |invproj -v -f %.9f +init=epsg:2284 |sed -e 's// /' | input=- output=lidarJunk method=min type=FCELL x=1 y=2 z=3 fs=\    zscale=1.0 percent=100 --overwrite  
# the sed and fs=\ bits are for dealing with reformatting spaces and tabs between invproj and

Lastools would automate well, and look like they could clip the data for a DEM or TIN to bounds of your choice.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.