Skip to content

i.in.spotvgt: bug fixes #6179

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jayneel-shah18
Copy link
Contributor

This PR addresses the four issues in the i.in.spotvgt module that previously led to incorrect imports or completely null raster outputs as highlighted in #6175.

Summary of Changes:

  • Line if f < 2: caused type error due to comparison of list directly, it has been correctly fixed as if len(f) < 2:
  • Previously, qname = spotname.replace("NDV", "SM") resulted in missing file error due to missing extension. This has been fixed by changing it to qname = spotname.replace("NDV", "SM") + ".HDF"
  • In the old version,
rules = [
    r + "\n"
    for r in [
        "8 50 50 50",
        ...
    ]
]
gs.write_command("r.colors", map=smfile, rules="-", stdin=rules)

raised TypeError as stdin can only accept string or bytes. This has been fixed by modifying it to:

rules = """8 50 50 50
11 70 70 70
...
252 green
"""
  • Line gs.use_temp_region() caused the output map to be null, since the temporary region prevented g.rename and r.mapcalc results from being preserved in main mapset. This line has been commented out.

This PR closes #6175.

@github-actions github-actions bot added Python Related code is in Python module imagery labels Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
imagery module Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Multiple issues in i.in.spotvgt causing silent failures and NULL outputs
1 participant