vector_metadata_table.sql 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. --#############################################################################
  2. -- This SQL script generates the vector table to store
  3. -- metadata for SQL queries and temporal GIS support.
  4. --
  5. -- Author: Soeren Gebbert soerengebbert <at> googlemail <dot> com
  6. --#############################################################################
  7. --PRAGMA foreign_keys = ON;
  8. -- The metadata table
  9. CREATE TABLE vector_metadata (
  10. 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
  11. is_3d BOOLEAN, -- This is 1 if the vector map is 3d and 0 otherwise
  12. points INTEGER, -- The number of points
  13. lines INTEGER, -- The number of lines
  14. boundaries INTEGER, -- The number of boundaries
  15. centroids INTEGER, -- The number of centroids
  16. faces INTEGER, -- The number of faces
  17. kernels INTEGER, -- The number of kernels
  18. primitives INTEGER, -- All primitives accumulated (points, lines,boundaries,centroids,faces,kernels)
  19. nodes INTEGER, -- Number of nodes (topological information)
  20. areas INTEGER, -- The number of areas (topological information)
  21. islands INTEGER, -- The number of islands (topological information)
  22. holes INTEGER, -- The number of holes (topological information)
  23. volumes INTEGER, -- The number of volumes (topological information)
  24. PRIMARY KEY (id)
  25. );