[GRASS-dev] [GRASS GIS] #3068: Raise a warning/error when where parameter is not correctly set

GRASS GIS trac at osgeo.org
Wed Jun 22 23:47:24 PDT 2016


#3068: Raise a warning/error when where parameter is not correctly set
--------------------------+-------------------------
  Reporter:  veroandreo   |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.3.0
 Component:  Temporal     |    Version:  svn-trunk
Resolution:               |   Keywords:  where
       CPU:  Unspecified  |   Platform:  Linux
--------------------------+-------------------------

Comment (by mlennert):

 Replying to [ticket:3068 veroandreo]:
 > I have a set of 16 years of MODIS data starting on February 18, 2000. My
 intention was to aggregate data seasonally (3 months granularity), but as
 start is shifted, I wanted aggregation to start from April 1st. This was
 my command:
 >
 > {{{
 > t.rast.aggregate --o input=${var}_${tile} method=average \
 > output=${var}_${tile}_seasonal_average \
 > basename=${var}_${tile}_seasonal_average \
 > suffix=gran where="start_time >= 2000-04-01 00:00:00" \
 > granularity="3 months"
 > }}}
 >
 > I forgot to write 'single quotes' around the date. Therefore, the where
 parameter was ignored and all my seasons shifted and I had to
 > run all over again.
 >
 > Would that be possible to check if the where clause is "well-written"
 and raise an error/warning if it is not??

 The problem will be to define "well-written". AFAIK, the "check" is
 currently done by the db backend: if it accepts the formulation, then ok,
 if not, you'll see an error.

 So apparently your backend considers your where clause as being correct in
 terms of syntax. And we won't be able to create and intelligent system
 that will be able to tell whether what you write is actually what you
 mean... ;-)

 So, for me, this is a wonfix.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3068#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list