Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ Here, we will explore **principal components analysis** (PCA). PCA mathematicall
Perform a PCA and output the results to the console/terminal and as PCA component maps.

```{python}
i.pca input=landsat8_2024_B2,landsat8_2024_B3,landsat8_2024_B4, landsat8_2024_B5,landsat8_2024_B6,landsat8_2024_B7 output=Flagstaff_landsat8
i.pca input=landsat8_2024_B2,landsat8_2024_B3,landsat8_2024_B4,landsat8_2024_B5,landsat8_2024_B6,landsat8_2024_B7 output=Flagstaff_landsat8
```

#### Python
Expand All @@ -444,7 +444,7 @@ Perform a PCA and output the results to the console/terminal and as PCA componen

```{python}
gs.run_command("i.pca",
input="landsat8_2024_B2,landsat8_2024_B3,landsat8_2024_B4, landsat8_2024_B5,landsat8_2024_B6,landsat8_2024_B7",
input="landsat8_2024_B2,landsat8_2024_B3,landsat8_2024_B4,landsat8_2024_B5,landsat8_2024_B6,landsat8_2024_B7",
output=Flagstaff_landsat8)
```

Expand Down Expand Up @@ -491,6 +491,14 @@ Here is PCA component 1 colored with a **bcyr** (blue-cyan-yellow-red) color tab

Follow the instructions given above for histogram equalization, but pick `bcyr` instead of grey for the color table.

```bash
# Set PCA component 1 to bcyr false color
r.colors -e map=Flagstaff_landsat8.1 color=bcyr

# Reset histogram to grey for subsequent steps
r.colors -e map=Flagstaff_landsat8.1 color=grey
```

Note how areas of different vegetation, soil, and water stand out more clearly than with grey-scale. Try other color tables.
:::

Expand Down
Loading