[GRASS-dev] [GRASS GIS] #3068: Raise a warning/error when where parameter is not correctly set
GRASS GIS
trac at osgeo.org
Thu Jun 23 06:01:29 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 veroandreo):
Replying to [comment:1 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.
I see... but according to the definition in the manual, this where is in
the temporal framework, so I imagined it could be something like if
there's start_date or end_date in the left hand side, then check for
single quotes around the right hand part of the expression... maybe too
complicated...
> So apparently your backend considers your where clause as being correct
in terms of syntax.
So, it is an SQLite issue, that is not sensitive to that kind of mistakes?
> 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... ;-)
meep! :)
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3068#comment:2>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list