Time series: Difference between revisions
Jump to navigation
Jump to search
m (+cat) |
(+Time series in GRASS GIS 7) |
||
Line 64: | Line 64: | ||
* see the [[Movies]] wiki page | * see the [[Movies]] wiki page | ||
=== | === Time series in GRASS GIS 7 === | ||
* SQL database support for a raster map timeseries is discussed in the [[Time series development]] wiki page. | * A huge set of '''new modules''' is available: http://grass.osgeo.org/grass70/manuals/temporal.html | ||
* A '''presentation''' and '''support material''' is available in the attachment section of the lecture: http://www.geostat-course.org/Topic_Gebbert | |||
* Older brainstorming: SQL database support for a raster map timeseries is discussed in the [[Time series development]] wiki page. | |||
[[Category:FAQ]] | [[Category:FAQ]] | ||
[[Category:Image processing]] | [[Category:Image processing]] |
Revision as of 10:58, 3 March 2013
Setting and querying time stamps
Meta-data:
- r.timestamp - set and retrieve
- r.support - add further metadata
Raster map time series analysis
- r.series - module to analyse series of raster maps, considering the stack of input maps along the time axis
Common legends for many raster maps
The general idea is to:
- Calculate the overall min/max covering all maps with "r.info -r"
- Create a full-scale color table with "r.colors rules=" on the first map
- Copy that color table to other maps in the series with "r.colors rast="
- Draw legend to color table extent with "d.legend range=min,max"
Example using Pathfinder AVHRR SST data:
MAP_PATTERN='*.s0451pfv50-sst*degC.q4'
# find overall min/max
ALL_MIN=999999
ALL_MAX=-999999
for MAP in `g.mlist rast pattern=$MAP_PATTERN` ; do
eval `r.info -r $MAP`
ALL_MAX=`echo "$max $ALL_MAX" | awk '{if ($1 > $2) print $1; else print $2}'`
ALL_MIN=`echo "$min $ALL_MIN" | awk '{if ($1 < $2) print $1; else print $2}'`
done
echo "all_min=$ALL_MIN all_max=$ALL_MAX"
ONETHIRD=`echo $ALL_MIN $ALL_MAX | awk '{print ($2 - $1)/3.0 + $1}'`
TWOTHIRD=`echo $ALL_MIN $ALL_MAX | awk '{print 2*($2 - $1)/3.0 + $1}'`
# create full-scale color table for first map
FIRST_MAP=`g.mlist rast pattern=$MAP_PATTERN | head -n 1`
r.colors $FIRST_MAP color=rules << EOF
$ALL_MIN blue
$ONETHIRD cyan
$TWOTHIRD yellow
$ALL_MAX red
EOF
# apply color table to all other maps
for MAP in `g.mlist rast pattern=$MAP_PATTERN` ; do
r.colors $MAP rast=$FIRST_MAP
done
# draw
for MAP in `g.mlist rast pattern=$MAP_PATTERN` ; do
d.rast -o $MAP
d.legend $MAP range=$ALL_MIN,$ALL_MAX
done
- For ps.map use the colortable instruction's "range" parameter.
Animation
- see the Movies wiki page
Time series in GRASS GIS 7
- A huge set of new modules is available: http://grass.osgeo.org/grass70/manuals/temporal.html
- A presentation and support material is available in the attachment section of the lecture: http://www.geostat-course.org/Topic_Gebbert
- Older brainstorming: SQL database support for a raster map timeseries is discussed in the Time series development wiki page.