Skip to content

Commit

Permalink
Merge branch 'main' of github.com:NVE/actinia_modules_nve
Browse files Browse the repository at this point in the history
  • Loading branch information
ninsbl committed Oct 1, 2024
2 parents 3314b6d + 560815c commit 049d9d9
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/temporal/t.rast.patch.group/t.rast.patch.group.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@
# % multiple: no
# %end

# %flag
# % key: g
# % description: Use r.buildvrt.gdal for patching (for GDAL-linked raster maps)
# %end

# %flag
# % key: z
# % description: Use zero (0) for transparency instead of NULL
Expand All @@ -88,7 +93,8 @@
# %end

# %rules
# % excludes: -v,-s,-z
# % excludes: -v,-s,-z,-g
# % excludes: -g,-s,-z,-v
# %end

import sys
Expand Down Expand Up @@ -119,7 +125,17 @@ def main():
add_time = flags["t"]
patch_s = flags["s"]
patch_z = flags["z"]
patch_module = "r.buildvrt" if flags["v"] else "r.patch"

if flags["g"] and not gs.find_program("r.buildvrt.gdal", "--help"):
gs.fatal(
_("Cannot find addon <r.buildvrt.gdal>. Please make sure it is installed.")
)
if flags["v"]:
patch_module = "r.buildvrt"
elif flags["g"]:
patch_module = "r.buildvrt.gdal"
else:
patch_module = "r.patch"

# Make sure the temporal database exists
dbif = tgis.init()
Expand Down

0 comments on commit 049d9d9

Please sign in to comment.