[GRASSLIST:3614] very low fp values problem
Maciek Sieczka
werchowyna at pf.pl
Mon Jun 7 15:59:29 EDT 2004
hello fellow grassies!
I'm trying to reduce vignetting on my aerial photos and luckily I'm
approaching some results. By the way a strange thing occured when working
with rasters with very low floating point values.
if fixed already in 5.3 or please let me know and sorry for bugging!
the problematic raster's name is 'kor_lx'
detailed description is at the bottom and a screendump is attached
the issue step by step:
r.info -r kor_lx
min=0.000000
max=0.000000
but I wanted to know the exact values so I tried:
r.univar kor_lx
This module calculates univariate statistics...
Calculation for full image kor_lx at vignet...
(no base mask map set, ignoring NULL cells)
Reading raster map...
r.stats: 100%
Calculating statistics...
but it failed:
Number of cells (excluding NULL cells): 3407232
Minimum: 0
Maximum: 0
Range: 0
Arithmetic mean: 0
Variance: 0
Standard deviation: 0
awk: cmd. line:17: (FILENAME=- FNR=3407232) fatal: division by zero
attempted
and when run interactively:
r.univar
Enter base raster map (or return to skip)
Enter 'list' for a list of existing raster files
Hit RETURN to cancel request
> kor_lx
<kor_lx>
kor_lx at vignet
Enter cover raster map
Enter 'list' for a list of existing raster files
Hit RETURN to cancel request
> kor_lx
<kor_lx>
kor_lx at vignet
This module calculates univariate statistics...
Calculation for images kor_lx at vignet masked through kor_lx at vignet...
(ignoring NULL cells)
Reading raster maps...
r.stats: 100%
ERROR: Map kor_lx contains only NULL data in current region.
so I tried copying the map category values to their grey scale equivalents:
r.mapcalc 'kor256=#kor_lx'
100%
and strange here the strange is that the max value is not 255 as it should:
r.info -r kor256
min=0
max=254
GRASS:~ > r.info kor_lx
+---------------------------------------------------------------------------
| Layer: kor_lx Date: Mon Jun 7 19:31:56 2004
| Mapset: vignet Login of Creator: ziutek
| Location: kpn92
| DataBase: /home/grassdata
| Title: ( kor_lx )
|---------------------------------------------------------------------------
| Type of Map: cell Number of Categories: 255
| Data Type: DCELL
| Rows: 1824
| Columns: 1868
| Total Cells: 3407232
| Projection: x,y (zone 0)
| N: 1824 S: 0 Res: 1
| E: 1868 W: 0 Res: 1
| Range of data: min = 0.000000 max = 0.000000
| Data Source:
| Data Description:
| generated by r.mapcalc
| Comments:
| (1218.010000 / (sqrt((x() - 941.000000) ^ 2.000000 + (y() -
| 928.000000) ^ 2.000000) ^ 2.000000 + 1218.010000 ^ 2.000000)) ^
| 4.500000
+---------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kor_lx.png
Type: image/png
Size: 37013 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20040607/1f0348ea/kor_lx.png
More information about the grass-user
mailing list