[GRASSLIST:94] Re: d.what.vect issue with multiple layers

Kirk R. Wythers kwythers at umn.edu
Tue Mar 14 13:00:03 EST 2006


Maciek and Radim,

Here is a more info on this layer question
On Feb 23, 2006, at 1:09 PM, Maciek Sieczka wrote:


>
> Are you sure they are connected with your vector file?
>
> How many dblinks does the 'v.info your_vector_file' report?
>
> Provided there are 2 dblinks indeed, what does 'v.info -c layer=1
> your_vector_file' and 'v.info -c layer=2 your_vector_file' say?
>
>

I have a vector file (linked to layer 1) with the name t61nr9w_tvol,  
v.info gives:

GRASS 6.1.cvs (minnesota_utm):~ > v.info -c t61nr9w_tvol layer=1
Displaying column types/names for database connection of layer 1:
INTEGER|cat
INTEGER|a_cat
DOUBLE PRECISION|a_area
DOUBLE PRECISION|a_perimeter
DOUBLE PRECISION|a_pls_fort_
DOUBLE PRECISION|a_pls_fort_i
INTEGER|a_coun
INTEGER|a_town
INTEGER|a_rdir
INTEGER|a_rang
INTEGER|a_sect
INTEGER|a_fort
INTEGER|a_glot
INTEGER|a_parc
CHARACTER|a_fort_desc
DOUBLE PRECISION|a_glotmatch
INTEGER|b_cat

I used v.db.addtable to add 6 additional layers, v.info on each gives  
the equivalent of:

GRASS 6.1.cvs (minnesota_utm):~ > v.info -c t61nr9w_tvol layer=2
Displaying column types/names for database connection of layer 2:
INTEGER|cat
INTEGER|cords
INTEGER|mbm
INTEGER|poles
INTEGER|posts

depending on layer specified.

This tells me that the layers are connected. Correct?

> I've never used postgres. Only DBF and SQLITE. And I'm not an sql
> expert. So I might be of not much help. But try this procedure (I
> couldn't think of anything else, but it is reproducable and should do)
> to make sure Grass is able to create and query a vector with 2 layers
> using postgres. For both SQLITE and DBF it works as expected:
>
> $ v.digit map=nowa -n
>
> # add 1 column to the table; draw 1 line; input attribute; exit
>
> $ v.to.points input=nowa type=line output=nowa_pt llayer=1 dmax=100
>
> # it will automatically create 'nowa_pt' with 2 dblinks
>
> $ d.erase; d.vect nowa_pt; d.what.vect -e
>
> # an edit window with layer 1 and layer 2 properties pops up

If I follow these directions, the edit window comes up showing layer  
one only. Radim, I know you suggested v.category in a previous post.  
Sorry to be so dense on this, but reading the man page for  
v.category, I'm not sure what to do there.

the report option gives the same infor for both layer 1 and layer2.  
This implies a problem to me:

GRASS 6.1.cvs (minnesota_utm):~ > v.category input=t61nr9w_tvol  
option=report layer=1
LAYER/TABLE 1/t61nr9w_tvol:
type       count        min        max
point          0          0          0
line           0          0          0
boundary       0          0          0
centroid     686          1        686
area           0          0          0
all          686          1        686
GRASS 6.1.cvs (minnesota_utm):~ > v.category input=t61nr9w_tvol  
option=report layer=2
LAYER/TABLE 1/t61nr9w_tvol:
type       count        min        max
point          0          0          0
line           0          0          0
boundary       0          0          0
centroid     686          1        686
area           0          0          0
all          686          1        686

Do I need to add a new category here?

Thanks

Kirk

>
> Is it the same in your postgres case?
>
> Maciek
>
> --------------------
> W polskim Internecie s? setki milion?w stron. My przekazujemy Tobie  
> tylko najlepsze z nich!
> http://katalog.panoramainternetu.pl/
>




More information about the grass-user mailing list