Hi!
I tested and found out that the parameters minic and maxic cannot handle NULL
values. The resulting rasters contain values but are corrupt (e.g. r.univar
cannot calculate the mean value). Can anyone tell me if it's a constraint for
r.param.scale with param=[minic,maxic] or a bug? It seems the curvature
calculation is not NULL safe.
Testing:
--------
//dom_last_min_1m_filled has some NULL values
- r.param.scale input=dom_last_min_1m_filled output=test1 param=minic size=7
- r.univar test1
- change region extent (large, a few pixels smaller, smaller)
- r.mapcalc "test_large=test1"
g.region -p
projection: 1 (UTM)
zone: 32
datum: wgs84
ellipsoid: wgs84
north: 5239281
south: 5239182
west: 32678295
east: 32678408
nsres: 1
ewres: 1
rows: 99
cols: 113
cells: 11187
r.univar dom_last_min_1m_filled
100%
total null and non-null cells: 11187
total null cells: 2239
Of the non-null cells:
----------------------
n: 8948
minimum: 1198.47
maximum: 1297.96
range: 99.49
mean: 1244.33
mean of absolute values: 1244.33
standard deviation: 17.6737
variance: 312.358
variation coefficient: 1.42034 %
sum: 11134262.2897949219
r.param.scale input=dom_last_min_1m_filled output=test1 param=minic size=7
#ZOOM OUT
g.region -p
projection: 1 (UTM)
zone: 32
datum: wgs84
ellipsoid: wgs84
north: 5239347
south: 5239116
west: 32678220
east: 32678483
nsres: 1
ewres: 1
rows: 231
cols: 263
cells: 60753
r.mapcalc "test_large=test1"
r.univar test_large
100%
total null and non-null cells: 60753
total null cells: 49566
Of the non-null cells:
----------------------
n: 11187
minimum: -2.73402
maximum: 2.08718
range: 4.82121
mean: nan
mean of absolute values: nan
standard deviation: nan
variance: nan
variation coefficient: nan %
sum: nan
#Slightly smaller region than test1
g.region -p
projection: 1 (UTM)
zone: 32
datum: wgs84
ellipsoid: wgs84
north: 5239281
south: 5239182
west: 32678296
east: 32678406
nsres: 1
ewres: 1
rows: 99
cols: 110
cells: 10890
r.mapcalc "test_small=test1"
100%
r.univar test_small
100%
total null and non-null cells: 10890
total null cells: 0
Of the non-null cells:
----------------------
n: 10890
minimum: -2.73402
maximum: 2.08718
range: 4.82121
mean: nan
mean of absolute values: nan
standard deviation: nan
variance: nan
variation coefficient: nan %
sum: nan
#Region a lot smaller than test1
g.region -p
projection: 1 (UTM)
zone: 32
datum: wgs84
ellipsoid: wgs84
north: 5239274
south: 5239186
west: 32678307
east: 32678397
nsres: 1
ewres: 1
rows: 88
cols: 90
cells: 7920
r.mapcalc "test_smallest=test1"
r.univar test_smallest
100%
total null and non-null cells: 7920
total null cells: 0
Of the non-null cells:
----------------------
n: 7920
minimum: nan
maximum: nan
range: nan
mean: nan
mean of absolute values: nan
standard deviation: nan
variance: nan
variation coefficient: nan %
sum: nan