<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hi, I was just working on that.</span><div style="font-family:arial,sans-serif;font-size:13px">I think that you need a script like gdal_contour, but creatig polygons instead of lines. The algorithm used is Marching Squares.<br>
<div>You can see the code, without explanation, here:</div><div><a href="https://github.com/rveciana/geoexamples/tree/master/python/raster_isobands" target="_blank">https://github.com/rveciana/geoexamples/tree/master/python/raster_isobands</a><br>
</div></div><div style="font-family:arial,sans-serif;font-size:13px">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.</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Roger</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/7/3 Carlo A. Bertelli (Charta s.r.l.) <span dir="ltr"><<a href="mailto:bertelli@charta.acme.com" target="_blank">bertelli@charta.acme.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>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.<br>
Is there a way to get smooth polygons from gdal_polygonize or polygons from gdal_contour? <br clear="all"><span class="HOEnZb"><font color="#888888"><br>-- <br>--------------------------------------------------------------------------<br>
Carlo A. Bertelli<br> Charta servizi e sistemi per il territorio e la storia ambientale srl <br>
Dipendenze del palazzo Doria, <br>
vc. alla Chiesa della Maddalena 9/2 16124 Genova (Italy)<br> tel. <a href="tel:%2B39%280%2910%202475439" value="+390102475439" target="_blank">+39(0)10 2475439</a> fax <a href="tel:%2B39%280%2910%202475439" value="+390102475439" target="_blank">+39(0)10 2475439</a> gsm:<a href="tel:%2B39%20393%201590711" value="+393931590711" target="_blank">+39 393 1590711</a><br>
e-mail: <a href="mailto:bertelli@charta.acme.com" target="_blank">bertelli@charta.acme.com</a> <a href="http://www.charta.acme.com" target="_blank">http://www.charta.acme.com</a><br>
--------------------------------------------------------------------------<br><br><br>
<br><br><br>
</font></span><br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>