Browse Source

fix band references assignment (#132)

* fix register_maps_in_space_time_dataset() for vector type, skip band references assignment

* Wording

Co-Authored-By: Markus Neteler <neteler@gmail.com>

* add read_band_reference_from_grass()/set_band_reference() also to AbstractMapDataset, change register accordigly
Martin Landa 5 years ago
parent
commit
04da30d46c
2 changed files with 20 additions and 1 deletions
  1. 19 0
      lib/python/temporal/abstract_map_dataset.py
  2. 1 1
      lib/python/temporal/register.py

+ 19 - 0
lib/python/temporal/abstract_map_dataset.py

@@ -1054,6 +1054,25 @@ class AbstractMapDataset(AbstractDataset):
 
         return statement
 
+    def read_band_reference_from_grass(self):
+        """Read the band identifier of this map from the map metadata
+           in the GRASS file system based spatial database and
+           set the internal band identifier that should be insert/updated
+           in the temporal database.
+
+           Currently only implemented in RasterDataset. Otherwise
+           silently pass.
+        """
+        pass
+
+    def set_band_reference(self, band_reference):
+        """Set band reference identifier
+
+           Currently only implemented in RasterDataset. Otherwise
+           report a warning.
+        """
+        self.msgr.warning(_("Band references can only be assigned to raster maps"))
+
 ###############################################################################
 
 if __name__ == "__main__":

+ 1 - 1
lib/python/temporal/register.py

@@ -328,7 +328,7 @@ def register_maps_in_space_time_dataset(
                                      increment=increment, mult=count,
                                      interval=interval)
 
-        # Set the band reference
+        # Set the band reference (only raster type supported)
         if band_reference:
             # Band reference defined in input file
             # -> update raster metadata