Richard
Thank you very much, is exactly what I was looking for.
Cheers
2013/2/22 Richard Chirgwin rchirg...@ozemail.com.au
Marcello -
That's not so hard. In Grass-GIS 6.4 (the version I'm on ATM) the general
form would be:
for i in `echo select distinct id from rainfall_time_series | db.select
-c`; do
## get year / month / day to use in output map name
year=`echo select year from rainfall_time_series where id=$i | db.select
-c`;
month=`echo select month from rainfall_time_series where id=$i |
db.select -c`;
day=`echo select day from rainfall_time_series where id=$i | db.select
-c`;
outmap=map_$year_$month_**$day;
## then run your command
command input=rainfall_time_series output=$outmap;
done
That will step through each entry in the table.
If you're on a different version, check the db.select command format - I
think it changed in Grass-GIS 7.0?
Cheers,
Richard Chirgwin
On 22/02/13 10:21 PM,
grass-user-request@lists.**osgeo.orggrass-user-requ...@lists.osgeo.orgwrote:
Message: 3
Date: Thu, 21 Feb 2013 19:56:46 -0300
From: Marcello
Benignobenigno.marcello@**gmail.combenigno.marce...@gmail.com
To:grass-user@lists.osgeo.org
Subject: [GRASS-user] Interpolate a huge time-series with a looping
Message-ID:
CAKPVhYKNBGMsUE73JcXKcFB5uz-**Fe=vWUkr9WB0mHHD_C1pGuQ@mail.**
gmail.com vwukr9wb0mhhd_c1p...@mail.gmail.com
Content-Type: text/plain; charset=iso-8859-1
In my dataset I have access to a table in PostgreSQL Database with this
structure:
Table Name: rainfall_time_series
Columns: id | year | month | day | value_mm | x | y | gauge_code
Setting g.region to the Watershed limits, I need create for each day one
interpolated raster, representing the rainfall. This times-series is very
huge, has 17 years, my question is: is it possible to do this operation
with a looping? it is probably easier in R, but I'm newbie in this
software.
Thanks in advance,
--
Marcello Benigno B. de Barros Filho
Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
Mestre em Ci?ncias Geod?sicas e Tecnologias da Geoinforma??o - UFPE
Doutorando em Tecnologia Ambiental e Recursos H?dricos - UFPE
http://profmarcello.blogspot.**com http://profmarcello.blogspot.com
http://about.me/marcello.**benigno http://about.me/marcello.benigno
__**_
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/**mailman/listinfo/grass-userhttp://lists.osgeo.org/mailman/listinfo/grass-user
--
*Marcello Benigno B. de Barros Filho*
Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
Doutorando em Tecnologia Ambiental e Recursos Hídricos - UFPE
http://profmarcello.blogspot.com
http://about.me/marcello.benigno
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user