From ece6032042ce1d0c681e4adb13cb6814dc52c183 Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Tue, 13 Aug 2024 16:05:29 +0200 Subject: [PATCH 1/2] python: use overwrite and not 'o' flag Fixes messages like ```bash WARNING: Please update the usage of : flag has been renamed to <--overwrite> ``` in modules and testsuite files. --- gui/wxpython/mapdisp/frame.py | 1 - .../r.external/testsuite/test_r_external.py | 6 ++--- raster/r.in.gdal/testsuite/test_r_in_gdal.py | 10 +++---- .../testsuite/test_r_in_pdal_binning.py | 26 +++++++++---------- .../testsuite/test_r_in_pdal_selection.py | 8 +++--- .../testsuite/test_r_slope_aspect.py | 10 +++++-- scripts/db.in.ogr/db.in.ogr.py | 2 +- scripts/r.in.wms/wms_base.py | 1 - .../v.db.reconnect.all/v.db.reconnect.all.py | 2 +- scripts/v.in.e00/v.in.e00.py | 2 +- scripts/v.in.wfs/v.in.wfs.py | 4 +-- scripts/v.unpack/v.unpack.py | 2 +- vector/v.fill.holes/tests/conftest.py | 2 +- 13 files changed, 40 insertions(+), 36 deletions(-) diff --git a/gui/wxpython/mapdisp/frame.py b/gui/wxpython/mapdisp/frame.py index 8cb8a51d407..627dec21385 100644 --- a/gui/wxpython/mapdisp/frame.py +++ b/gui/wxpython/mapdisp/frame.py @@ -823,7 +823,6 @@ def _DToRastDone(): # import back as red, green, blue rasters returncode, messages = RunCommand( "r.in.gdal", - flags="o", input=pngFile, output=tmpName, quiet=True, diff --git a/raster/r.external/testsuite/test_r_external.py b/raster/r.external/testsuite/test_r_external.py index a22498eb773..b6f1401aa1c 100644 --- a/raster/r.external/testsuite/test_r_external.py +++ b/raster/r.external/testsuite/test_r_external.py @@ -139,7 +139,7 @@ def test_netCDF_3d_1(self): "r.external", "Register netCDF Format", input="data/elevation3d.nc", - flags="o", + overwrite=True, output="test_external_map", ) @@ -177,7 +177,7 @@ def test_netCDF_3d_2(self): "r.external", "Register netCDF Format", input="data/elevation3d.nc", - flags="o", + overwrite=True, output="test_external_map", ) @@ -215,7 +215,7 @@ def test_netCDF_3d_3(self): "r.external", "Register netCDF Format", input="data/elevation3d.nc", - flags="o", + overwrite=True, band=2, output="test_external_map", ) diff --git a/raster/r.in.gdal/testsuite/test_r_in_gdal.py b/raster/r.in.gdal/testsuite/test_r_in_gdal.py index 2b8bee0982a..0462d268aac 100644 --- a/raster/r.in.gdal/testsuite/test_r_in_gdal.py +++ b/raster/r.in.gdal/testsuite/test_r_in_gdal.py @@ -140,7 +140,7 @@ def test_netCDF_3d_1(self): "Import netCDF Format", input="data/elevation3d.nc", num_digits="3", - flags="o", + overwrite=True, output="test_gdal_import_map", ) @@ -180,7 +180,7 @@ def test_netCDF_3d_2(self): input="data/elevation3d.nc", num_digits=0, offset=100, - flags="o", + overwrite=True, output="test_gdal_import_map", ) @@ -220,7 +220,7 @@ def test_netCDF_3d_3(self): input="data/elevation3d.nc", num_digits=5, offset=100, - flags="o", + overwrite=True, output="test_gdal_import_map", ) @@ -259,7 +259,7 @@ def test_netCDF_3d_4(self): "Import netCDF Format", input="data/elevation3d.nc", num_digits="3", - flags="o", + overwrite=True, band=2, output="test_gdal_import_map", ) @@ -290,7 +290,7 @@ def test_netCDF_3d_5(self): input="data/elevation3d.nc", num_digits=10, offset=100, - flags="o", + overwrite=True, map_names_file="map_names_file.txt", output="test_gdal_import_map", ) diff --git a/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py b/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py index a8a793f5bc7..f0dc073d8b5 100644 --- a/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py +++ b/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py @@ -81,7 +81,7 @@ def test_method_n(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="n", ) @@ -103,7 +103,7 @@ def test_method_min(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="min", ) @@ -125,7 +125,7 @@ def test_method_max(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="max", ) @@ -147,7 +147,7 @@ def test_method_range(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="range", ) @@ -169,7 +169,7 @@ def test_method_sum(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="sum", ) @@ -191,7 +191,7 @@ def test_method_mean(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="mean", ) @@ -213,7 +213,7 @@ def test_method_stddev(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="stddev", ) @@ -235,7 +235,7 @@ def test_method_variance(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="variance", ) @@ -257,7 +257,7 @@ def test_method_coeff_var(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="coeff_var", ) @@ -279,7 +279,7 @@ def test_method_median(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="median", ) @@ -301,7 +301,7 @@ def test_method_mode(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="mode", ) @@ -323,7 +323,7 @@ def test_method_sidnmax(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="sidnmax", ) @@ -345,7 +345,7 @@ def test_method_sidnmin(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - flags="o", + overwrite=True, quiet=True, method="sidnmin", ) diff --git a/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py b/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py index b7d5acd6b28..e0ec3c1e02f 100644 --- a/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py +++ b/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py @@ -84,7 +84,7 @@ def test_dimension(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - flags="o", + overwrite=True, quiet=True, method="mean", type="CELL", @@ -109,7 +109,7 @@ def test_user_dimension(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - flags="o", + overwrite=True, quiet=True, method="mode", type="CELL", @@ -134,7 +134,7 @@ def test_filter(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - flags="o", + overwrite=True, quiet=True, method="mode", type="CELL", @@ -168,7 +168,7 @@ def test_base_raster(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - flags="o", + overwrite=True, quiet=True, method="max", base_raster=self.base_raster, diff --git a/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py b/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py index 565b4e68593..2001b3e473f 100644 --- a/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py +++ b/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py @@ -173,7 +173,10 @@ def tearDownClass(cls): def test_slope(self): # TODO: using gdal instead of ascii because of cannot seek error self.runModule( - "r.in.gdal", flags="o", input="data/gdal_slope.grd", output=self.ref_slope + "r.in.gdal", + overwrite=True, + input="data/gdal_slope.grd", + output=self.ref_slope, ) self.assertModule("r.slope.aspect", elevation=self.elevation, slope=self.slope) self.assertModule( @@ -208,7 +211,10 @@ def test_slope(self): def test_aspect(self): # TODO: using gdal instead of ascii because of cannot seek error self.runModule( - "r.in.gdal", flags="o", input="data/gdal_aspect.grd", output=self.ref_aspect + "r.in.gdal", + overwrite=True, + input="data/gdal_aspect.grd", + output=self.ref_aspect, ) self.assertModule( "r.slope.aspect", elevation=self.elevation, aspect=self.aspect diff --git a/scripts/db.in.ogr/db.in.ogr.py b/scripts/db.in.ogr/db.in.ogr.py index a95919f4936..b0c2086b9e3 100755 --- a/scripts/db.in.ogr/db.in.ogr.py +++ b/scripts/db.in.ogr/db.in.ogr.py @@ -128,7 +128,7 @@ def main(): try: gs.run_command( "v.in.ogr", - flags="o", + overwrite=True, input=input, gdal_config=gdal_config, gdal_doo=gdal_doo, diff --git a/scripts/r.in.wms/wms_base.py b/scripts/r.in.wms/wms_base.py index a14e15dc786..204f95cc704 100644 --- a/scripts/r.in.wms/wms_base.py +++ b/scripts/r.in.wms/wms_base.py @@ -595,7 +595,6 @@ def ImportMapIntoGRASS(self, raster): # do not use -o flag ! gs.run_command( "r.in.gdal", - flags="o", quiet=True, overwrite=True, input=raster, diff --git a/scripts/v.db.reconnect.all/v.db.reconnect.all.py b/scripts/v.db.reconnect.all/v.db.reconnect.all.py index 03a98f7bf0e..b42b8006673 100755 --- a/scripts/v.db.reconnect.all/v.db.reconnect.all.py +++ b/scripts/v.db.reconnect.all/v.db.reconnect.all.py @@ -298,7 +298,7 @@ def main(): try: gs.run_command( "v.db.connect", - flags="o", + overwrite=True, quiet=True, map=vect, layer=layer, diff --git a/scripts/v.in.e00/v.in.e00.py b/scripts/v.in.e00/v.in.e00.py index 4d63636199f..c265458f91c 100755 --- a/scripts/v.in.e00/v.in.e00.py +++ b/scripts/v.in.e00/v.in.e00.py @@ -147,7 +147,7 @@ def main(): try: gcore.run_command( "v.in.ogr", - flags="o", + overwrite=True, input=e00shortname, layer=layer[type], type=itype[type], diff --git a/scripts/v.in.wfs/v.in.wfs.py b/scripts/v.in.wfs/v.in.wfs.py index 9f53840edcf..5a99da288b8 100755 --- a/scripts/v.in.wfs/v.in.wfs.py +++ b/scripts/v.in.wfs/v.in.wfs.py @@ -220,13 +220,13 @@ def main(): if options["layer"]: grass.run_command( "v.in.ogr", - flags="o", + overwrite=True, input=tmpxml, output=out, layer=options["layer"], ) else: - grass.run_command("v.in.ogr", flags="o", input=tmpxml, output=out) + grass.run_command("v.in.ogr", overwrite=True, input=tmpxml, output=out) grass.message(_("Vector map <%s> imported from WFS.") % out) except Exception: grass.message(_("WFS import failed")) diff --git a/scripts/v.unpack/v.unpack.py b/scripts/v.unpack/v.unpack.py index bd350676444..af430f98829 100644 --- a/scripts/v.unpack/v.unpack.py +++ b/scripts/v.unpack/v.unpack.py @@ -280,7 +280,7 @@ def main(): try: grass.run_command( "v.db.connect", - flags="o", + overwrite=True, quiet=True, driver=dbconn["driver"], database=todb, diff --git a/vector/v.fill.holes/tests/conftest.py b/vector/v.fill.holes/tests/conftest.py index f2413728e71..885699c0a4b 100644 --- a/vector/v.fill.holes/tests/conftest.py +++ b/vector/v.fill.holes/tests/conftest.py @@ -216,7 +216,7 @@ def import_data(path, areas_name, areas_with_space_in_between, env): "v.db.connect", map=areas_with_space_in_between, table=areas_with_space_in_between, - flags="o", + overwrite=True, env=env, ) From 86216e51c71648717fb65b6ecea4c48221834abc Mon Sep 17 00:00:00 2001 From: Markus Neteler Date: Tue, 13 Aug 2024 18:09:53 +0200 Subject: [PATCH 2/2] restore 'flags=o' for r.external, r.in.gdal, v.in.ogr, r.in.pdal --- gui/wxpython/mapdisp/frame.py | 1 + .../r.external/testsuite/test_r_external.py | 6 ++--- raster/r.in.gdal/testsuite/test_r_in_gdal.py | 2 +- .../testsuite/test_r_in_pdal_binning.py | 26 +++++++++---------- .../testsuite/test_r_in_pdal_selection.py | 8 +++--- .../testsuite/test_r_slope_aspect.py | 10 ++----- raster/r.support/r.support.html | 13 ++++++---- scripts/db.in.ogr/db.in.ogr.py | 2 +- scripts/i.band.library/i.band.library.html | 10 +++---- scripts/r.in.wms/wms_base.py | 1 + .../r.semantic.label/r.semantic.label.html | 8 +++--- scripts/v.in.e00/v.in.e00.py | 2 +- scripts/v.in.wfs/v.in.wfs.py | 4 +-- 13 files changed, 46 insertions(+), 47 deletions(-) diff --git a/gui/wxpython/mapdisp/frame.py b/gui/wxpython/mapdisp/frame.py index 627dec21385..8cb8a51d407 100644 --- a/gui/wxpython/mapdisp/frame.py +++ b/gui/wxpython/mapdisp/frame.py @@ -823,6 +823,7 @@ def _DToRastDone(): # import back as red, green, blue rasters returncode, messages = RunCommand( "r.in.gdal", + flags="o", input=pngFile, output=tmpName, quiet=True, diff --git a/raster/r.external/testsuite/test_r_external.py b/raster/r.external/testsuite/test_r_external.py index b6f1401aa1c..a22498eb773 100644 --- a/raster/r.external/testsuite/test_r_external.py +++ b/raster/r.external/testsuite/test_r_external.py @@ -139,7 +139,7 @@ def test_netCDF_3d_1(self): "r.external", "Register netCDF Format", input="data/elevation3d.nc", - overwrite=True, + flags="o", output="test_external_map", ) @@ -177,7 +177,7 @@ def test_netCDF_3d_2(self): "r.external", "Register netCDF Format", input="data/elevation3d.nc", - overwrite=True, + flags="o", output="test_external_map", ) @@ -215,7 +215,7 @@ def test_netCDF_3d_3(self): "r.external", "Register netCDF Format", input="data/elevation3d.nc", - overwrite=True, + flags="o", band=2, output="test_external_map", ) diff --git a/raster/r.in.gdal/testsuite/test_r_in_gdal.py b/raster/r.in.gdal/testsuite/test_r_in_gdal.py index 0462d268aac..2b0e33b76b7 100644 --- a/raster/r.in.gdal/testsuite/test_r_in_gdal.py +++ b/raster/r.in.gdal/testsuite/test_r_in_gdal.py @@ -140,7 +140,7 @@ def test_netCDF_3d_1(self): "Import netCDF Format", input="data/elevation3d.nc", num_digits="3", - overwrite=True, + flags="o", output="test_gdal_import_map", ) diff --git a/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py b/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py index f0dc073d8b5..a8a793f5bc7 100644 --- a/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py +++ b/raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py @@ -81,7 +81,7 @@ def test_method_n(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="n", ) @@ -103,7 +103,7 @@ def test_method_min(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="min", ) @@ -125,7 +125,7 @@ def test_method_max(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="max", ) @@ -147,7 +147,7 @@ def test_method_range(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="range", ) @@ -169,7 +169,7 @@ def test_method_sum(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="sum", ) @@ -191,7 +191,7 @@ def test_method_mean(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="mean", ) @@ -213,7 +213,7 @@ def test_method_stddev(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="stddev", ) @@ -235,7 +235,7 @@ def test_method_variance(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="variance", ) @@ -257,7 +257,7 @@ def test_method_coeff_var(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="coeff_var", ) @@ -279,7 +279,7 @@ def test_method_median(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="median", ) @@ -301,7 +301,7 @@ def test_method_mode(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="mode", ) @@ -323,7 +323,7 @@ def test_method_sidnmax(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="sidnmax", ) @@ -345,7 +345,7 @@ def test_method_sidnmin(self): "r.in.pdal", input=self.las_file, output=self.bin_raster, - overwrite=True, + flags="o", quiet=True, method="sidnmin", ) diff --git a/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py b/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py index e0ec3c1e02f..b7d5acd6b28 100644 --- a/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py +++ b/raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py @@ -84,7 +84,7 @@ def test_dimension(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - overwrite=True, + flags="o", quiet=True, method="mean", type="CELL", @@ -109,7 +109,7 @@ def test_user_dimension(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - overwrite=True, + flags="o", quiet=True, method="mode", type="CELL", @@ -134,7 +134,7 @@ def test_filter(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - overwrite=True, + flags="o", quiet=True, method="mode", type="CELL", @@ -168,7 +168,7 @@ def test_base_raster(self): "r.in.pdal", input=self.las_file, output=self.imp_raster, - overwrite=True, + flags="o", quiet=True, method="max", base_raster=self.base_raster, diff --git a/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py b/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py index 2001b3e473f..565b4e68593 100644 --- a/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py +++ b/raster/r.slope.aspect/testsuite/test_r_slope_aspect.py @@ -173,10 +173,7 @@ def tearDownClass(cls): def test_slope(self): # TODO: using gdal instead of ascii because of cannot seek error self.runModule( - "r.in.gdal", - overwrite=True, - input="data/gdal_slope.grd", - output=self.ref_slope, + "r.in.gdal", flags="o", input="data/gdal_slope.grd", output=self.ref_slope ) self.assertModule("r.slope.aspect", elevation=self.elevation, slope=self.slope) self.assertModule( @@ -211,10 +208,7 @@ def test_slope(self): def test_aspect(self): # TODO: using gdal instead of ascii because of cannot seek error self.runModule( - "r.in.gdal", - overwrite=True, - input="data/gdal_aspect.grd", - output=self.ref_aspect, + "r.in.gdal", flags="o", input="data/gdal_aspect.grd", output=self.ref_aspect ) self.assertModule( "r.slope.aspect", elevation=self.elevation, aspect=self.aspect diff --git a/raster/r.support/r.support.html b/raster/r.support/r.support.html index 111e46f653d..13fdf2a26af 100644 --- a/raster/r.support/r.support.html +++ b/raster/r.support/r.support.html @@ -5,12 +5,13 @@

DESCRIPTION

history, semantic label elements and title is supported. Category labels can also be copied from another raster map. -

Raster band management

+

Raster semantic labels and band management

+ Raster semantic label concept is similar to dimension name in other GIS and -remote sensing applications. Most common usage will be assigning a -remote sensing platform sensor band ID to the raster, although any -identifier is supported. Raster semantic label is suggested to work with -imagery classification tools.
+remote sensing applications. Most common usage will be assigning a remote +sensing platform sensor band identifier to the raster map metadata, although +any identifier is supported (see i.band.library). +Raster semantic label is suggested to work with imagery classification tools.

EXAMPLES

@@ -57,12 +58,14 @@

NOTES

SEE ALSO

+i.band.library, r.category, r.describe, r.info, r.null, r.region, r.report, +r.semantic.label, r.timestamp diff --git a/scripts/db.in.ogr/db.in.ogr.py b/scripts/db.in.ogr/db.in.ogr.py index b0c2086b9e3..a95919f4936 100755 --- a/scripts/db.in.ogr/db.in.ogr.py +++ b/scripts/db.in.ogr/db.in.ogr.py @@ -128,7 +128,7 @@ def main(): try: gs.run_command( "v.in.ogr", - overwrite=True, + flags="o", input=input, gdal_config=gdal_config, gdal_doo=gdal_doo, diff --git a/scripts/i.band.library/i.band.library.html b/scripts/i.band.library/i.band.library.html index b5d98d2607b..196f1319e3a 100644 --- a/scripts/i.band.library/i.band.library.html +++ b/scripts/i.band.library/i.band.library.html @@ -95,11 +95,11 @@

Band reference and semantic label relation

NOTES

-Semantic label concept is supported by temporal GRASS modules, -see t.register, -t.rast.list, -t.info -and t.rast.mapcalc +Semantic label concept is supported by temporal GRASS modules, see +t.register, +t.rast.list, +t.info +and t.rast.mapcalc modules for examples.

Image collections

diff --git a/scripts/r.in.wms/wms_base.py b/scripts/r.in.wms/wms_base.py index 204f95cc704..a14e15dc786 100644 --- a/scripts/r.in.wms/wms_base.py +++ b/scripts/r.in.wms/wms_base.py @@ -595,6 +595,7 @@ def ImportMapIntoGRASS(self, raster): # do not use -o flag ! gs.run_command( "r.in.gdal", + flags="o", quiet=True, overwrite=True, input=raster, diff --git a/scripts/r.semantic.label/r.semantic.label.html b/scripts/r.semantic.label/r.semantic.label.html index 9ebcfce10a6..45ac7b9373e 100644 --- a/scripts/r.semantic.label/r.semantic.label.html +++ b/scripts/r.semantic.label/r.semantic.label.html @@ -25,10 +25,10 @@

NOTES

Semantic labels are supported by temporal GRASS modules. Name of STRDS can be extended by band identifier in order to filter the result by a semantic label. See -t.register, -t.rast.list, -t.info -and t.rast.mapcalc +t.register, +t.rast.list, +t.info +and t.rast.mapcalc modules for examples.

EXAMPLES

diff --git a/scripts/v.in.e00/v.in.e00.py b/scripts/v.in.e00/v.in.e00.py index c265458f91c..4d63636199f 100755 --- a/scripts/v.in.e00/v.in.e00.py +++ b/scripts/v.in.e00/v.in.e00.py @@ -147,7 +147,7 @@ def main(): try: gcore.run_command( "v.in.ogr", - overwrite=True, + flags="o", input=e00shortname, layer=layer[type], type=itype[type], diff --git a/scripts/v.in.wfs/v.in.wfs.py b/scripts/v.in.wfs/v.in.wfs.py index 5a99da288b8..9f53840edcf 100755 --- a/scripts/v.in.wfs/v.in.wfs.py +++ b/scripts/v.in.wfs/v.in.wfs.py @@ -220,13 +220,13 @@ def main(): if options["layer"]: grass.run_command( "v.in.ogr", - overwrite=True, + flags="o", input=tmpxml, output=out, layer=options["layer"], ) else: - grass.run_command("v.in.ogr", overwrite=True, input=tmpxml, output=out) + grass.run_command("v.in.ogr", flags="o", input=tmpxml, output=out) grass.message(_("Vector map <%s> imported from WFS.") % out) except Exception: grass.message(_("WFS import failed"))