[GRASSLIST:3913] d.vect and postgresql in 5.7

I have attribute data linked into a shape file using PostgreSQL. My
problem is I can't figure out how to produce a map of a given attribute
in the associated postgresql database.

Here's what I've done to set things up:

--------------------------
db.connect driver=pg database="dbname=alpac_netdown,user=caumann"

SHPDIR=/home/caumann/amedata/netdown/L3/coverages/
DBFDIR=/home/caumann/amedata/netdown/L3/data/

v.in.ogr -o dsn="$SHPDIR" \
    output=l3a_fin_n83 layer=l3a_fin_n83

db.copy from_driver=dbf from_database=$DBFDIR \
    from_table=l3a_net_final \
    to_driver=pg to_database="dbname=alpac_netdown,user=caumann" \
    to_table=l3a_fin_n83_att

v.db.connect -o map=l3a_fin_n83 table=l3a_fin_n83_att field=1 \ key=OID
driver=pg database="dbname=alpac_netdown,user=caumann"

v.db.connect -p map=l3a_fin_n83
--------------------------

## cgrp is one of the columns in the database and it has has 5
## values: C, D, CD, DC and "" or NULL or missing.

Now I want to produce a map with different colors for each of the
different values of cgrp for each polygon in the map. The map should
have 4 (or 5?) colors.

-----------

d.vect -c map=l3a_fin_n83 field=1 type=area display=attr attrcol=cgrp

-----------

The above produces a map with a large number of colors and is clearly
not correct.

-------
d.vect map=l3a_fin_n83 field=1 type=area display=shape attrcol=cgrp \
    where="cgrp='D'" col=red
------

Produces nothing. Why doesn't it like my query?

I'm sure there's a way to do this, I just can't figure out the different
flags to d.vect.

Many Thanks!
Craig

Hi,
I have a problem.
I have a vector composed by may polygones with common boundaries and I would
like to obtain the external boundary of this vector without internal
divisions.
Do someone know the right command?

Thank you

Leonardo Lami

On Wednesday 14 July 2004 23:47, Craig Aumann wrote:

I have attribute data linked into a shape file using PostgreSQL. My
problem is I can't figure out how to produce a map of a given attribute
in the associated postgresql database.

Here's what I've done to set things up:

--------------------------
db.connect driver=pg database="dbname=alpac_netdown,user=caumann"

SHPDIR=/home/caumann/amedata/netdown/L3/coverages/
DBFDIR=/home/caumann/amedata/netdown/L3/data/

v.in.ogr -o dsn="$SHPDIR" \
    output=l3a_fin_n83 layer=l3a_fin_n83

db.copy from_driver=dbf from_database=$DBFDIR \
    from_table=l3a_net_final \
    to_driver=pg to_database="dbname=alpac_netdown,user=caumann" \
    to_table=l3a_fin_n83_att

v.db.connect -o map=l3a_fin_n83 table=l3a_fin_n83_att field=1 \ key=OID
driver=pg database="dbname=alpac_netdown,user=caumann"

v.db.connect -p map=l3a_fin_n83
--------------------------

Why do you think that there is a relation between
alpac_netdown.l3a_fin_n83_att.OID and categories in the map?

## cgrp is one of the columns in the database and it has has 5
## values: C, D, CD, DC and "" or NULL or missing.

Can you get those attributes with d.what.vect?

d.vect map=l3a_fin_n83 field=1 type=area display=shape attrcol=cgrp \
    where="cgrp='D'" col=red
------

Produces nothing. Why doesn't it like my query?

Radim

I have a vector composed by may polygones with common boundaries and I
would like to obtain the external boundary of this vector without
internal divisions.

In GRASS 5.7, dissolve common boundaries with 'v.extract -d'.

Hamish