[GRASSLIST:3440] Re: meteorological data
neteler at itc.it
Tue May 18 03:17:07 EDT 2004
On Mon, May 17, 2004 at 03:31:24PM +0200, Sabine Grabner wrote:
> hello, i would like to get meteorological time series and station data from an
> external posgresql data base and would appreciate any basic suggestions how to
> go on with grass57.
> thank you. sabine
... you can then create a meteo stations map from the tables and link the
attributes to this map(s).
Have a look at:
v.in.db - Create new vector (points) from database table containing
It contains exactly this example (I am doing similar things).
Also nice is the R-stats software which allows for multitemporal
data analysis) and which can be directly connected to GRASS and
Also explained on that page are "lattice plots" in R which let you
visualize time series. You can use a time/date column in PostgreSQL
to order the data automatically.
Then it is convenient to create VIEWs in PostgreSQL to perform
filtering or to define subselection as well as on-the-fly calculations
(e.g monthly sums, averages). After creating such VIEWs you simply
cann the VIEW from R or GRASS and you will receive the data already
preprocessed from PostgreSQL.
Don't forget to define indices in PostgreSQL to speed up the
To write back data from GRASS to PostgreSQL use
v.to.db - Load values from vector to database.
(use db.execute to add a new column if needed)
What else: The GRASS/R interface is bi-directional and supports
raster and sites data (sites obviously less useful for 5.7). But
you can read data from PostgreSQL -> R, then analyse, write
back results R -> PostgreSQL, the v.in.db to make a map in GRASS.
It's a really neat environment.
Hope this helps
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy
More information about the grass-user