[gdal-dev] hillshading to vector
Roger Veciana i Rovira
rveciana at gmail.com
Wed Jul 3 11:36:30 PDT 2013
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.) <bertelli at charta.acme.com>
> 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: bertelli at charta.acme.com http://www.charta.acme.com
> --------------------------------------------------------------------------
>
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130703/d724b735/attachment.html>
More information about the gdal-dev
mailing list