Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions src/general/g.projpicker/g.projpicker.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# wrapper around ProjPicker
# <https://pypi.org/project/projpicker/>.
#
# COPYRIGHT: (C) 2021 by Huidae Cho and the GRASS Development Team
# COPYRIGHT: (C) 2021-2023 by Huidae Cho and the GRASS Development Team
#
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
Expand Down Expand Up @@ -94,19 +94,16 @@

import sys
import re

import grass.script as grass
import grass.projpicker as ppik


def message(msg="", end=None):
print(msg, end=end, file=sys.stderr, flush=True)


def main():
try:
import projpicker as ppik
except ImportError:
grass.fatal(_("ProjPicker not installed. Use 'pip install projpicker'"))

coords = options["coordinates"]
operator = options["operator"]
query = options["query"]
Expand All @@ -132,8 +129,8 @@ def main():
if bbox_map and grass.parse_command("g.proj", flags="g")["unit"] != "degree":
grass.fatal(_("Cannot create vector in degree in a non-degree mapset"))

# ppik.projpicker() appends input file contents to geometries from
# arguments, but it can be confusing and is not supported in this module
# ppik.start() appends input file contents to geometries from arguments,
# but it can be confusing and is not supported in this module
if coords:
query = f"{operator}"
coords = coords.split(",")
Expand All @@ -152,7 +149,7 @@ def main():
else:
separator = grass.utils.separator(separator)

bbox = ppik.projpicker(
bbox = ppik.start(
geoms=geoms,
outfile=outfile,
fmt=fmt,
Expand Down
Binary file modified src/general/g.projpicker/g_projpicker_gui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.