while preparing examples for the Spearfish data set I found
some strange (maybe not) behaviour:
Idea is to work in a small subset in Speafish DEM at 1m
resolution. The area is generated with r.in.poly:
"area.txt" contains:
A
591316.80 4926455.50
591410.25 4926482.40
591434.60 4926393.60
591341.20 4926368.70
= 1 area
Import (if someone tests this, you may want to zoom the north-west area):
g.region -pa res=1
r.in.poly in=area.txt out=area
g.copy area,MASK
r.univar elevation.dem
[...]
Minimum: 1120
Maximum: 1139
[...]
so far, so nice. Now I want to "normalize" the DEM to zero elevation
(-1200m) and substract 5 meters more (excavation for a big building).
elevation.dem is an INT map. See the very different results wether I
calculate FP or INT:
r.mapcalc elevmod="elevation.dem - 1120 - 5"
EXECUTING elevmod = ... 100%
CREATING SUPPORT FILES FOR elevmod
range: -5 14
r.mapcalc elevmod="elevation.dem - 1120.0 - 5.0"
EXECUTING elevmod = ... 100%
CREATING SUPPORT FILES FOR elevmod
range: -3 14
The 2 meters difference looks quite much to me.
Comments are welcome,
so far, so nice. Now I want to "normalize" the DEM to zero elevation
(-1200m) and substract 5 meters more (excavation for a big building).
elevation.dem is an INT map. See the very different results wether I
calculate FP or INT:
r.mapcalc elevmod="elevation.dem - 1120 - 5"
EXECUTING elevmod = ... 100%
CREATING SUPPORT FILES FOR elevmod
range: -5 14
r.mapcalc elevmod="elevation.dem - 1120.0 - 5.0"
EXECUTING elevmod = ... 100%
CREATING SUPPORT FILES FOR elevmod
range: -3 14
The 2 meters difference looks quite much to me.
Comments are welcome,
I don't see this behaviour; I get "-5 14" in both cases.
On Wed, Feb 13, 2002 at 08:19:45PM +0000, Glynn Clements wrote:
Markus Neteler wrote:
> so far, so nice. Now I want to "normalize" the DEM to zero elevation
> (-1200m) and substract 5 meters more (excavation for a big building).
> elevation.dem is an INT map. See the very different results wether I
> calculate FP or INT:
>
> r.mapcalc elevmod="elevation.dem - 1120 - 5"
> EXECUTING elevmod = ... 100%
> CREATING SUPPORT FILES FOR elevmod
> range: -5 14
>
> r.mapcalc elevmod="elevation.dem - 1120.0 - 5.0"
> EXECUTING elevmod = ... 100%
> CREATING SUPPORT FILES FOR elevmod
> range: -3 14
>
> The 2 meters difference looks quite much to me.
> Comments are welcome,
I don't see this behaviour; I get "-5 14" in both cases.
Thanks for testing. I was using the release_branch version.
Above was a copy-paste..., no commands in between (having a colleague
by my side). Well, I try again.