Browse Source

tgis (#285)

copy band reference from input to output when extracting raster maps
Markus Metz 5 years ago
parent
commit
086aeb8c94
1 changed files with 6 additions and 0 deletions
  1. 6 0
      lib/python/temporal/extract.py

+ 6 - 0
lib/python/temporal/extract.py

@@ -226,6 +226,12 @@ def extract_dataset(input, output, type, where, expression, base, time_suffix,
                     # Set the time stamp
                     # Set the time stamp
                     new_map.set_temporal_extent(old_map.get_temporal_extent())
                     new_map.set_temporal_extent(old_map.get_temporal_extent())
 
 
+                    if type == "raster":
+                        # Set the band reference
+                        band_reference = old_map.metadata.get_band_reference()
+                        if band_reference is not None:
+                            new_map.set_band_reference(band_reference)
+
                     # Insert map in temporal database
                     # Insert map in temporal database
                     new_map.insert(dbif)
                     new_map.insert(dbif)