[GRASSLIST:3382] Re: Category labels in dig_cats

Roger Miller rgrmill at rt66.com
Mon Mar 25 20:34:40 EST 2002


On Monday 25 March 2002 17:56, S P Arif Sahari Wibowo wrote:

> 1. Are the labels only for labeling / naming objects, or GRASS can
> actually consider it as 'property' of the objects, and therefore can draw
> objects with appearance depend on this 'property' (label)? Or are there
> different attributing mechanism for this purpose?

GRASS can label vector objects with values and can associates a name with 
each value.  The name can be regarded as a property associated with the 
value.   There are a few things that you can do with the values, but not a 
lot.  d.vect.cats lets you display categories (based on the values) with 
different colored lines.  That can also be done in ps.map; ps.map also lets 
you vary the line width based on the category value.  No property other than 
the name is inherentlhy associated with a value.  Other properites are 
assigned to the value for the duration of one command.  If you want to use 
the same color for a vector object in more than one command then you have to 
remember the value:color combination yourself.

Keep in mind that most of GRASS's capabilities are in processing raster data. 
There aren't a lot of tools that process vector data.

> 2. How to make a map drawing that also display the category labels for
> each objects?

d.vect.labels will display the values, the name or the coordinates of a 
vector object.   The display is useful, but doesn't have much cartographic 
value.  The display may be unreadable if your map has a very high density of 
vector objects.

> 3. If for each category I combine all the labels of that category, and put
> it in new category labels' file, will this work? Will I lost some
> functionality because of this combining of labels?

Generally, this won't work and you will lose information.

> 4. How to create a new layer that contain a subset of an old layer, only
> the objects that have certain condition in its category labels (e.g. '>0',
> '<>"CI"', etc.)?

v.extract creates layers that are subsets of other data sets.  If you have a 
recent version of the software then v.extract might work.  If your version 
isn't recent then v.extract probably won't work.

> 5. How to make a 'display set' that contain several vector layer, each
> have their own appearance, that will be drawn together, exported together,
> printed together, etc.?

I don't know of any way in GRASS to do that on a global basis.  You can write 
scripts that will take care of specific tasks.

> 6. Any idea on a path of exporting vector format from GRASS to other
> formats accessible to end-user layout / business applications (StarOffice,
> Freehand, MS Office, etc.)?

GRASS offers several different export formats for both vector and raster 
data.  The most widely used exchange format for vector data is probaby dxf.  
Raster files can be exported as image files (tiff, ppm or png) and some of 
these files -- tiff in particular -- can be georeferenced.  ps.map also 
produces postscript output based on vector, raster and text data.  The 
postscript data are easily converted to pdf files and in that form can be 
shared on a variety of platforms.


Roger Miller
Lee Wilson and Associates



More information about the grass-user mailing list