Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
1  
There is a discussion about how to do this with gdal here: osgeo-org.1803224.n2.nabble.com/… –  djq Jan 2 '12 at 19:51
    
This is exactly what I need to do, thanks for the link. –  jdeltoro1973 Jan 3 '12 at 18:27
    
@djq Please post your comment as an answer. –  underdark Jan 31 '13 at 13:25

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer
    
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. –  jdeltoro1973 Jan 3 '12 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). –  markusN Jan 5 '12 at 0:48

Your Answer

 
discard

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.