Skip to content

Commit

Permalink
add align option
Browse files Browse the repository at this point in the history
  • Loading branch information
ninsbl committed Oct 18, 2024
1 parent d8b4e3a commit b5ce482
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/raster/r.timeseries.locations/r.timeseries.locations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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",
)

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit b5ce482

Please sign in to comment.