I have around 100 shapefiles of contours (1m interval) that I need to turn into DEMs; Is there a way to batch create these mde from contour lines? Using open source preferably.
2 Answers
Yes, you can do that in GRASS GIS: patch them together with v.patch (or use ogr2ogr on the SHAPE file before importing them into GRASS with v.in.ogr), then use your preferred algorithm from http://grass.osgeo.org/wiki/Contour_lines_to_DEM
Important: combine the maps before generating the DEM from it to avoid artefacts at the tile borders.
-
the problem is that this would generate a very large DEM. I was looking something more like a script so I can create one MDE pero shape file. Commented Jan 3, 2012 at 18:32
-
You can also process them one by one of course. But be sure to have some overlap, otherwise you will get ugly artifacts at the tile borders (create a shaded map from the resulting DEM then to verify).– markusNCommented Jan 5, 2012 at 0:48
You can use the SAGA CMD tools, which let you process shapefiles and get interpolated DEMs in a batch mode, both on Linux and Windows. Shapefiles are accessed by default in SAGA, and as interpolators, you have the possibility to choose from several spline algorithms or TIN. The DEM will be saved in SAGA format (.sgrd), but after you can export it to .asc or any other GDAL supportable format. Also in GRASS you can do the job, by creating a .sh scripts. You can use a for each code.
gdal
here: osgeo-org.1803224.n2.nabble.com/…