Skip to content

Commit

Permalink
add text snippet and example to add band references - edited from #1866
Browse files Browse the repository at this point in the history
… (#1887)
  • Loading branch information
veroandreo committed Sep 24, 2021
1 parent e41c3e9 commit f6487aa
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 11 deletions.
30 changes: 24 additions & 6 deletions imagery/i.cluster/i.cluster.html
Expand Up @@ -263,14 +263,9 @@ <h3>Algorithm used for i.cluster</h3>
<h2>EXAMPLE</h2>

Preparing the statistics for unsupervised classification of
a LANDSAT subscene in North Carolina:
a LANDSAT scene within North Carolina location:

<div class="code"><pre>
# To use signature file for classification of a different group, set
# band references for each group member. In this example we'll create
# signature file suitable only for the same group and thus band
# references are not mandatory.

# Set computational region to match the scene
g.region raster=lsat7_2002_10 -p

Expand All @@ -287,6 +282,29 @@ <h2>EXAMPLE</h2>
To complete the unsupervised classification, <em>i.maxlik</em> is subsequently used.
See example in its manual page.

<p>
The signature file obtained in the example above will allow
to classify the current imagery group only (lsat7_2002).
If the user would like to re-use the signature file for the
classification of different imagery group(s), they can set
band references for each group member beforehand, i.e.,
before generating the signature files.
Band references are set by means of <em>r.support</em>
as shown below:

<div class="code"><pre>
# Define band references for all LANDSAT bands
r.support map=lsat7_2002_10 bandref=TM7_1
r.support map=lsat7_2002_20 bandref=TM7_2
r.support map=lsat7_2002_30 bandref=TM7_3
r.support map=lsat7_2002_40 bandref=TM7_4
r.support map=lsat7_2002_50 bandref=TM7_5
r.support map=lsat7_2002_61 bandref=TM7_61
r.support map=lsat7_2002_62 bandref=TM7_62
r.support map=lsat7_2002_70 bandref=TM7_7
r.support map=lsat7_2002_80 bandref=TM7_8
</pre></div>

<h2>SEE ALSO</h2>

<ul>
Expand Down
27 changes: 22 additions & 5 deletions imagery/i.smap/i.smap.html
Expand Up @@ -141,11 +141,6 @@ <h2>EXAMPLE</h2>
Supervised classification of LANDSAT scene (complete NC location)

<div class="code"><pre>
# To use signature file for classification of a different group, set
# band references for each group member. In this example we'll create
# signature file suitable only for the same group and thus band
# references are not mandatory.

# Align computation region to the scene
g.region raster=lsat7_2002_10 -p

Expand Down Expand Up @@ -176,6 +171,28 @@ <h2>EXAMPLE</h2>
r.kappa -w classification=lsat7_2002_smap_classes reference=training
</pre></div>

<p>
The signature file obtained in the example above will allow
to classify the current imagery group only (lsat7_2002).
If the user would like to re-use the signature file for the
classification of different imagery group(s), they can set
band references for each group member beforehand, i.e.,
before generating the signature files.
Band references are set by means of <em>r.support</em>
as shown below:

<div class="code"><pre>
# Define band references for all LANDSAT bands
r.support map=lsat7_2002_10 bandref=TM7_1
r.support map=lsat7_2002_20 bandref=TM7_2
r.support map=lsat7_2002_30 bandref=TM7_3
r.support map=lsat7_2002_40 bandref=TM7_4
r.support map=lsat7_2002_50 bandref=TM7_5
r.support map=lsat7_2002_61 bandref=TM7_61
r.support map=lsat7_2002_62 bandref=TM7_62
r.support map=lsat7_2002_70 bandref=TM7_7
r.support map=lsat7_2002_80 bandref=TM7_8
</pre></div>

<h2>REFERENCES</h2>

Expand Down

0 comments on commit f6487aa

Please sign in to comment.