Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TGIS DB v3 backward compatible with v2 (#1454)
Co-authored-by: Markus Neteler <neteler@gmail.com>
- Loading branch information
Showing
5 changed files
with
81 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--############################################################################# | ||
-- This SQL is to update a space-time raster dataset metadata (version 3+) | ||
-- | ||
-- Author: Soeren Gebbert soerengebbert <at> googlemail <dot> com | ||
--############################################################################# | ||
|
||
-- SPACETIME_REGISTER_TABLE is a placeholder for specific stds map register table name (SQL compliant) | ||
-- SPACETIME_ID is a placeholder for specific stds id: name@mapset | ||
|
||
-- Update the number of registered bands | ||
UPDATE strds_metadata SET number_of_bands = | ||
(SELECT count(distinct semantic_label) FROM raster_metadata WHERE | ||
raster_metadata.id IN | ||
(SELECT id FROM SPACETIME_REGISTER_TABLE) | ||
) WHERE id = 'SPACETIME_ID'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters