[GRASS-user] converting lines to polygons

Markus Metz markus.metz.giswork at googlemail.com
Thu Sep 23 10:23:23 EDT 2010


Micha Silver wrote:
> Bryan Keith wrote:
>>>
>>> Bryan Keith wrote:
>>>
>>>>
>>>> Hello,
>>>>
>>>> I'm using these commands:
>>>>
>>>> v.clean input=test_ln output=testclean_ln tool=snap,bpol thresh=0.2,0
>>>> v.type input=testclean_ln output=testclean_bnd type=line,boundary
>>>> v.centroids input=testclean_bnd output=testclean_py
>>>>
>>>> trying to convert a bunch of lines to 5 polygons.  I've tried lots of
>>>> variations of v.clean including many snap thresholds, but I can only get
>>>> 3
>>>> polygons.  Is there something I'm doing wrong?
>>>>
>>>>
>>>
>>> If it's only two missing, then just manually add centroids to those two
>>> areas that are not yet polygons. (using v.digit)
>>>
>>
>> Well, it's two in this simple little example clipped from a larger file,
>> and I have lots of files to process so I'm looking for an automated
>> process.
>>
>>
>
> Can you figure out why other areas were not closed? Maybe you need a larger
> threshold value?
> By opening the vector with v.digit you'll see by the color coding of the
> nodes which are part of closed boundaries (dark green) and which are on a
> "broken" boundary (red).
> You'll also see quickly where you have centroids inside correct boundaries,
> and where you're missing them.

All this information (incorrect boundaries, centroids outside areas)
is printed by default as output of v.clean, when topology for the
cleaned vector is built. As long as any incorrect boundaries,
centroids outside areas or duplicate centroids are reported, the
vector is not clean and v.centroids will not be able to put a centroid
into every area that is supposed to be there (v.centroids does put a
centroid into each area that actually is there).

Markus M

>
>> Bryan
>>
>>
>>>>
>>>> Check out the line and polygons here:
>>>>
>>>> http://www.ideotrope.org/~bryan/lines.png
>>>> http://www.ideotrope.org/~bryan/polygons.png
>>>>
>>>> Bryan
>>>>
>>>> _______________________________________________
>>>> grass-user mailing list
>>>> grass-user at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>>>
>>>> This mail was received via Mail-SeCure System.
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Micha Silver
>>> Arava Development Co. +972-52-3665918
>>> http://surfaces.co.il
>>>
>>>
>>>
>>>
>>
>>
>> This mail was received via Mail-SeCure System.
>>
>>
>>
>
>
> --
> Micha Silver
> Arava Development Co. +972-52-3665918
> http://surfaces.co.il
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>


More information about the grass-user mailing list