[gdal-dev] Question how to use OGRLayerH

Chaitanya kumar CH chaitanya.ch at gmail.com
Thu Apr 22 09:07:34 EDT 2010


Alexander,

I didn'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's features and add up
all the linestrings into a multilinestring according to your criteria.

FYI, The function GDALContourGenerate stores the contours as linestrings
containing XYZ points. The elevation in stored in 'Z' whether or not it
stored in a field.

On Thu, Apr 22, 2010 at 5:45 PM, Alexander Plum <Alexander.Plum at cae.de>wrote:

> 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.
>
> Greetings,
> Alexander Plum
> --
> This email was Anti Virus checked by CAE
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9848167848
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100422/0521e4a1/attachment.html


More information about the gdal-dev mailing list