[GRASS-user] R: v.to.db output (GRASS for Windows 7.0.3RC2)

Aldo CLERICI aldo.clerici at unipr.it
Thu Jan 21 02:56:57 PST 2016


Moritz,
Thanks for the answer, but my question was probably much more simple.
It was about the order of category values in the output list of v.to.db that seems random.
Anyway, by analysing the following example from North Carolina dataset:
v.to.db -p map=geology at PERMANENT option=area units=kilometers                   
cat|area
11|141.526058758045
13|0.163779303256579
14|45.7839483425881
18|27.8567323538938
19|0.148723573715116
22|0.26102244568762
25|1.56599087232127
27|0.840935167775083
30|0.390091264363512
..............
I realized that the values are listed proceeding from the upper right corner of the map from right to left and from up to down. 
Thanks again.
A. Clerici


-----Messaggio originale-----
Da: Moritz Lennert [mailto:mlennert at club.worldonline.be] 
Inviato: giovedì 21 gennaio 2016 08:52
A: Aldo CLERICI <aldo.clerici at unipr.it>; grass-user at lists.osgeo.org
Oggetto: Re: [GRASS-user] v.to.db output (GRASS for Windows 7.0.3RC2)

On 20/01/16 18:09, Aldo CLERICI wrote:
> Dear GRASS users,
>
> By (Spearfish Location):
>
> v.to.db –p roads option=length
>
> I have this result:
>
> cat|length
>
> 5|136313.999118462
>
> 4|151211.909391895
>
> 3|29073.0640515405
>
> 1|47106.9051508698
>
> 2|28460.9513530158
>
> I’m not able to realize the sorting criteria.  Any hint?

v.db.select roads
cat|label
0|no data
1|interstate
2|primary highway, hard surface
3|secondary highway, hard surface
4|light-duty road, improved surface
5|unimproved road

The spearfish dataset dates from pre-grass6 times when vectors did not have attribute tables, but only a category value with relevant labels. 
So all roads of a certain type had the same cat value which had a thematic meaning.

Your result thus gives you the total length of road per category.

Moritz


More information about the grass-user mailing list