Hi, I was just working on that. I think that you need a script like gdal_contour, but creatig polygons instead of lines. The algorithm used is Marching Squares. You can see the code, without explanation, here: https://github.com/rveciana/geoexamples/tree/master/python/raster_isobands In some weeks I'll add some more info in a README file and transform the file into a working script, not just a function. But you can use it just changing the file name and the intervals.
Roger 2013/7/3 Carlo A. Bertelli (Charta s.r.l.) <[email protected]> > Hello, > gdaldem makes a very good work and gdal_polygonize.py too, but the > combination is not so effective. Is there a way to obtain smooth polygons > representing shaded areas as it's possible with Arc? When using a dem, you > get polygons for pixels. Yes you can dissolve them, but you still have > jagged boundaries. I even tried to get contours from hillshading, but > obviously I get only polylines sometimes not useful to be transformed into > polygons. > Is there a way to get smooth polygons from gdal_polygonize or polygons > from gdal_contour? > > -- > -------------------------------------------------------------------------- > Carlo A. Bertelli > Charta servizi e sistemi per il territorio e la storia ambientale srl > Dipendenze del palazzo Doria, > vc. alla Chiesa della Maddalena 9/2 16124 Genova (Italy) > tel. +39(0)10 2475439 fax +39(0)10 2475439 gsm:+39 393 1590711 > e-mail: [email protected] http://www.charta.acme.com > -------------------------------------------------------------------------- > > > > > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev >
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
