[gdal-dev] Converting contour lines (Shape files) into DEM
Chaitanya kumar CH
chaitanya.ch at gmail.com
Tue Apr 6 12:13:09 EDT 2010
You can adjust the geotiff's dimensions and extents from within the script.
Then use the -te option in gdal_rasterize to limit the extents of the vector
Other way is to create parts of the shape file using ogr2ogr with the option
On Tue, Apr 6, 2010 at 12:00 AM, Kishore Reddy <enigma2006.kishore at gmail.com
> I tried the above procedure. Its working. I am giving input as Shapefile
> and taking geotiff file as output. But the output file is loosing many
> details as it has been converted at high resolution. Is there any way that
> I can convert Shapefles into tiles at appropriate resolution so that I can
> produce many geotiff files for the same Shapefile?
> On Sun, Mar 28, 2010 at 3:37 AM, Even Rouault <
> even.rouault at mines-paris.org> wrote:
>> Here is a process you could try:
>> 1) Prepare an output GDAL file for gdal_rasterize.
>> You can take care inspiration of
>> Modify it to create 1 band (instead of 4) and for step 3) to work, you
>> take care of setting a nodata value on the output file and initialize the
>> raster with it:
>> (if you can compile GDAL from source, you can avoid this step by grabbing
>> latest sources that have an enhanced version of gdal_rasterize, directly
>> to create the output file . See http://trac.osgeo.org/gdal/ticket/3505)
>> 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.
>> Best regards,
>> Le Saturday 27 March 2010 19:09:06 Kishore Reddy, vous avez écrit :
>> > Hi everyone,
>> > I am planing to use gdaldem to create relief shaded maps. But the
>> > problem is gdaldem takes only DEM files as input. Unfortunately I have
>> > contour lines (in the form of Shape files). So is there any way
>> > (command line) to convert these shape files into DEM files?
>> > --
>> > Kishore
>> > _______________________________________________
>> > gdal-dev mailing list
>> > gdal-dev at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev