Kishore,<br><br>You can adjust the geotiff&#39;s dimensions and extents from within the script. Then use the -te option in gdal_rasterize to limit the extents of the vector data.<br><br>Other way is to create parts of the shape file using ogr2ogr with the option -clipsrc (<a href="http://gdal.org/ogr2ogr.html">http://gdal.org/ogr2ogr.html</a>).<br>
<br><div class="gmail_quote">On Tue, Apr 6, 2010 at 12:00 AM, Kishore Reddy <span dir="ltr">&lt;<a href="mailto:enigma2006.kishore@gmail.com">enigma2006.kishore@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>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?<br clear="all">


<br>--<br><font color="#888888">Kishore</font><div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Sun, Mar 28, 2010 at 3:37 AM, Even Rouault <span dir="ltr">&lt;<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


Kishore,<br>
<br>
Here is a process you could try:<br>
<br>
1) Prepare an output GDAL file for gdal_rasterize.<br>
<br>
You can take care inspiration of<br>
<a href="http://trac.osgeo.org/gdal/wiki/FAQRaster#HowcanIcreateablankrasterbasedonavectorfilesextentsforusewithgdal_rasterizeGDAL1.8.0" target="_blank">http://trac.osgeo.org/gdal/wiki/FAQRaster#HowcanIcreateablankrasterbasedonavectorfilesextentsforusewithgdal_rasterizeGDAL1.8.0</a><br>



<br>
Modify it to create 1 band (instead of 4) and for step 3) to work, you should<br>
take care of setting a nodata value on the output file and initialize the<br>
raster with it:<br>
<br>
dst_ds.GetRasterBand(1).SetRasterNoDataValue(0)<br>
dst_ds.GetRasterBand(1).Fill(0)<br>
<br>
(if you can compile GDAL from source, you can avoid this step by grabbing the<br>
latest sources that have an enhanced version of gdal_rasterize, directly able<br>
to create the output file . See <a href="http://trac.osgeo.org/gdal/ticket/3505" target="_blank">http://trac.osgeo.org/gdal/ticket/3505</a>)<br>
<br>
2) Use gdal_rasterize to burn the contour lines.<br>
<br>
See <a href="http://gdal.org/gdal_rasterize.html" target="_blank">http://gdal.org/gdal_rasterize.html</a><br>
<br>
3) Fill the holes (the nodata values) with gdal_fillnodata.py.<br>
<br>
See <a href="http://gdal.org/gdal_fillnodata.html" target="_blank">http://gdal.org/gdal_fillnodata.html</a><br>
<br>
Now, the result should be usable with gdaldem.<br>
<br>
Best regards,<br>
<br>
Even<br>
<br>
Le Saturday 27 March 2010 19:09:06 Kishore Reddy, vous avez écrit :<br>
<div><div></div><div>&gt; Hi everyone,<br>
&gt;<br>
&gt; I am planing to use gdaldem to create relief shaded maps. But the<br>
&gt; problem is gdaldem takes only DEM files as input. Unfortunately I have<br>
&gt; contour lines (in the form of Shape files). So is there any way<br>
&gt; (command line) to convert these shape files into DEM files?<br>
&gt;<br>
&gt; --<br>
&gt; Kishore<br>
</div></div>&gt; _______________________________________________<br>
&gt; gdal-dev mailing list<br>
&gt; <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
<br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9848167848<br>17.2416N 80.1426E<br>