Fwd: [GRASS-user] generate polygon from lines

Craig Feuerherdt craigfeuerherdt at gmail.com
Tue Aug 29 00:52:53 EDT 2006


I attempted what Hamish suggested ie

> as per newly arrived message on the mailing list, try that step again (
v.category) with type=area instead of type=centroid.

however I am still unable to generate a polygon. I have checked that all the
intersections are broken and that there are no 'undershoots' using v.digit

Thanks in advance.

Craig

---------- Forwarded message ----------

Hamish,

thanks for the response.
I have tried what you suggested but without much luck :( - no doubt due to
my newbie grass status and my mind being tainted by arcinfo methodology!
I have attached the shapefile for you to look at and to make sure that you
can get it to work (hope you don't mind). The lines have been 'selected'
from other layers (ie roads, rivers) hence the reason there are 'dangles'.

My methodology thus far;
- import shapefile using v.in.ogr
- v.clean input=bnd output=bnd_break type=line tool=break (to break lines
that intersect)
- v.type input=bnd_break output=bnd_poly type=line,boundary
- v.category input=bnd_poly output=bnd_poly2 type=centroid option=add (to
add a centroid)
- v.build map=bnd_poly2 error=err

My map is still a line :(


Craig


On 8/28/06, Hamish <hamish_nospam at yahoo.com> wrote:
>
> Craig Feuerherdt wrote:
> > I have a vector layer that contains lines which define a polygon.
> > I have attempted to build a polygon from the layer but have not had
> > much luck.
> ...
> > Number of nodes     :   238
> > Number of primitives:   234
> > Number of points    :   0
> > Number of lines     :   234
> > Number of boundaries:   0
> > Number of centroids :   0
> > Number of areas     :   -
> > Number of isles     :   -
>
>
> In GRASS-land boundaries + centroids make polygons, so convert lines to
> boundaries with v.type and add centroids with "v.category option=add".
>
> If it still doesn't work check with v.digit that all your nodes are
> snapped (green "x"s instead of red ones).
>
>
> Hamish
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20060829/f830d42a/attachment.html


More information about the grass-user mailing list