I must be doing something terribly wrong I guess. Heres is the output.<br><br>&gt;&gt; ogrinfo -al Contour_100.shp | grep Extent<br>Extent: (1966324.986729, 399608.866986) - (2146704.003923, 551765.272646)<br><br>&gt;&gt;  ogr2ogr -clipsrc 1966328 399612 1984324 404608 clipped.shp Contour_100.shp<br>

<br>&gt;&gt;  ogrinfo -al clipped.shp | grep Extent<br>Extent: (0.000000, 0.000000) - (0.000000, 0.000000)<br><br>Some more details of the input file:<br>&gt;&gt; ogrinfo -al Contour_100.shp | head -25<br>INFO: Open of `Contour_100.shp&#39;<br>

      using driver `ESRI Shapefile&#39; successful.<br><br>Layer name: Contour_100<br>Geometry: Line String<br>Feature Count: 1760<br>Extent: (1966324.986729, 399608.866986) - (2146704.003923, 551765.272646)<br>Layer SRS WKT:<br>

PROJCS[&quot;NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet&quot;,<br>    GEOGCS[&quot;GCS_North_American_1983&quot;,<br>        DATUM[&quot;North_American_Datum_1983&quot;,<br>            SPHEROID[&quot;GRS_1980&quot;,6378137.0,298.257222101]],<br>

        PRIMEM[&quot;Greenwich&quot;,0.0],<br>        UNIT[&quot;Degree&quot;,0.0174532925199433]],<br>    PROJECTION[&quot;Lambert_Conformal_Conic_2SP&quot;],<br>    PARAMETER[&quot;False_Easting&quot;,2000000.002616666],<br>

    PARAMETER[&quot;False_Northing&quot;,0.0],<br>    PARAMETER[&quot;Central_Meridian&quot;,-79.0],<br>    PARAMETER[&quot;Standard_Parallel_1&quot;,34.33333333333334],<br>    PARAMETER[&quot;Standard_Parallel_2&quot;,36.16666666666666],<br>

    PARAMETER[&quot;Latitude_Of_Origin&quot;,33.75],<br>    UNIT[&quot;Foot_US&quot;,0.3048006096012192]]<br>Elevation: Integer (4.0)<br>TILE: String (8.0)<br>Interval: Integer (4.0)<br><br><br>Please correct me where am I going wrong.<br>

<br>--<br>Kishore<br>
<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 9:43 PM, Chaitanya kumar CH <span dir="ltr">&lt;<a href="http://chaitanya.ch">chaitanya.ch</a>@<a href="http://gmail.com">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;">

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" target="_blank">http://gdal.org/ogr2ogr.html</a>).<div>

<div></div><div class="h5"><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" target="_blank">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><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" target="_blank">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></div></div><font color="#888888">-- <br>Best regards,<br>

Chaitanya kumar CH.<br>
/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9848167848<br>17.2416N 80.1426E<br>
</font></blockquote></div><br>