Skip to content

Fix broken i.pca command in remote sensing tutorials#125

Merged
petrasovaa merged 1 commit into
OSGeo:mainfrom
Valyrian-Code:fix/remote-sensing-pca-command
Jun 3, 2026
Merged

Fix broken i.pca command in remote sensing tutorials#125
petrasovaa merged 1 commit into
OSGeo:mainfrom
Valyrian-Code:fix/remote-sensing-pca-command

Conversation

@Valyrian-Code

@Valyrian-Code Valyrian-Code commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #104

This PR fixes two issues in the PCA section of both the English and Portuguese remote sensing tutorials:

  1. Trailing space in input listlandsat8_2024_B4, landsat8_2024_B5 (note the space after the comma) causes i.pca to fail in both the CLI and Python examples.
  2. Missing quotes around the output parameteroutput=Flagstaff_landsat8 in the Python example references an undefined variable instead of the string "Flagstaff_landsat8", resulting in a NameError.

The fixes have been applied to:

  • GRASS_remotesensing.qmd
  • GRASS_remotesensing_pt.qmd

These changes ensure that all PCA examples run successfully as written.

Copilot AI review requested due to automatic review settings June 3, 2026 04:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes the PCA tutorial snippets to use consistent band lists (no stray spaces) and correct GRASS Python API usage.

Changes:

  • Normalized i.pca input=... lists to remove an extra space after a comma in both PT and EN tutorials.
  • Fixed gs.run_command(..., output=...) to pass the output map name as a string literal (and cleaned formatting).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
content/tutorials/remote_sensing_visualization/GRASS_remotesensing_pt.qmd Aligns PCA bash/Python examples; fixes Python output argument quoting and input list formatting.
content/tutorials/remote_sensing_visualization/GRASS_remotesensing.qmd Same corrections as PT version for consistency and correctness in English tutorial.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@petrasovaa petrasovaa merged commit 5118c76 into OSGeo:main Jun 3, 2026
1 check passed
@Valyrian-Code Valyrian-Code deleted the fix/remote-sensing-pca-command branch June 3, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revisions for Introduction to Remote Sensing

3 participants