[gdal-dev] Converting contour lines (Shape files) into DEM

Christopher Barker Chris.Barker at noaa.gov
Mon Mar 29 12:28:44 EDT 2010


Even Rouault wrote:
> 2) Use gdal_rasterize to burn the contour lines.
> 
> See http://gdal.org/gdal_rasterize.html
> 
> 3) Fill the holes (the nodata values) with gdal_fillnodata.py.
> 
> See http://gdal.org/gdal_fillnodata.html
> 
> Now, the result should be usable with gdaldem.

well, yes, but it's likely to be pretty ugly -- it will represent the 
elevation as steps -- constant values between contours. If you have 
enough contour lines, and want a low-resolution DEM, that might be OK. 
However, you'll get much prettier results if you interpolate in some way 
to get a smoother result.

Unfortunately, interpolating contour lines well is not trivial -- I'd do 
some googling and see what you can find.

GRASS may have something to help you here, too.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the gdal-dev mailing list