[OpenLayers-Dev] Improvements proposal : make Geoserver functions available in OL filter

Ivan Grcic ivan.grcic at geo-solutions.it
Thu Feb 10 12:25:08 EST 2011


Dear devs,

we would like to make an improvement for OL Filter, that would add the
possibility to create Geoserver vendor ogc:Function filter elements
inside existing spatial filter elements.

As you probably already know,  GS has quite a lot of these handy
functions by now, so it would be also useful to have them available in
OL ( http://docs.geoserver.org/2.0.x/en/user/filter/function_reference.html
)

Recently GS filter was improved by GeoSolutions with even more
advanced filter options that enable us to make advanced queries that
combine different layers on Geoserver (you can read more about it on
http://geo-solutions.blogspot.com/2011/02/developer-corner-cross-layer-filtering.html)


I made some initial patch that achieves desired behavior, and I opened
ticket for it (http://trac.osgeo.org/openlayers/ticket/3053)

As I see it now, spatial filter elements accept several arguments:
type , property, value (Geometry or BBOX), distance and distance
units.
With this patch it will be possible to define additional elements
functionName and functionParams, which would be used instead of
filter.value element to create necessary Function elements.

In OpenLayers.Format.Filter.v1 additional writers Function elements
was added. For each Function element two parameters have to be set:
string functionName  and array functionParams. functionParams can
contain various number of parameters - Literals, or another Function
elements, allowing us to create complex filters  with nested Function
elements.

In OpenLayers.Format.Filter.v1_0_0  and
OpenLayers.Format.Filter.v1_1_1 writeSpatial function check was added
that looks if functionName  was supplied instead of value, and writes
function node for us.

(OpenLayers.Filter.Spatial needs to be modified I guess also to add
additional elements there)

So, id like to hear some comments/opinions about it, if i'm heading in
the right directions? Should I maybe define
functionName/functionParams inside filter.value?

Any suggestions are more than welcomed!

Regards,
Ivan


-- 
-------------------------------------------------------
Ivan Grcic
GeoSolutions S.A.S.
Software Engineer


Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313
mob:   +39 328 0559267


http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://twitter.com/geosolutions_it
http://www.youtube.com/user/GeoSolutionsIT


-------------------------------------------------------


More information about the Dev mailing list