[GRASSLIST:4975] Re: Areas in dig_att

Alexandra Zamparas kat at nada.kth.se
Sat Nov 16 08:27:22 EST 2002


On Thu, 14 Nov 2002, Eric G. Miller wrote

> > 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>".

So, I would have to make a small script that extracts the values from
the v.report result and writes them into a file <foo> under dig_att?

> > 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...

OK, sorry, I meant to say odd numbers, according to the sample file I
enclosed the previous time. I had a map with subbasins and I would
expect that the resulting file would say 1, 2, 3 etc. not 0, 2, 4,
6..Is it "acting" like this 'cause of the internal numbering system?

>If you want each polygon/line/point to have a unique
> reference number, than you must give it a unique number.

I 'm not sure how to do that. Do I reclass my map manually and where
it says 0, 2, 4, 6..I put 1, 2, 3, 4 ? Not very practical when you
have like 245 or more subbasins. However, in the final end I need a
file with unique numbers for each basin and area for it and other
things.

There is actually quite much work that has to be done in vector
format and my expectations arise from other commercial software like
the "Arc's" and IDRISI32. However, I would like to stick to GRASS,
since that is mainly what my thesis is dealing with and I also
believe in its potential and the work that so many people are doing
for it. How far can I go with my vectors in GRASS 5.0.0pre3?

Warm regards,
Alexandra




More information about the grass-user mailing list