Ahhh, ok, I am sorry, i didn't understand that it was just CQL that you
wanted to keep aligned with OGC. That works fine for me. For background the
context i am using this is geoscript, in which a big part the api is based
upon the ability to easily compose filters from cql.

So with that I will happily remove the changes from the CQL grammer that
allow for datetime literals. But I will keep the TEQUALS temporal
predicate.

Sound good?



On Fri, Mar 1, 2013 at 10:12 AM, Mauricio Pazos <[email protected]>wrote:

> On Friday, March 01, 2013 07:58:52 AM Justin Deoliveira wrote:
> > > > - Changes to the CQL/ECQL grammer to allow for date time literals in
> > > > "normal" binary comparisons.
> > >
> > > Short history about this issue:
> > >
> > > Some years ago, I found that the BNF grammar (from OGG CSW
> specification)
> > >
> > >  did
> > >
> > > have a mistake, because the rule <datetime literal> is not present. On
> the
> > > other hand you can find a rule for  <date-time>, in the temporal
> predicate
> > > context. So, I asked for this issue to the OGC's Catalog Wroking Group
> .
> > > They
> > > replied that it is a mistake in the <comparison predicate> rule. Thus
> > > <datetime literal> should be removed from <literal> rule. They told me
> > > that
> > > the idea is to use the <temporal predicates> .
> > >
> > > Thus I modified the CQL implementation taking into account  the  OGC's
> > > Catalog
> > > Wroking Group suggestions.
> > >
> > > I think we shouldn't include this extension in CQL grammar.
> > >
> > > Now that you have included  TEQUALS the user can write predicates for
> "<",
> > > ">",  "=" using temporal rules BEFORE, AFTER and TEQUALS
> >
> > Hmmm... this is less than ideal for me, but makes sense now that I
> realize
> > that the rationale comes from OGC.
> >
> > The biggest thing is simplicity. CQL is so nice because its such a simple
> > syntax. "=" is much more intuitive than "TEQUALS". And if you think about
> > someone trying out a filter they wil try "=" before thinking that there
> is
> > a special construct for date equality. For example, i myself spent about
> 15
> > minutes trying to determine what the format was for "=" with a date
> > literal, thinking i just had the wrong datetime format.
> >
> > And what about other binary predicates, for example "<=". Yes they can be
> > expressed with the temporal predicates by doing:
> >
> >   FOO BEFORE <DT> OR FOO TEQUALS <DT>
> >
> > Which seems needlessly verbose compared to:
> >
> >   FOO <= <DT>
> >
> > So if the only argument against not including it is strict compliance
> with
> > the spec I would ask that we consider this as an extension to it. The
> > precedent for which has been set before in GeoTools, mostly notably with
> > SLD.
> >
> > It would be interesting if other devs could weigh in with an opinion on
> > this one.
> I understand your point. CQL is the canonical implementation,  it is very
> near
> of  OGC specification. But, sometimes, CQL could be hard.  This is the
> reason
> why we have created ECQL. Maybe you can add this extensions in the ECQL. ?
>
> --
> Mauricio Pazos
>



-- 
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to