[GRASSLIST:4959] Re: Areas in dig_att
Eric G. Miller
egm2 at jps.net
Thu Nov 14 21:23:01 EST 2002
On Fri, Nov 15, 2002 at 12:38:46AM +0100, Alexandra Zamparas wrote:
> Just wanted to start by thanking the people who have been answering
> my questions every time, all suggestions have been very helpful. Now,
> I'm looking at the dig_att file of my subbasins map and I can see the
> coordinates (of the area centroid?), if it is an arc or line and the
> Issue 1: How do I get the areas of the subbasins into the
> attribute table?
You don't. But maybe you can turn them into a category file
(dig_att/<name>). The format is documented in the programming manual,
but mostly is just lines of "<category number> : <some text>".
Now, getting the areas for each "area" can be obtained from v.report,
but values are summarized via category numbers (so ...)
> Issue 2: Why do the categories appear as even numbers? Isn't the
> category number supposed to be the unique-id?
Nope, doesn't need to be. Each category is a type of thing: For
instance, you might have all "Coniferous Forests" as category number
1 and Hardwood Forests as category 2, etc...
> Issue 3: Is it right that some category numbers appear more than
Depends. If you want each polygon/line/point to have a unique
reference number, than you must give it a unique number. GRASS
uses an internal numbering in built vector layers, but this is
not directly useful to the user. The category number is used
to link in any external attributes (say: dig_cats/landcover).
<geometry> --> <label point> --> <category>
(dig_att) (dig_cats or external DB)
static const char signature =
"Copyright (c) 2002 Eric G. Miller <egm2 at jps.net>";
More information about the grass-user