diff --git a/src/raster/r.timeseries.locations/r.timeseries.locations.py b/src/raster/r.timeseries.locations/r.timeseries.locations.py index e308f283..e4e48432 100644 --- a/src/raster/r.timeseries.locations/r.timeseries.locations.py +++ b/src/raster/r.timeseries.locations/r.timeseries.locations.py @@ -102,6 +102,13 @@ # % multiple: no # %end +# %option G_OPT_R_INPUT +# % key: align +# % description: Raster map to align pixels with +# % required: no +# % multiple: no +# %end + # %option # % key: domain_id # % type: integer @@ -332,10 +339,11 @@ def main(): gs.vector.vector_history(locations, replace=True) # Set computational region + gs.use_temp_region() Module( "g.region", vector=locations, - align=continuous_subdivision_map, + align=options["align"] or continuous_subdivision_map, flags="g", ) @@ -434,6 +442,9 @@ def main(): cursor.commit() conn.close() + # Remove the temporary region + gs.del_temp_region() + if __name__ == "__main__": options, flags = gs.parser()