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.
Here’s an example of a command that does the trick.

gdal_contour -a Thickness[cm] -fl  1.000000 2.000000 5.000000 50.000000 
100.000000 <tiffile> <shpfile>

We then convert to kml using ogr2ogr

Thanks again
Ole

Dr Ole Nielsen
Numerical Modeller
Australia-Indonesia Facility for Disaster Reduction
Mobile: +62 811 820 4637 | Phone: +62 21 398 30088 x1007 | Fax: +62 21 398 30068

[cid:[email protected]]






From: Chaitanya kumar CH [mailto:[email protected]]
Sent: Wednesday, 7 July 2010 3:27 PM
To: Ole Nielsen
Cc: [email protected]; [email protected]; Kristy Van Putten
Subject: Re: [gdal-dev] Which contour is which?

Ole,

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. (http://www.gdal.org/gdal_contour.html)
On Wed, Jul 7, 2010 at 1:26 PM, Ole Nielsen 
<[email protected]<mailto:[email protected]>> wrote:
Dear all

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.

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.

How is it possible to determine which contour line corresponds to a particular 
level?

Best regards
Ole



Dr Ole Nielsen
Numerical Modeller
Australia-Indonesia Facility for Disaster Reduction
Mobile: +62 811 820 4637 | Phone: +62 21 398 30088 x1007 | Fax: +62 21 398 30068

[cid:[email protected]]



_______________________________________________
gdal-dev mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/gdal-dev



--
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E

<<inline: image001.jpg>>

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to