From dfd5916ebca7229134ee076662e1a2ad8e6daa33 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Fri, 27 Sep 2024 16:45:24 +0000 Subject: [PATCH 1/4] removed e265 --- .../image2target/g.gui.image2target.py | 128 +++++++++--------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/gui/wxpython/image2target/g.gui.image2target.py b/gui/wxpython/image2target/g.gui.image2target.py index 97c67b20354..e0c97e70994 100755 --- a/gui/wxpython/image2target/g.gui.image2target.py +++ b/gui/wxpython/image2target/g.gui.image2target.py @@ -30,70 +30,70 @@ # % keyword: GCP # %end -##%option G_OPT_M_LOCATION -##% key: source_project -##% label: The name of the source project (has no projection) -##% description: The source project (location) has no CRS -###% section: source -##% required: yes -##%end - -##%option G_OPT_M_MAPSET -##% key: source_mapset -##% label: The name of the source mapset (has no projection) -##% description: The name of the source mapset (has no projection) -###% section: source -##% required: yes -##%end - -##%option G_OPT_I_GROUP -##% key: source_group -##% required: yes -##% section: source -##%end - -##%option G_OPT_R_INPUT -##% key: source_image -##% required: yes -###% section: source -##%end - -##%option G_OPT_R_INPUT -##% key: target_image -##% label: The name of the image that is already georeferenced used to find location of GCPs -##% description: The name of the image that is already georeferenced used to find the location of GCPs -###% section: target -##% required: no -##%end - -##%option -##% key: camera -##% type: string -##% label: The name of the camera (generated in i.ortho.camera) -##% description: The name of the camera (generated in i.ortho.camera) -##% required: yes -###% section: parameters -##%end - -##%option -##% key: order -##% type: string -##% label: The rectification order -##% description: The rectification order -##% required: yes -##% answer: 1 -###% section: parameters -##%end - -##%option -##% key: extension -##% type: string -##% label: The name of the output files extension -##% description: The name of the output files extension -##% required: yes -##% answer: _ii2t_out -##% section: target -##%end +# %option G_OPT_M_LOCATION +# % key: source_project +# % label: The name of the source project (has no projection) +# % description: The source project (location) has no CRS +# % section: source +# % required: yes +# %end + +# %option G_OPT_M_MAPSET +# % key: source_mapset +# % label: The name of the source mapset (has no projection) +# % description: The name of the source mapset (has no projection) +# % section: source +# % required: yes +# %end + +# %option G_OPT_I_GROUP +# % key: source_group +# % required: yes +# % section: source +# %end + +# %option G_OPT_R_INPUT +# % key: source_image +# % required: yes +# % section: source +# %end + +# %option G_OPT_R_INPUT +# % key: target_image +# % label: The name of the image that is already georeferenced used to find location of GCPs +# % description: The name of the image that is already georeferenced used to find the location of GCPs +# % section: target +# % required: no +# %end + +# %option +# % key: camera +# % type: string +# % label: The name of the camera (generated in i.ortho.camera) +# % description: The name of the camera (generated in i.ortho.camera) +# % required: yes +# % section: parameters +# %end + +# %option +# % key: order +# % type: string +# % label: The rectification order +# % description: The rectification order +# % required: yes +# % answer: 1 +# % section: parameters +# %end + +# %option +# % key: extension +# % type: string +# % label: The name of the output files extension +# % description: The name of the output files extension +# % required: yes +# % answer: _ii2t_out +# % section: target +# %end """ From 53e13039d7e54103e71a2d02f95dbcfd75d707f6 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Fri, 27 Sep 2024 16:45:50 +0000 Subject: [PATCH 2/4] update .flake8 --- .flake8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.flake8 b/.flake8 index 7bad3afc185..c3256ec22bf 100644 --- a/.flake8 +++ b/.flake8 @@ -32,8 +32,8 @@ per-file-ignores = gui/wxpython/gui_core/ghelp.py: E722 gui/wxpython/gui_core/gselect.py: E722 gui/wxpython/gui_core/widgets.py: E722 - gui/wxpython/image2target/*: F841, E722, E265 - gui/wxpython/image2target/g.gui.image2target.py: E501, E265, F841 + gui/wxpython/image2target/*: F841, E722 + gui/wxpython/image2target/g.gui.image2target.py: E501, F841 gui/wxpython/iscatt/*: F841, E722, F405, F403 gui/wxpython/lmgr/frame.py: F841, E722 # layertree still includes some formatting issues (it is ignored by Black) From 1fec7d4d32a751d78d7b9f95eef78029c01caf47 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Fri, 27 Sep 2024 19:33:03 +0000 Subject: [PATCH 3/4] removed commented out parser code --- .../image2target/g.gui.image2target.py | 46 ------------------- 1 file changed, 46 deletions(-) diff --git a/gui/wxpython/image2target/g.gui.image2target.py b/gui/wxpython/image2target/g.gui.image2target.py index e0c97e70994..d5ec851090a 100755 --- a/gui/wxpython/image2target/g.gui.image2target.py +++ b/gui/wxpython/image2target/g.gui.image2target.py @@ -129,54 +129,8 @@ def main(): else: os.environ["GRASS_RENDER_IMMEDIATE"] = "cairo" - # if options["source_location"]: - # src_loc = options["source_location"] - # else: - # gscript.fatal(_("No georeferenced source location provided")) - - # if options["source_mapset"]: - # src_mpt = options["source_mapset"] - # else: - # gscript.fatal(_("No georeferenced source mapset provided")) - - # if options["source_group"]: - # src_grp = options["source_group"] - # else: - # gscript.fatal(_("Please provide a source group name to process")) - - # if options['source_image']: - # src_ras = options["source_image"] - # else: - # gscript.fatal(_("Please provide a source image map name to process")) - - # if options["target_image"]: - # tgt_ras = options["target_image"] - # else: - # gscript.fatal(_("No georeferenced target map provided")) - - # if options["camera"]: - # camera = options["camera"] - # else: - # gscript.fatal(_( - # "Please provide a camera name (generated by i.ortho.camera)" - # )) - - # if options["order"]: - # order = options["order"] - # else: - # gscript.fatal(_("Please provive an order value")) - - # if options["extension"]: - # extension = options["extension"] - # else: - # gscript.fatal(_("Please provide an output file extension")) - app = wx.App() - # wizard = GCPWizard(parent=None, giface=StandaloneGrassInterface(), - # srcloc=src_loc,srcmpt=src_mpt,srcgrp=src_grp,srcras=src_ras, - # tgtras=tgt_ras,camera=camera, order=order, extension=extension) - wizard = GCPWizard(parent=None, giface=StandaloneGrassInterface()) app.MainLoop() From af244952f44af2cf69d7075e711bcaf21dd6bf81 Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Fri, 27 Sep 2024 19:36:05 +0000 Subject: [PATCH 4/4] removed parser code --- .../image2target/g.gui.image2target.py | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/gui/wxpython/image2target/g.gui.image2target.py b/gui/wxpython/image2target/g.gui.image2target.py index d5ec851090a..0d9f6accc12 100755 --- a/gui/wxpython/image2target/g.gui.image2target.py +++ b/gui/wxpython/image2target/g.gui.image2target.py @@ -30,71 +30,6 @@ # % keyword: GCP # %end -# %option G_OPT_M_LOCATION -# % key: source_project -# % label: The name of the source project (has no projection) -# % description: The source project (location) has no CRS -# % section: source -# % required: yes -# %end - -# %option G_OPT_M_MAPSET -# % key: source_mapset -# % label: The name of the source mapset (has no projection) -# % description: The name of the source mapset (has no projection) -# % section: source -# % required: yes -# %end - -# %option G_OPT_I_GROUP -# % key: source_group -# % required: yes -# % section: source -# %end - -# %option G_OPT_R_INPUT -# % key: source_image -# % required: yes -# % section: source -# %end - -# %option G_OPT_R_INPUT -# % key: target_image -# % label: The name of the image that is already georeferenced used to find location of GCPs -# % description: The name of the image that is already georeferenced used to find the location of GCPs -# % section: target -# % required: no -# %end - -# %option -# % key: camera -# % type: string -# % label: The name of the camera (generated in i.ortho.camera) -# % description: The name of the camera (generated in i.ortho.camera) -# % required: yes -# % section: parameters -# %end - -# %option -# % key: order -# % type: string -# % label: The rectification order -# % description: The rectification order -# % required: yes -# % answer: 1 -# % section: parameters -# %end - -# %option -# % key: extension -# % type: string -# % label: The name of the output files extension -# % description: The name of the output files extension -# % required: yes -# % answer: _ii2t_out -# % section: target -# %end - """ Module to run GCP management tool as stadalone application.