[GRASS-SVN] r50466 - grass/trunk/lib/temporal/SQL

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jan 26 07:22:41 EST 2012


Author: huhabla
Date: 2012-01-26 04:22:41 -0800 (Thu, 26 Jan 2012)
New Revision: 50466

Modified:
   grass/trunk/lib/temporal/SQL/map_tables_template.sql
   grass/trunk/lib/temporal/SQL/vector_metadata_table.sql
Log:
Implemented handling of time-stamped vector layers



Modified: grass/trunk/lib/temporal/SQL/map_tables_template.sql
===================================================================
--- grass/trunk/lib/temporal/SQL/map_tables_template.sql	2012-01-26 12:22:21 UTC (rev 50465)
+++ grass/trunk/lib/temporal/SQL/map_tables_template.sql	2012-01-26 12:22:41 UTC (rev 50466)
@@ -15,9 +15,10 @@
 --PRAGMA foreign_keys = ON;
 
 CREATE TABLE  GRASS_MAP_base (
-  id VARCHAR NOT NULL,                  -- The id (PK) is the unique identifier for all tables, it is based on name and mapset (name at mapset) and is used as primary key
+  id VARCHAR NOT NULL,                  -- The id (PK) is the unique identifier for all tables, it is based on name (layer) and mapset (name(:layer)@mapset) and is used as primary key
   name VARCHAR NOT NULL,                -- name of the grass map
   mapset VARCHAR NOT NULL,              -- mapset of the grass map
+  layer VARCHAR,                        -- The layer id of the map, this is currently only in use by vector maps
   creator VARCHAR NOT NULL,
   temporal_type VARCHAR,                -- The temporal type of the grass map "absolute" or "relative" or NULL in case no time stamp is available
   creation_time TIMESTAMP NOT NULL,      -- The time of creation of the grass map

Modified: grass/trunk/lib/temporal/SQL/vector_metadata_table.sql
===================================================================
--- grass/trunk/lib/temporal/SQL/vector_metadata_table.sql	2012-01-26 12:22:21 UTC (rev 50465)
+++ grass/trunk/lib/temporal/SQL/vector_metadata_table.sql	2012-01-26 12:22:41 UTC (rev 50466)
@@ -20,7 +20,7 @@
 
 CREATE VIEW vector_view_abs_time AS SELECT 
             A1.id, A1.mapset,
-            A1.name, A1.temporal_type,
+            A1.name, A1.layer, A1.temporal_type,
             A1.creation_time, 
 -- Uncommented due to performance issues
 --            A1.modification_time, A1.revision, 
@@ -34,7 +34,7 @@
 
 CREATE VIEW vector_view_rel_time AS SELECT 
             A1.id, A1.mapset,
-            A1.name, A1.temporal_type,
+            A1.name, A1.layer, A1.temporal_type,
             A1.creation_time, 
 -- Uncommented due to performance issues
 --            A1.modification_time, A1.revision, 



More information about the grass-commit mailing list