[gdal-dev] Question how to use OGRLayerH

Alexander Plum Alexander.Plum at cae.de
Thu Apr 22 08:15:51 EDT 2010

Hello there,

I want to use the GDAL-function 'GDALContourGenerate'  to construct highlines. 

Furthermore I make use of the OGRLayerH which should save the the vector-data-output (the result) of the function called above. 

I've read the OGR API Tutorial page (http://www.gdal.org/ogr/ogr_apitut.html) und understood its content. 
But in my case the Layer shall save one vector with the different height values.
For every height value there should exist one ring representing a highline. The rings should also be written into another vector.
On top of that for every ring there has to be a vector (or let's say a matrix containing two vectors) with x- and y- values for certain positions of the ring.

                           ring 1------ > x1 y1
                           ring 2            x2 y2
                           ring 3            ...
                           ...                  xN yN
0,0 m -----------> ring N
2,5 m
5,0 m
7,5 m
10, m
12,5 m   
500,0 m               

So all in all I need three vectors saving the result of 'GDALContourGenerate'-function.

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'GDALContourGenerate'-function.

Alexander Plum
This email was Anti Virus checked by CAE

More information about the gdal-dev mailing list