~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to lib/temporal/SQL/stds_tables_template.sql

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--#############################################################################
 
2
-- This SQL script generates the space time dataset tables to store time 
 
3
-- stamps and revision for SQL queries and temporal GIS support.
 
4
--
 
5
-- Author: Soeren Gebbert soerengebbert <at> googlemail <dot> com
 
6
--#############################################################################
 
7
 
 
8
-- STDS is a placeholder for specific space-time dataset type: strds, str3ds, stvds
 
9
 
 
10
CREATE TABLE  STDS_base (
 
11
  id VARCHAR NOT NULL,                 -- Id of the space-time dataset, name@mapset this is the primary key
 
12
  name VARCHAR NOT NULL,               -- name of the space-time dataset
 
13
  mapset VARCHAR NOT NULL,             -- mapset of the space-time dataset
 
14
  creator VARCHAR NOT NULL,            -- Name of the creator
 
15
  temporal_type VARCHAR NOT NULL,      -- The temporal type of the dataset "absolute" or "relative" 
 
16
  semantic_type VARCHAR NOT NULL,      -- The semantic data description used for aggregation/decomposition algorithm selection: min, max, mean or sum
 
17
  creation_time TIMESTAMP NOT NULL,    -- The time of creation of the space-time dataset
 
18
  modification_time TIMESTAMP NOT NULL,-- The time of the last modification of the space time dataset
 
19
  PRIMARY KEY (id)
 
20
);
 
21
 
 
22
CREATE TABLE  STDS_relative_time (
 
23
  id VARCHAR NOT NULL,            -- Id of the space-time dataset, this is the primary key
 
24
  start_time INTEGER,             -- The relative valid start time 
 
25
  end_time INTEGER,               -- The relative valid end time 
 
26
  granularity INTEGER,            -- The granularity 
 
27
  unit VARCHAR,                   -- The relative time unit, available are "years, months, days, minutes, seconds"
 
28
  map_time VARCHAR,               -- The temporal type of the registered maps, may be interval, point or mixed
 
29
  PRIMARY KEY (id)
 
30
);
 
31
 
 
32
CREATE TABLE  STDS_absolute_time (
 
33
  id VARCHAR NOT NULL,            -- Id of the space-time dataset, this is the primary key
 
34
  start_time TIMESTAMP,           -- Start of the valid time, can be NULL if no map is registered
 
35
  end_time TIMESTAMP,             -- End of the valid time, can be NULL if no map is registered
 
36
  granularity VARCHAR,            -- The granularity "NNN seconds, NNN minutes, NNN hours, NNN days, NNN months, NNN years"
 
37
  map_time VARCHAR,               -- The temporal type of the registered maps, may be interval, point or mixed
 
38
  PRIMARY KEY (id)
 
39
);
 
40
 
 
41
CREATE TABLE  STDS_spatial_extent (
 
42
  id VARCHAR NOT NULL,      -- Id of the space-time dataset, this is the primary key
 
43
  north DOUBLE PRECISION,   -- The spatial north extent, derived from the registered maps
 
44
  south DOUBLE PRECISION,   -- The spatial south extent, derived from the registered maps
 
45
  east DOUBLE PRECISION,    -- The spatial east extent, derived from the registered maps
 
46
  west DOUBLE PRECISION,    -- The spatial west extent, derived from the registered maps
 
47
  top DOUBLE PRECISION,     -- The spatial top extent, derived from the registered maps
 
48
  bottom DOUBLE PRECISION,  -- The spatial bottom extent, derived from the registered maps
 
49
  proj VARCHAR,      -- The projection of the space time dataset (XY of LL)
 
50
  PRIMARY KEY (id)
 
51
);
 
52
 
 
53
 
 
54