Opened 12 years ago
Closed 8 years ago
#1980 closed enhancement (wontfix)
Multiple time stamp support for raster and 3D raster maps
Reported by: | huhabla | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.5 |
Component: | LibGIS | Version: | svn-trunk |
Keywords: | timestamp, multiple, temporal, category, layer | Cc: | |
CPU: | All | Platform: | All |
Description
Hi, i would like to implement the support of multiple timestamps for single raster and 3D raster maps in libgis and the temporal framework. Multiple timestamps are already possible for vector maps. The layer identifier (number or string) of a vector map is also used to specify the layer/table specific timestamp. Hence several timestamp files are located in a vector directory using the naming scheme "timestamp_$layer".
The same can be implemented for raster and 3D raster maps. The timestamp files will be located in cell_misc/raster_map using the same naming scheme as vector maps. Backward compatibility will be assured. Hence the default timestamp file has no layer extension and the layer definition is optional.
In the future we can use the raster "layer" concept to point to different category definitions.
I would like to use the definition "layer" also for the raster maps. I hope this is not to much confusing for users? IMHO basically its the same concept as for vector maps, instead of a pointer to a different table, the layer for raster maps points to a different category definition?
For now implementing multiple timestamp support is sufficient for me. Multiple category support can be planned for GRASS8? However, the naming scheme should be usable for further improvements.
Any suggestions are welcome.
Change History (4)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
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:
# 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@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@PERMANENT sites_2001_2006 1 PERMANENT 2001-01-01 00:00:00 2002-01-01 00:00:00 sites_2001_2006:2@PERMANENT sites_2001_2006 2 PERMANENT 2002-01-01 00:00:00 2003-01-01 00:00:00 sites_2001_2006:3@PERMANENT sites_2001_2006 3 PERMANENT 2003-01-01 00:00:00 2004-01-01 00:00:00 sites_2001_2006:4@PERMANENT sites_2001_2006 4 PERMANENT 2004-01-01 00:00:00 2005-01-01 00:00:00 sites_2001_2006:5@PERMANENT sites_2001_2006 5 PERMANENT 2005-01-01 00:00:00 2006-01-01 00:00:00 sites_2001_2006:6@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
comment:3 by , 9 years ago
Milestone: | 7.0.0 → 7.0.5 |
---|
comment:4 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
No activity last 3 years, closing, feel free to reopen if needed.
would you like to have an arbitrary number of timestamps, or just 2, such as the "/" range setting in GRASS 6's r.timestamp allows?
Hamish