stvds_views.sql 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --#############################################################################
  2. -- This SQL script generates the space time vector dataset view.
  3. --
  4. -- Author: Soeren Gebbert soerengebbert <at> googlemail <dot> com
  5. --#############################################################################
  6. -- Create the views to access all columns for absolute or relative time
  7. CREATE VIEW stvds_view_abs_time AS SELECT
  8. A1.id, A1.name, A1.mapset, A1.temporal_type,
  9. A1.semantic_type,
  10. A1.creation_time,
  11. -- Uncommented due to performance issues
  12. -- A1.modification_time, A1.revision,
  13. A1.creator,
  14. A2.start_time, A2.end_time, A2.timezone,
  15. A2.granularity,
  16. A3.north, A3.south, A3.east, A3.west, A3.bottom, A3.top, A3.proj,
  17. A4.vector_register,
  18. A4.number_of_maps,
  19. A4.title, A4.description, A4.command, A4.points, A4.lines,
  20. A4.boundaries, A4.centroids, A4.faces, A4.kernels,
  21. A4.primitives, A4.nodes, A4.areas, A4.islands,
  22. A4.holes, A4.volumes
  23. FROM stvds_base A1, stvds_absolute_time A2,
  24. stvds_spatial_extent A3, stvds_metadata A4 WHERE A1.id = A2.id AND
  25. A1.id = A3.id AND A1.id = A4.id;
  26. CREATE VIEW stvds_view_rel_time AS SELECT
  27. A1.id, A1.name, A1.mapset, A1.temporal_type,
  28. A1.semantic_type,
  29. A1.creation_time,
  30. -- Uncommented due to performance issues
  31. -- A1.modification_time, A1.revision,
  32. A1.creator,
  33. A2.start_time, A2.end_time, A2.granularity,
  34. A3.north, A3.south, A3.east, A3.west, A3.bottom, A3.top, A3.proj,
  35. A4.vector_register,
  36. A4.number_of_maps,
  37. A4.title, A4.description, A4.command, A4.points, A4.lines,
  38. A4.boundaries, A4.centroids, A4.faces, A4.kernels,
  39. A4.primitives, A4.nodes, A4.areas, A4.islands,
  40. A4.holes, A4.volumes
  41. FROM stvds_base A1, stvds_relative_time A2,
  42. stvds_spatial_extent A3, stvds_metadata A4 WHERE A1.id = A2.id AND
  43. A1.id = A3.id AND A1.id = A4.id;