[GRASS5] Problems with vector import, and a suggestion

Aleksey Naumov naumov at acsu.buffalo.edu
Thu Feb 7 13:46:39 EST 2002


Michel,

First of all, thanks for the good work on m.in.e00, it is the only import 
module that consistently worked for me. I am sure glad I can see my soil map 
now :-)

> A feature of m.in.e00 (probably not enough explained in the man page)
> is that m.in.e00 imports also the attribute in .PAT and put them in
> dig_cat : each attribute is in a category file named after the created
> vector file name followed by a dot and the name of the attribute (so you
> have as many categories file than attributes in the arc/info coverage.
>
> Ex : if you extract the file land.e00, and that the .PAT file has the user
> defined attributes OWNER and VALUE, m.in.e00 will create :
>   $LOCATION/dig/land        (the vector file itself)
>   $LOCATION/dig_att/land    (attribute file)
>   $LOCATION/dig_plus/land   (topology)
>   $LOCATION/dig_cats/land.owner (first attribute)
>   $LOCATION/dig_cats/land.value (second attribute)
>
> If you want draw the file according to one of the attributes, you will
> have to put a symbolic link on the cats file.  Ex: If you want have for
> the category the second attribute, run
>   ln -s $LOCATION/dig_cats/land.value $LOCATION/dig_cats/land

No, I think it's explained fine in the help page. Maybe include an example 
like the one above, to make it more concrete. Also, maybe mention the 'ln -s' 
as an alternative to 'cp'.

Another question on the help page. It says:

"...
The attribute of each "vector" object (points, line, and polygon) is the 
Arc/Info coverage-ID (and not the coverage-#)."

but:

"...
Flags:

-i
        Use the "feature-ID" of the arc info objects to link geometry and     
attribute's tables. The default is to use the "feature-#" field (which is an 
internal link, but you should not rely on it for linking Arc/Info objects to 
an external database. (GRASS 5.0 option)"

Sounds inconsistent, maybe just not clearly stated. Can it be made more clear 
in the help page?


> After that, d.area (or whatever its name, this a little bit confusing
> thoses days ;-) let you draw a map showing the land values with a
> beautifull color ramp !

Yes, it works. However you still need to supply "d.area" with "catnum"s in 
order to color areas by category. If you have 80 soil polygons and 
you want to color them according to the value in the "muid" attribute you'd 
have (after 'ln -s statsgo.muid statsgo') to list all the catnums explicitly, 
like:

> d.area -f statsgo catnum=2,5,7,8,11,12,23

after looking them up in 'dig_cat/statsgo', right?
Is there a command to color areas (or lines) according to unique value of 
category label? So far I can only do it one category at a time using PgSQL:

> d.vect.pg -f key=statsgo_id table=statsgo where="muid = 'NY126'" 
map=statsgo col=blue

I actually like how this (GRASS/Pg) works, just thought there may be a 
built-in module that does that. Is there?

> m.in.e00 attempts to be clever :) so if there is only one attribute in
> the arc/info coverage, the dig_cats file created is only named after
> the vector file name (no dot, no suffix)

I think m.in.e00 behaves just fine in this respect. In the future I think 
'dig_cat' should be retired in favor of a real database, but for now it's 
valuable to extract all attributes like m.in.e00 does.

Best regards,

Aleksey



More information about the grass-dev mailing list