Re: [gdal-dev] hillshading to vector

2013-07-04 Thread Roger Veciana i Rovira
Hi Etienne, I have uploaded an other version that works without matplotlib, although I prefer the other, which is cleaner. But the new one is a better option if using matplotlib is a problem. Anyway, changing gdal_contour is much more work. Creating polygons instead of lines using the correct way

Re: [gdal-dev] hillshading to vector

2013-07-04 Thread Etienne Tourigny
On Thu, Jul 4, 2013 at 3:58 AM, Carlo A. Bertelli (Charta s.r.l.) < berte...@charta.acme.com> wrote: > Thanks a lot, Roger, it worked like a charm, just fiddling a little with > parameters and than run it in python. > It's really magic, I struggled with this question for two days before > writing

Re: [gdal-dev] hillshading to vector

2013-07-03 Thread Carlo A. Bertelli (Charta s.r.l.)
Thanks a lot, Roger, it worked like a charm, just fiddling a little with parameters and than run it in python. It's really magic, I struggled with this question for two days before writing to the list. I think that instead of making another script you could add it as an option to gdal_contour.py an

Re: [gdal-dev] hillshading to vector

2013-07-03 Thread Roger Veciana i Rovira
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

[gdal-dev] hillshading to vector

2013-07-03 Thread Carlo A. Bertelli (Charta s.r.l.)
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 jagge