I downloaded some shapefiles from the Australian Bureau of Statistics (ABS). It's basically showing a bunch of suburbs when I view the shapefile through a GIS tool. The GIS tool that I am using at present is the GRASS 6.4.2 tool.

So basically the shapefile has the below statistics

Number of points:       0               Number of areas:      15231      
Number of lines:        0               Number of islands:    7003       
Number of boundaries:   31362           Number of faces:      0          
Number of centroids:    15220           Number of kernels:    0

I'm trying to extract from this shape file the arcs. That is the polylines of the boundaries. This is because I need to find for each arc its accompanying adjacent boundary.

For example arc1 may have boundary with Cat id - 135 on its left and Cat ID = 125 on its right.

Any clues as to how to do this would be appreciated.


In GRASS the module v.to.db can "upload" the cat values of the right side and left side polygons into the boundary attribute table. From the v.to.db man page:

Upload category numbers of left and right area, to an attribute table of boundaries common for the areas:

   # add categories for boundaries of the input vector map, in layer 2:
   v.category soils out=mysoils layer=2 type=boundary option=add
   # add a table with columns named "left" and "right" to layer 2 of the input
   # vector map:
   v.db.addtable mysoils layer=2 col="left integer,right integer"
   # upload categories of left and right areas:
   v.to.db mysoils option=sides col=left,right layer=2
   # display the result:
   v.db.select mysoils layer=2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.