[GRASS5] d.what.rast & quantization

Helena hmitaso at unity.ncsu.edu
Sun Feb 27 17:19:50 EST 2005


Markus,

is elev the result of v.surf.rst (or s.surf.rst)?
If yes, this seems to be rst problem - Susane Rizzolli has already reported it.
If you multiply the result by 1.0 in r.mapcalc, the quant is recomputed
and the result of query is correct.

rst calls quantize here - I did not have time to look at what quantize
actually does  and why are the min and max values done like this,
rst was updated for FP support while FP support was still under development
so quant might have changed and this is now producing wrong result.
G_quantize_fp_map_range (params->elev, mapset,
                              (DCELL) zminac - 0.5, (DCELL) zmaxac + 0.5,
                            (CELL) (zminac - 0.5), (CELL) (zmaxac + 0.5));
It might have been there for years, but nobody is probably using the quant result,
so there were no compliants

Helena


Markus Neteler wrote:
> Hi,
> 
> looking at d.what.rast, I see output like this:
> 
> d.what.rast
> 
> Buttons
>  Left:  what's here
>  Right: quit
> 
> 278786.03515625(E) 5232741.95078125(N)
> elev in PERMANENT, quant   (447)
> elev in PERMANENT, actual  (447.190521)
> 
> 279031.25390625(E) 5233060.73515625(N)
> elev in PERMANENT, quant   (539)
> elev in PERMANENT, actual  (540.034363)
> 
> 278700.20859375(E) 5235660.05390625(N)
> elev in PERMANENT, quant   (-557)
> elev in PERMANENT, actual  (-558.007324)
> 
> The quantization rule is not obvious to me, what's the
> background to get such results?
> 
> Thanks
> 
>  Markus
> 
> _______________________________________________
> grass5 mailing list
> grass5 at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass5





More information about the grass-dev mailing list