[GRASS-dev] Re: [GRASS-user] low radiance values after i.atcor and i.topo.corr

Markus Neteler neteler at osgeo.org
Sat Jun 21 05:32:58 EDT 2008


On Wed, Jun 18, 2008 at 11:41 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
> Glynn Clements wrote:
>
>> > Thanks!  Multiplying by 1000 with r.mapcalc gives better results.  Any
>> > chance adding floating points (FCELL) to i.cluster?
>>
>> I had a brief look at the code[1], and cannot see any obvious reason
>> why the values would need to be integers, so I'm assuming that it's
>> just a legacy of the days before FP support was added.
>>
>> [1] Most of the code is actually in the lib/imagery/c_*.c files. That
>> should either be made part of i.cluster (nothing else uses it), or at
>> least split into a separate library.
>
> I have committed these changes (splitting the cluster code off to a
> separate library, and changing it to use DCELL instead of CELL) to the
> SVN trunk.
>
> I would appreciate it if someone who understands i.cluster could test
> the current version.

(I have backported the changes to 6.4.svn for easier testing for me).

The i.cluster continues to work for CELL maps.

Here a test with the NC data set for FP maps:
  r.mapcalc b10=lsat7_2000_10/10000.
  r.mapcalc b20=lsat7_2000_20/10000.
  r.mapcalc b30=lsat7_2000_30/10000.
  r.mapcalc b40=lsat7_2000_40/10000.
  r.mapcalc b50=lsat7_2000_50/10000.
  r.mapcalc b70=lsat7_2000_70/10000.
  r.mapcalc b80=lsat7_2000_80/10000.
  i.group bgroup sub=bgroup in=b10,b20,b30,b40,b50,b70,b80
  i.cluster bgroup sub=bgroup sig=bsig class=10
Reading image ...
 100%
Iteration 1: % Convergence: 77.47 (0s elapsed, 0s left)
Iteration 2: % Convergence: 78.21 (0s elapsed, 0s left)
Iteration 3: % Convergence: 83.12 (0s elapsed, 0s left)
Iteration 4: % Convergence: 91.00 (0s elapsed, 0s left)
Iteration 5: % Convergence: 94.15 (0s elapsed, 0s left)
Iteration 6: % Convergence: 95.67 (0s elapsed, 0s left)
Iteration 7: % Convergence: 96.44 (0s elapsed, 0s left)
Iteration 8: % Convergence: 96.54 (0s elapsed, 0s left)
Iteration 9: % Convergence: 96.54 (0s elapsed, 0s left)
Iteration 10: % Convergence: 96.57 (0s elapsed, 0s left)
Iteration 11: % Convergence: 97.01 (0s elapsed, 0s left)
Iteration 12: % Convergence: 97.04 (0s elapsed, 0s left)
Iteration 13: % Convergence: 97.18 (0s elapsed, 0s left)
Iteration 14: % Convergence: 97.35 (1s elapsed, 1s left)
Iteration 15: % Convergence: 97.72 (1s elapsed, 1s left)
Iteration 16: % Convergence: 97.93 (1s elapsed, 1s left)
Iteration 17: % Convergence: 98.12 (1s elapsed, 1s left)

i.maxlik bgroup sub=bgroup sig=bsig class=bclass
WARNING: signature 1 is not valid (ill-conditioned) - ignored.
WARNING: signature 2 is not valid (ill-conditioned) - ignored.
WARNING: signature 3 is not valid (ill-conditioned) - ignored.
WARNING: signature 4 is not valid (ill-conditioned) - ignored.
WARNING: signature 5 is not valid (ill-conditioned) - ignored.
WARNING: signature 6 is not valid (ill-conditioned) - ignored.
WARNING: signature 7 is not valid (ill-conditioned) - ignored.
WARNING: signature 8 is not valid (ill-conditioned) - ignored.
WARNING: signature 10 is not valid (ill-conditioned) - ignored.
i.maxlik ...  100%

d.rast bclass
-> all NULL

cat nc_spm_07/neteler/group/bgroup/subgroup/bgroup/sig/bsig
#produced by i.cluster
#Class 1
235
0.006890 0.005014 0.004109 0.001857 0.001746 0.001417 0.002585
0.000000
0.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000001
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000001
#Class 2
2296
0.007022 0.005345 0.004651 0.006115 0.006222 0.003614 0.004977
0.000000
0.000000 0.000000
0.000000 0.000000 0.000000
-0.000000 -0.000000 -0.000000 0.000001
-0.000000 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000
-0.000000 -0.000000 -0.000000 0.000000 0.000000 -0.000000 0.000001
#Class 3
2870
0.007302 0.005776 0.005326 0.006659 0.007960 0.004741 0.005350
0.000000
0.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 -0.000000 0.000001
-0.000000 -0.000000 0.000000 -0.000000 0.000000
0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000
0.000000 0.000000 -0.000000 0.000000 -0.000000 -0.000000 0.000001
#Class 4
1329
0.008375 0.006843 0.006841 0.006228 0.007832 0.005562 0.005556
0.000000
0.000000 0.000000
0.000000 0.000000 0.000000
-0.000000 -0.000000 -0.000000 0.000001
-0.000000 -0.000000 -0.000000 0.000000 0.000001
0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000
-0.000000 0.000000 -0.000000 0.000000 0.000000 -0.000000 0.000001
#Class 5
848
0.007498 0.006350 0.005569 0.009792 0.009360 0.005067 0.007111
0.000000
0.000000 0.000000
0.000000 0.000000 0.000001
-0.000000 -0.000000 -0.000000 0.000002
0.000000 0.000000 0.000000 -0.000000 0.000001
0.000000 0.000000 0.000000 -0.000000 0.000001 0.000001
-0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000001
#Class 6
1997
0.007739 0.006318 0.006402 0.006896 0.010058 0.006285 0.005598
0.000000
0.000000 0.000000
0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000001
-0.000000 -0.000000 0.000000 -0.000000 0.000001
0.000000 0.000000 0.000000 -0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000 -0.000000 -0.000000 0.000001
#Class 7
990
0.008410 0.007342 0.007924 0.007967 0.012359 0.007995 0.006678
0.000000
0.000000 0.000000
0.000000 0.000000 0.000001
0.000000 0.000000 -0.000000 0.000001
-0.000000 -0.000000 0.000000 -0.000000 0.000001
0.000000 0.000000 0.000001 -0.000000 0.000001 0.000001
0.000000 0.000000 0.000000 0.000001 -0.000000 -0.000000 0.000001
#Class 8
1117
0.009603 0.008255 0.008899 0.006452 0.009602 0.007522 0.006170
0.000001
0.000000 0.000000
0.000001 0.000001 0.000001
-0.000000 -0.000000 -0.000000 0.000001
-0.000000 0.000000 0.000000 0.000000 0.000001
0.000000 0.000000 0.000000 -0.000000 0.000000 0.000001
-0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000001
#Class 9
620
0.011070 0.010236 0.012072 0.007513 0.013108 0.010484 0.007491
0.000002
0.000002 0.000002
0.000001 0.000002 0.000002
-0.000000 0.000000 0.000000 0.000001
-0.000001 -0.000000 0.000001 0.000001 0.000003
0.000001 0.000001 0.000001 0.000000 0.000002 0.000003
0.000000 0.000000 0.000000 0.000000 0.000000 -0.000000 0.000003
#Class 10
88
0.017001 0.016265 0.018767 0.010181 0.018973 0.016527 0.010624
0.000014
0.000014 0.000014
0.000012 0.000013 0.000013
0.000007 0.000008 0.000007 0.000005
0.000004 0.000005 0.000005 0.000003 0.000010
-0.000000 -0.000000 0.000001 -0.000001 0.000011 0.000018
0.000004 0.000005 0.000004 0.000003 0.000002 -0.000002 0.000014

Maybe my example is nonsense?

Markus


More information about the grass-dev mailing list