[gdal-dev] Countour polygons instead of lines

Ari Jolma ari.jolma at tkk.fi
Tue Sep 2 17:26:03 EDT 2008


Did you ever want gdal_contour to produce polygons instead of lines?

I made a small Perl program that uses the Perl bindings to GDAL and 
which converts the lines into polygons. The polygons represent "plates" 
of equal elevation and thus overlap. The polygons are stored into a new 
layer in such an order that ordered rendering of them produces a nice 
visualization. Visualization is my main goal here - I want to get a 
similar effect as in some weather forecasts. However, transparency does 
not work as expected in standard viewers because of overlapping 
polygons. Here's an example created from DEM: 
http://map.hut.fi/files/misc/contour_polygons.png

The code is also at http://map.hut.fi/files/misc/

I found this by googling: 
http://lists.maptools.org/pipermail/fwtools/2005-November/000199.html

I wonder what's the current situation. Does GRASS do this?

Cheers,

Ari




More information about the gdal-dev mailing list