[GRASS-dev] Re: [GRASS-user] RE: Problem querying layers other
than '1' in gi s.m
Moritz Lennert
mlennert at club.worldonline.be
Wed Sep 27 08:28:05 EDT 2006
On Wed, September 27, 2006 10:28, Massimiliano Cannata wrote:
> Sorry to jump into the discussion, but I agree too.
> Two different type vector time series exist:
> 1 - the geometry is changing in time, and this can be handled with layers
> 2 - the attribute change in time but the geometry is constant (e.g.:
> rain gauges station)
>
> For the second type, it is harder to manage in GRASS (or at least i
> cannot see any one) and I usually manage it in an external database by
> importing the selected tuples (the ones at a given time), and then
> deleting the vector when is no more needed.
I guess the solution would be to be launch an arbitrary sql query which
returns the needed cats and attributes (e.g. cats and attributes of
stations at date X) and then work with those. As I said, this should not
be too difficult, as long as the cats correspond to those of the points
representing the stations).
> Of course it is time consuming and a better solution would be nice :-)
> It would be nice to be able to create a connection with a selection from
> a table and not just with the table itself....
This is what a view could work for, but as Trevor rightly stated, it is a
bit overkill if you only need it once. So the main need seems to be the
possibility to use the results of arbitrary queries (not only where
clauses) within the modules. As an example, you should be able to (without
using v.db.connect) do something like:
v.surf.rst map=rainstations sql="select stationid, rainfall from
rain20061005" /*rain20061005 is not connected to the map*/
or
d.vect map=rainstations sql="select stationid, rainfall from rain20061005,
rain20051005 where rain20061005.rainfall>rain20051005.rainfall"
> but I know this was not
> considered in developing phase and it will be a really hard work now.
I actually think that this should not be too complicated.
Moritz
More information about the grass-user
mailing list