Alexander,<br><br>I didn&#39;t understand your requirements correctly I think PostGIS can help you with the aggregation with just a few SQL commands. If you want to do it programmatically, you have to loop through the layer&#39;s features and add up all the linestrings into a multilinestring according to your criteria.<br>
<br>FYI, The function GDALContourGenerate stores the contours as linestrings containing XYZ points. The elevation in stored in &#39;Z&#39; whether or not it stored in a field.<br><br><div class="gmail_quote">On Thu, Apr 22, 2010 at 5:45 PM, Alexander Plum <span dir="ltr">&lt;<a href="mailto:Alexander.Plum@cae.de">Alexander.Plum@cae.de</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;">Hello there,<br>
<br>
I want to use the GDAL-function &#39;GDALContourGenerate&#39;  to construct highlines.<br>
<br>
Furthermore I make use of the OGRLayerH which should save the the vector-data-output (the result) of the function called above.<br>
<br>
I&#39;ve read the OGR API Tutorial page (<a href="http://www.gdal.org/ogr/ogr_apitut.html" target="_blank">http://www.gdal.org/ogr/ogr_apitut.html</a>) und understood its content.<br>
But in my case the Layer shall save one vector with the different height values.<br>
For every height value there should exist one ring representing a highline. The rings should also be written into another vector.<br>
On top of that for every ring there has to be a vector (or let&#39;s say a matrix containing two vectors) with x- and y- values for certain positions of the ring.<br>
<br>
<br>
                           ring 1------ &gt; x1 y1<br>
                           ring 2            x2 y2<br>
                           ring 3            ...<br>
                           ...                  xN yN<br>
0,0 m -----------&gt; ring N<br>
2,5 m<br>
5,0 m<br>
7,5 m<br>
10, m<br>
12,5 m<br>
...<br>
500,0 m<br>
<br>
<br>
So all in all I need three vectors saving the result of &#39;GDALContourGenerate&#39;-function.<br>
<br>
My problem is that I do not know how to employ this OGRLayer. Please correct me, if this is a wrong way to use the&#39;GDALContourGenerate&#39;-function.<br>
<br>
Greetings,<br>
Alexander Plum<br>
<font color="#888888">--<br>
This email was Anti Virus checked by CAE<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>
</font></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>