Browse Source

Implemented handling of time-stamped vector layers


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@50466 15284696-431f-4ddb-bdfa-cd5b030d7da7
Soeren Gebbert 13 years ago
parent
commit
7cf868fd54

+ 2 - 1
lib/temporal/SQL/map_tables_template.sql

@@ -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@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

+ 2 - 2
lib/temporal/SQL/vector_metadata_table.sql

@@ -20,7 +20,7 @@ CREATE TABLE  vector_metadata (
 
 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_abs_time AS SELECT
 
 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,