Polygons into GRASS

Malcolm Williamson malcolm at cast.uark.edu
Wed Jan 19 10:24:27 EST 1994


Hi, Mark!
> 
> I have a digitized representation of a set of polygons, such as a soils map.
> Unfortunately, the map is divided into a serial of data sets where each data
> set contains complete polygons for all areas of that same value.  That is,
> data set number 1 contains complete polygons for all areas designated as soil
> type 1; data set number 2 contains complete polygons for all areas designated
> as soil type 2; and so on.  Also, none of the polygons have attribute or label
> points associated with them (but I know what their label should be based upon
> the data set the polygon is in).
> 
> I can import the separate files into GRASS and make separate dig files.  My 
> first question:
> 
> 1.  Is there any way to bulk label polygons within GRASS (much like bulk 
> labeling of lines within v.digit)?  If there is no way to automatically label
> a polygon, is there a way to generate a centroid within a GRASS polygon?
> 

Someone out there has probably written a program, but I'm not familiar with it.
If someone tells you of one, would you be so kind as to pass it along to me?
Thanks!

> If I can efficiently label the polygons by data set, I then intend to v.patch
> the various dig files together.  My next question then:
> 
> 2.  Can I eliminate the overlap between the edges of two adjoining polygons?
> That is, can I convert the complete polygons which result in the storage of
> duplicate coordinates between adjoining polygons into a vector representation
> where adjoining polygons both utilize the same segment/vector to construct each
> polygon?  I tried the GRASS4.0 version of v.spag with threshold=0 and while it
> works for part of the polygon, it seems to get 'hung in a loop' in other parts
> of the data set.
> 

Your best bet on this subject is to transform your polygons (after they are 
labeled) to the raster domain, and carry on from there, as this is where the 
strength of GRASS resides. The key to moving from vector to raster is to 
determine what the actual spatial accuracy of the vector lines is, so that you
can choose an appropriate raster resolution. You will find that patching 
operations are much easier with raster data; you have many options of what to
do with any overlap, from filtering to using a rules-based decision system. Give
it a try!

> Any thoughts on either of these two problems would be greatly appreciated.

Regards,
-- 
Malcolm D. Williamson - Research Assistant       E-mail: malcolm at cast.uark.edu
Center for Advanced Spatial Technologies      Telephone: (501) 575-6159
Ozark Rm. 12                                        Fax: (501) 575-3846 
University of Arkansas              
Fayetteville, AR 72701



More information about the grass-user mailing list