[gdal-dev] hillshading to vector

Roger Veciana i Rovira rveciana at gmail.com
Thu Jul 4 13:55:33 PDT 2013


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 means re-writting all the code, and this
scripts are just to get the result.

Again, I have to finish them, I was just working on it.

Roger


2013/7/4 Etienne Tourigny <etourigny.dev at gmail.com>

>
>
> On Thu, Jul 4, 2013 at 3:58 AM, Carlo A. Bertelli (Charta s.r.l.) <
> bertelli at 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 to the list.
>> I think that instead of making another script you could add it as an
>> option to gdal_contour.py and use it alternatively with -l (default) or -p
>> (output to polygons).
>>
>
> not so sure about that, because the script requires matplotlib (although
> the option could be disabled if matplotlib cannot be imported).
>
>
>> By the way, another enhancement for gdal_contour could be adding an
>> options to cut the output with a line or polygon layer (say the shoreline
>> or other boundary).
>> c
>>
>> c
>>>
>>> On Wed, Jul 3, 2013 at 8:04 PM, Roger Veciana i Rovira <
>>> rveciana at gmail.com> wrote:
>>>
>>>> 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
>>>>
>>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
> _______________________________________________
> 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/20130704/487dc6b0/attachment.html>


More information about the gdal-dev mailing list