[GRASSLIST:3916] Re: d.vect and postgresql in 5.7
Radim Blazek
blazek at itc.it
Thu Jul 15 04:27:58 EDT 2004
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
More information about the grass-user
mailing list