[GRASS-dev] v.rast.stats fails with column_prefix='t'

Nikos Alexandris nik at nikosalexandris.net
Thu Nov 19 11:53:21 PST 2015


Nikos:

> > The command
> > v.rast.stats map=SomeVector raster=SomeRaster column='t'
> > fails. Perhaps the line

Anna:

> How exactly does it fail?

--%<---
v.info -c Test
INTEGER|cat
INTEGER|Id
CHARACTER|Name

v.rast.stats map=Test raster=LT51960282005221KIS00_B1 column='t'
Traceback (most recent call last):
  File "/osgeo/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.rast.stats", line 306, in <module>
    main()
  File "/osgeo/grass70/dist.x86_64-unknown-linux-gnu/scripts/v.rast.stats", line 268, in main
    i = variables[variable]
KeyError: 'firsquartile'
--->%--

Strange, however, it does not fail always!?

Another example

--%<---
v.info -c test
INTEGER|cat

v.rast.stats map=test raster=test column_prefix='t'
--->%--

seems to work and gives

DOUBLE PRECISION|t_number
DOUBLE PRECISION|t_minimum
DOUBLE PRECISION|t_maximum
DOUBLE PRECISION|t_range
DOUBLE PRECISION|t_average
DOUBLE PRECISION|t_stddev
DOUBLE PRECISION|t_variance
DOUBLE PRECISION|t_coeff_va
DOUBLE PRECISION|t_sum
DOUBLE PRECISION|t_first_qu
DOUBLE PRECISION|t_median
DOUBLE PRECISION|t_third_qu
DOUBLE PRECISION|t_per90

Nikos




More information about the grass-dev mailing list