|
@@ -89,7 +89,7 @@
|
|
|
|
|
|
#%flag
|
|
|
#% key: s
|
|
|
-#% description: Use start time - truncated accoring to granularity - as suffix. This flag overrides the offset option.
|
|
|
+#% description: Use start time - truncated according to granularity - as suffix (overrides offset option)
|
|
|
#%end
|
|
|
|
|
|
import grass.script as gcore
|
|
@@ -111,11 +111,11 @@ def main():
|
|
|
offset = options["offset"]
|
|
|
nprocs = options["nprocs"]
|
|
|
time_suffix = flags["s"]
|
|
|
-
|
|
|
+
|
|
|
topo_list = sampling.split(",")
|
|
|
|
|
|
tgis.init()
|
|
|
-
|
|
|
+
|
|
|
dbif = tgis.SQLDatabaseInterfaceConnection()
|
|
|
dbif.connect()
|
|
|
|
|
@@ -129,7 +129,7 @@ def main():
|
|
|
|
|
|
# We will create the strds later, but need to check here
|
|
|
tgis.check_new_stds(output, "strds", dbif, gcore.overwrite())
|
|
|
-
|
|
|
+
|
|
|
start_time = map_list[0].temporal_extent.get_start_time()
|
|
|
|
|
|
if sp.is_time_absolute():
|
|
@@ -164,13 +164,13 @@ def main():
|
|
|
end = start_time + int(gran)
|
|
|
granule.set_relative_time(start, end, sp.get_relative_time_unit())
|
|
|
start_time = end
|
|
|
-
|
|
|
+
|
|
|
granularity_list.append(granule)
|
|
|
|
|
|
- output_list = tgis.aggregate_by_topology(granularity_list=granularity_list, granularity=gran,
|
|
|
- map_list=map_list,
|
|
|
+ output_list = tgis.aggregate_by_topology(granularity_list=granularity_list, granularity=gran,
|
|
|
+ map_list=map_list,
|
|
|
topo_list=topo_list, basename=base, time_suffix=time_suffix,
|
|
|
- offset=offset, method=method, nprocs=nprocs, spatial=None,
|
|
|
+ offset=offset, method=method, nprocs=nprocs, spatial=None,
|
|
|
overwrite=gcore.overwrite())
|
|
|
|
|
|
if output_list:
|
|
@@ -178,12 +178,12 @@ def main():
|
|
|
output_strds = tgis.open_new_stds(output, "strds", temporal_type,
|
|
|
title, description, semantic_type,
|
|
|
dbif, gcore.overwrite())
|
|
|
- if register_null:
|
|
|
- register_null=False
|
|
|
- else:
|
|
|
+ if register_null:
|
|
|
+ register_null=False
|
|
|
+ else:
|
|
|
register_null=True
|
|
|
-
|
|
|
- tgis.register_map_object_list("rast", output_list, output_strds, register_null,
|
|
|
+
|
|
|
+ tgis.register_map_object_list("rast", output_list, output_strds, register_null,
|
|
|
sp.get_relative_time_unit(), dbif)
|
|
|
|
|
|
# Update the raster metadata table entries with aggregation type
|