Ole,<br><br>You create contours directly into KML format using the -f option.<br><br><div class="gmail_quote">On Wed, Jul 7, 2010 at 2:42 PM, Ole Nielsen <span dir="ltr"><<a href="mailto:ole.nielsen@aifdr.org">ole.nielsen@aifdr.org</a>></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;">
<div link="blue" vlink="purple" lang="EN-AU">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thank you very much for your reply. I misunderstood the –a option.
It works beautifully and our SHP as well as KML files now have each contour clearly
labelled with its value.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Here’s an example of a command that does the trick.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">gdal_contour -a Thickness[cm] -fl 1.000000 2.000000 5.000000
50.000000 100.000000 <tiffile> <shpfile></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">We then convert to kml using ogr2ogr</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thanks again</span></p><div class="im">
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Ole</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(31, 73, 125);" lang="EN-US">Dr Ole Nielsen</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(31, 73, 125);" lang="EN-US">Numerical Modeller</span></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="font-size: 10pt; color: rgb(31, 73, 125);" lang="EN-US">Australia-Indonesia
Facility for Disaster Reduction</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(31, 73, 125);" lang="EN-US">Mobile: +62 811 820 4637 | Phone: +62 21 398 30088 x1007 | Fax:
+62 21 398 30068</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: rgb(31, 73, 125);" lang="EN-US"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"><img src="cid:image001.jpg@01CB1DEA.70229B20" alt="cid:341378CF-F190-43E3-BF4F-9D25093D10FA@e2.local" height="131" width="624"></span><span style="font-size: 11pt; color: rgb(31, 73, 125);" lang="EN-US"></span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
</div><div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> Chaitanya kumar CH
[mailto:<a href="mailto:chaitanya.ch@gmail.com" target="_blank">chaitanya.ch@gmail.com</a>] <br>
<b>Sent:</b> Wednesday, 7 July 2010 3:27 PM<br>
<b>To:</b> Ole Nielsen<br>
<b>Cc:</b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>; <a href="mailto:Adele.Bear@ga.gov.au" target="_blank">Adele.Bear@ga.gov.au</a>; Kristy Van Putten<br>
<b>Subject:</b> Re: [gdal-dev] Which contour is which?</span></p>
</div><div><div></div><div class="h5">
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="margin-bottom: 12pt;">Ole,<br>
<br>
You can specify a field in the contour features using the '-a' option. You can
also use the '-3d' option to include the elevation value in the z value at
every vertex. (<a href="http://www.gdal.org/gdal_contour.html" target="_blank">http://www.gdal.org/gdal_contour.html</a>)</p>
<div>
<p class="MsoNormal">On Wed, Jul 7, 2010 at 1:26 PM, Ole Nielsen <<a href="mailto:ole.nielsen@aifdr.org" target="_blank">ole.nielsen@aifdr.org</a>> wrote:</p>
<div>
<div>
<p class="MsoNormal">Dear
all </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">We
are using gdal_contour to generate shape files. They look good and appear to be
correct, but we need to label them with the value they represent.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">However,
no such information appears to be available in the shape files. We thought we
could work with the ID attribute which is the only information available in the
shapefiles generated by gdal_contour, but that does not generally reflect the
order of the contour lines either.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">How
is it possible to determine which contour line corresponds to a particular
level?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Best
regards</p>
<p class="MsoNormal">Ole</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size: 10pt;" lang="EN-US">Dr Ole Nielsen</span></p>
<p class="MsoNormal"><span style="font-size: 10pt;" lang="EN-US">Numerical Modeller</span></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="font-size: 10pt;" lang="EN-US">Australia-Indonesia Facility for Disaster
Reduction</span></p>
<p class="MsoNormal"><span style="font-size: 10pt;" lang="EN-US">Mobile: +62 811 820 4637 | Phone: +62 21
398 30088 x1007 | Fax: +62 21 398 30068</span></p>
<p class="MsoNormal"><span style="font-size: 10pt;" lang="EN-US"> </span></p>
<p class="MsoNormal"><img src="cid:image001.jpg@01CB1DEA.70229B20" alt="cid:341378CF-F190-43E3-BF4F-9D25093D10FA@e2.local" border="0" height="131" width="624"></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
</div>
</div>
<p class="MsoNormal"><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></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
Best regards,<br>
Chaitanya kumar CH.<br>
/t<span style="font-family: "MS Mincho";">ʃ</span>a<span style="font-family: "MS Mincho";">ɪ</span>θənjə/
/k<span style="font-family: "MS Mincho";">ʊ</span>m<span style="font-family: "MS Mincho";">ɑ</span>r/
<br>
+91-9494447584<br>
17.2416N 80.1426E</p>
</div></div></div>
</div>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>