[GRASS-user] generate polygon from lines
Craig Feuerherdt
craigfeuerherdt at gmail.com
Mon Aug 28 00:38:47 EDT 2006
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.
I have used v.clean input=bnd output=bndc tool=snap thres=0.0001 to snap any
small dangles together (my data is in lats/longs) which output the
following;
+---------------------------------+---------------+
| Tool | Threshold |
+---------------------------------+---------------+
| Snap vertices | 1.000000e-04 |
+---------------------------------+---------------+
Copying vector lines ...
--------------------------------------------------
Rebuilding parts of topology ...
Building topology ...
234 primitives registered
Topology was built.
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 : -
--------------------------------------------------
Tool: Snap line to vertex in threshold
All vertices: 2140
Registered points (unique coordinates): 1910
Nodes marked as anchor : 1837
Nodes marked to be snapped : 79
Snapped vertices : 88
New vertices : 3
--------------------------------------------------
Rebuilding topology for output vector ...
Building topology ...
234 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 235
Number of primitives: 234
Number of points : 0
Number of lines : 234
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
I then used v.build map=bndc error=err option=build --overwrite which output
the following;
Building topology ...
234 primitives registered
Building areas: 100%
0 areas built
0 isles built
Attaching islands:
Attaching centroids: 100%
Topology was built.
Number of nodes : 235
Number of primitives: 234
Number of points : 0
Number of lines : 234
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
WARNING: The vector 'err' already exists and will be overwritten.
Building topology ...
0 primitives registered
0 areas built
0 isles built
Attaching islands:
Attaching centroids: Topology was built.
Number of nodes : 0
Number of primitives: 0
Number of points : 0
Number of lines : 0
Number of boundaries: 0
Number of centroids : 0
Number of areas : 0
Number of isles : 0
Obviously there were no polygons created.
Regardless of the combinations I try (ie v.clean with the break option,
followed by v.clean with the snap option) I am unable to create a polygon.
I have added the shapefile into QGIS and physically viewed the line to check
if there are any gaps - which there aren't.
What am I missing?
I am using grass 6.0.1 on gentoo.
Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20060828/c89df4bf/attachment.html
More information about the grass-user
mailing list