On Mon, Apr 14, 2014 at 4:53 PM, Sampo Savolainen <
sampo.savolai...@spatineo.com> wrote:

> Is there a good, fast, expression language in use in GeoServer that I
> could use for this? I'm thinking that we could us expressions to let users
> map parts of the filter, feature type information, along with literals etc.
> into the stored query parameters. This way we'll probably be able to make
> this generic enough to be more universally useful. Plus the expression
> language model should be extensible so we can cover future cases (new
> requirements for the parameter mapping) by just adding more data to the
> expression scope.
>

Hum... maybe CQL, and then you do pattern matching?

In CQL a bbox can be expressed as:

BBOX(geom, x1, y1, x2, y2)

which you'd have to match as the value to the parameter, using another CQL
expression to be run, something like:

Concatenate(x1, ",", y1, ",", x2, ",", y2)

The bbox case is kind of funky, because there is no way in CQL to just say
BBOX(geom, myEnvelope), but other
cases should work.
Say you have a parameter that is a time dimension, you could have as the
pattern:

timeAttribute = theTime

and your parameter value would simply be "theTime" (as in, the value of
that expression)

There is a few hurdles that you have to handle though, like, what if there
is more than one time filter in your request,
or what if the expressions you're extracting from the pattern match are not
literals?
Also, the bbox example above is not exactly going to work, as the in memory
representation of that thing is likely
going to break, so you probably have to do a pre-parse of some kind before
enabling the cql parser...

Just throwing some random ideas in...

Cheers
Andrea






>
>
>  Sampo
>
> --
> Sampo Savolainen
> R&D Director, Spatineo Oy
> sampo.savolai...@spatineo.com
> +358-407555649
> Linnankoskenkatu 16 A 17, 00250 Helsinki, Finland
> www.spatineo.com, twitter.com/#!/spatineo
> www.linkedin.com/company/spatineo-inc
>
> This message may contain privileged and/or confidential information. If you
> have received this e-mail in error or are not the intended recipient, you
> may not use, copy, disseminate, or distribute it; do not open any
> attachments, delete it immediately from your system and notify the sender
> promptly by e-mail that you have done so.
>



-- 
==
Meet us at GEO Business 2014! in London! Visit http://goo.gl/fES3aK
for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to