[GRASS-dev] [GRASS GIS] #1980: Multiple time stamp support for raster and 3D raster maps

GRASS GIS trac at osgeo.org
Wed May 29 04:51:40 PDT 2013


#1980: Multiple time stamp support for raster and 3D raster maps
------------------------------------------------------------+---------------
 Reporter:  huhabla                                         |       Owner:  grass-dev@…              
     Type:  enhancement                                     |      Status:  new                      
 Priority:  normal                                          |   Milestone:  7.0.0                    
Component:  LibGIS                                          |     Version:  svn-trunk                
 Keywords:  timestamp, multiple, temporal, category, layer  |    Platform:  All                      
      Cpu:  All                                             |  
------------------------------------------------------------+---------------

Comment(by huhabla):

 The idea is to have multiple timestampsthat might be time instances
 (datetime) or time intervals (datetime/datetime) for raster and 3D raster
 maps.

 This is an example from the temporal framework how this works with vector
 layer support:

 {{{
 #!sh
 # First we create random vector map
 v.random output=sites n=100 zmin=0 zmax=100 column=waterlevel

 # Adding new layer with categories
 v.category input=sites out=sites_2001_2006 option=transfer
 layer=1,2,3,4,5,6

 # Lets copy the first table to layer specific tables
 db.copy from_table=sites to_table=sites_2002
 db.copy from_table=sites to_table=sites_2003
 db.copy from_table=sites to_table=sites_2004
 db.copy from_table=sites to_table=sites_2005
 db.copy from_table=sites to_table=sites_2006

 # Then we add the tables to the layer
 v.db.addtable map=sites table=sites_2002 layer=2
 v.db.addtable map=sites table=sites_2003 layer=3
 v.db.addtable map=sites table=sites_2004 layer=4
 v.db.addtable map=sites table=sites_2005 layer=5
 v.db.addtable map=sites table=sites_2006 layer=6

 # We create a file to store the vector:layer ids for
 # temporal GIS registration. For each layer of the vector map
 # a different timestamp is defined. In this case we define time intervals
 # with one year granularity
 cat > timestamps.txt << EOF
 sites_2001_2006:1|2001-01-01|2002-01-01
 sites_2001_2006:2|2002-01-01|2003-01-01
 sites_2001_2006:3|2003-01-01|2004-01-01
 sites_2001_2006:4|2004-01-01|2005-01-01
 sites_2001_2006:5|2005-01-01|2006-01-01
 sites_2001_2006:6|2006-01-01|2007-01-01
 EOF

 # We create a new space time vector dataset
 t.create type=stvds temporaltype=absolute output=mysites title="A test"
 descr="A test"

 # Lets register the vector maps
 t.register -i type=vect input=mysites file=timestamps.txt

 # Some info about the new dataset
 t.info type=stvds input=mysites

  +-------------------- Space Time Vector Dataset
 -----------------------------+
  |
 |
  +-------------------- Basic information
 -------------------------------------+
  | Id: ........................ mysites at PERMANENT
  | Name: ...................... mysites
  | Mapset: .................... PERMANENT
  | Creator: ................... soeren
  | Creation time: ............. 2013-05-29 13:34:26.924717
  | Temporal type: ............. absolute
  | Semantic type:.............. mean
  +-------------------- Absolute time
 -----------------------------------------+
  | Start time:................. 2001-01-01 00:00:00
  | End time:................... 2007-01-01 00:00:00
  | Granularity:................ 1 year
  | Temporal type of maps:...... interval
  +-------------------- Spatial extent
 ----------------------------------------+
  | North:...................... 79.694475
  | South:...................... 1.27134
  | East:.. .................... 119.978137
  | West:....................... 0.90041
  | Top:........................ 0.0
  | Bottom:..................... 0.0
  +-------------------- Metadata information
 ----------------------------------+
  | Vector register table:...... mysites_PERMANENT_vector_register
  | Number of points ........... 600
  | Number of lines ............ 0
  | Number of boundaries ....... 0
  | Number of centroids ........ 0
  | Number of faces ............ 0
  | Number of kernels .......... 0
  | Number of primitives ....... 600
  | Number of nodes ............ 0
  | Number of areas ............ 0
  | Number of islands .......... 0
  | Number of holes ............ 0
  | Number of volumes .......... 0
  | Number of registered maps:.. 6
  |
  | Title:
  | A test
  | Description:
  | A test
  | Command history:
  | - 2013-05-29 13:34:26 -
  | t.create type="stvds" temporaltype="absolute"
  |     output="mysites" title="A test" descr="A test"
  | - 2013-05-29 13:36:34 -
  | t.register -i type="vect" input="mysites"
  |     file="timestamps.txt"
  |
 +----------------------------------------------------------------------------+

 # List all sites in the stvds mysites
 t.vect.list -h input=mysites

 id      name    layer   mapset  start_time      end_time
 sites_2001_2006:1 at PERMANENT     sites_2001_2006 1       PERMANENT
 2001-01-01 00:00:00     2002-01-01 00:00:00
 sites_2001_2006:2 at PERMANENT     sites_2001_2006 2       PERMANENT
 2002-01-01 00:00:00     2003-01-01 00:00:00
 sites_2001_2006:3 at PERMANENT     sites_2001_2006 3       PERMANENT
 2003-01-01 00:00:00     2004-01-01 00:00:00
 sites_2001_2006:4 at PERMANENT     sites_2001_2006 4       PERMANENT
 2004-01-01 00:00:00     2005-01-01 00:00:00
 sites_2001_2006:5 at PERMANENT     sites_2001_2006 5       PERMANENT
 2005-01-01 00:00:00     2006-01-01 00:00:00
 sites_2001_2006:6 at PERMANENT     sites_2001_2006 6       PERMANENT
 2006-01-01 00:00:00     2007-01-01 00:00:00

 t.vect.list -h input=mysites columns=name,layer,start_time
 where="start_time >= '2003-01-01'"

 name    layer   start_time
 sites_2001_2006 3       2003-01-01 00:00:00
 sites_2001_2006 4       2004-01-01 00:00:00
 sites_2001_2006 5       2005-01-01 00:00:00
 sites_2001_2006 6       2006-01-01 00:00:00

 }}}

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/1980#comment:2>
GRASS GIS <http://grass.osgeo.org>



More information about the grass-dev mailing list