[GRASS-user] Learning to use vector layers

Daniel Victoria daniel.victoria at gmail.com
Mon Mar 26 09:11:38 EDT 2007


Hi all,

I have a vector problem and I think it might be a job for vector layers.
I have a postgresql table with daily meteorological station data (~10
years, 300 stations) and I'd like to get average monthly precipitation
for each station.
That I can easily do with a SQL query, generating a view and attaching
the view to a vector file where the CAT column is the station number.
The problem is, I can only attach one SQL view at a time since the
vector file has only one category (from what I read, it's one category
per layer connection correct?)

So, I though about some options:
1) either generate 1 vector file for each month - simple but then I
don't learn about layers
2) keep changing the database connection for each month - works but
seems kind of improvisation
3) Use layers, one layer for each month. I'd have the advantage of not
having categories for stations with no data for a specific month for
example and also, I'd learn about layers

So, the proper questions:
Does this sounds like a job for vector layers?
How do I add categories to a vector file but, the categories should
come from a column in a SQL view? From what I read, v.category can
only add sequential cats and I'd like the cats to be the station
number.

Cheers and sorry for the long email
Daniel




More information about the grass-user mailing list