[gdal-dev] simplifying height contours

Vincent Mora vincent.mora at oslandia.com
Wed Apr 16 05:42:37 PDT 2014


On 16/04/2014 14:34, Even Rouault wrote:
> Le mercredi 16 avril 2014 12:46:45, Vincent Mora a écrit :
>> Hi,
>>
>> I have a vector file with height contours and I need to simplify the
>> lines (too many points).
>>
>> Isolevel lines must not intersect, so simplifying the vector directly is
>> a bit tedious (involves collision detection of lines to constrain
>> simplification).
>>
>> If I had the DEM, I could reduce the resolution and use
>> gdal_countour...but I don't.
>>
>> So what about generating the DEM from the height contours? Do you think
>> it fits in gdal somewhere ? Has someone the same kind of use-case ?
> It already exists in fact:
>
> - gdal_rasterize : will produce a DEM with the contour line stroked, and with
> holes between them
> - gdal_fillnodata.py : will fill the holes with interpolated values
>
Thanks a lot, I found gdal_grid in the meantime which also seems to do 
the job but I'm not sure how it samples line, maybe it uses rasterize 
internally, I'll have a look.
>> V.
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list