[GRASS-dev] Re: Proof of concept for more complete database access
in GRASS module
[was: Re: [GRASS-user] RE: Problem querying layers other than '1' in gi s.m]
Moritz Lennert
mlennert at club.worldonline.be
Tue Oct 10 10:53:26 EDT 2006
Trevor Wiens wrote:
> I wonder now how many steps it takes to recreate your arbitrary query
> graph with 'layers' and I wonder about performance differences between
> the two.
I'm not sure you can handle this via layers. Currently you have to do
the following (untested):
echo "create view temp as select t1.pop_2001 as pop1, t2.pop_2001 as
pop2, t1.comcod from bel_espon143 as t1, commcen as t2 where
t1.comcod=t2.comcod order by t1.pop_2001 desc" | db.execute
v.db.connect -o map=communes table=temp key=comcod
d.vect.chart map=communes scale=0.0001 columns=pop1 sizecol=pop2
v.db.connect -o map=communes table=original_table key=keycolumn
echo "drop view temp" | db.execute
So, in order to get back to the exact previous situation four extra
steps of creating the view, linking to the view, linking back to the
original data table and erasing the view.
Moritz
More information about the grass-dev
mailing list