Fwd: [GRASS-user] generate polygon from lines

Hamish hamish_nospam at yahoo.com
Tue Aug 29 05:26:29 EDT 2006


Craig Feuerherdt wrote:

> 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

almost there; looking at the shape file you sent me in v.digit there are
dangling nodes inside the polygon. Those will have to be removed first.

# change dangles back to lines:
v.clean in=bnd_poly out=bnd_poly_clean tool=chdangle thresh=-1



so the full process looks like:

v.in.ogr in=bnd_test.shp out=bnd
v.clean input=bnd output=bnd_break type=line tool=break
v.type input=bnd_break output=bnd_poly type=line,boundary
v.clean in=bnd_poly out=bnd_poly_clean tool=chdangle thresh=-1
v.category input=bnd_poly_clean output=bnd_area option=add

d.vect bnd_area


done!


Hamish




More information about the grass-user mailing list