浏览代码

tgis (#285)

copy band reference from input to output when extracting raster maps
Markus Metz 5 年之前
父节点
当前提交
086aeb8c94
共有 1 个文件被更改,包括 6 次插入0 次删除
  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
                     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
                     new_map.insert(dbif)