[GRASS-user] problems with topology requested by 2nd vector database layer

Martin Landa landa.martin at gmail.com
Sun Feb 10 12:25:36 EST 2008


Hi,

2008/2/10, Guido Lorenz <glorenz2000 at yahoo.com>:
> I  am  experiencing  some  trouble  with  extracting  (and/or  displaying)  a  vector  layer,  based  on  a  2nd  database  connection  (GRASS  6.3svn,  PostgreSQL  8.26).   Viewing  the  output  from  v.extract,  it  can  be  seen  that  the  table  connection  is  correctly  recognised  and  a  sql-selection  is  performed  without  errors.  Nevertheless,  the  topology  of  the  new  output  vector  generated  indicates  that  there  are  any  vector  elements  (see  example  1).   The  same  command,  but  referred  to  the  1st  database  table  (the  original  one)   gives  a  correct  output  vector  layer  (see  example  2).
>
> Both  associated  tables  have  the  same  identifier  column  (cat),  defined  as  primary  key  and  index  column  in  PostgreSQL.  The  v.info  command  shows,  that  both  tables  are  apparently  well  connected  to  the  vector  layer.

> example  1:
> v.extract  input=vu_transectas_r2 at PERMANENT  output=test5  type=point,line,boundary,centroid,area,face  layer=2  new=-1  {where=cat  >  1}  --overwrite
> log:
> Vector  map  <test5>  already  exists  and  will  be  overwritten
> Load  categories  from  the  database  (table  =  geo.test3,  db  =  soils2006).
> 40  categories  loaded  from  the  database
> Building  topology  ...
> Registering  lines:
> 0  primitives  registered
> Building  areas:
> 0  areas  built
> 0  isles  built
> Attaching  islands:
> Attaching  centroids:  Topology  was  built.
> Number  of  nodes        :     0
> Number  of  primitives:     0
> Number  of  points      :     0
> Number  of  lines        :     0
> Number  of  boundaries:     0
> Number  of  centroids  :     0
> Number  of  areas        :     0
> Number  of  isles        :     0
> Writing  attributes...

it seems there are no categories in the second layer, try

v.category input=vu_transectas_r2 at PERMANENT opt=print layer=2

you can use v.category or v.digit module to add categories to layer 2.

Regards, Martin

-- 
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *


More information about the grass-user mailing list