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

Nikos Alexandris nik at nikosalexandris.net
Fri Nov 20 01:17:45 PST 2015


* Anna Petrášová <kratochanna at gmail.com> [2015-11-20 00:10:19 -0500]:

> On Thu, Nov 19, 2015 at 2:53 PM, Nikos Alexandris <nik at nikosalexandris.net>
> wrote:
> 
> > 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
> >
> >
> >
> 
> Should be fixed in 66864. I still don't understand why it doesn't fail in
> the other case though.

Need to look closer -- no time. Yet, why use .replace for adding a prefix?

Nikos


More information about the grass-dev mailing list