[Geoserver-devel] Querylayer module landed in community area (2.1.x and trunk)

Hi,
the querylayer module just landed in the community area.
It's the module that allows to build cross layers filters.

To try it out on trunk you just have to add the -Dwps,querylayer
to your build parameters, start GeoServer, and then maybe try
the following CQL on your bugsites layer:

DWITHIN(the_geom,
collectGeometries(queryCollection('roads','the_geom','INCLUDE')), 200,
meters)

To try it out on 2.1.x you can do the same, but to get good
efficiency on queries you'll also have to add the
-Dorg.geotools.filter.function.simplify=true
system variable in your java startup (that will make the above function calls be
replaced with just a literal once, otherwise that will happen for each
feature in the
bugsites resultset, which if of course quite slow).

Now, why the wps in the build? Because the two modules share the
collectGeometries code, which has been factored out in its own class,
GeometryCollector.
http://svn.codehaus.org/geoserver/trunk/src/extension/wps/wps-core/src/main/java/org/geoserver/wps/gs/GeometryCollector.java

Wondering what to do about it. Push it back in GeoServer main?
Push it back into GeoTools main?

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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

On Mon, Feb 7, 2011 at 12:09 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

Hi,
the querylayer module just landed in the community area.
It's the module that allows to build cross layers filters.

To try it out on trunk you just have to add the -Dwps,querylayer
to your build parameters, start GeoServer, and then maybe try
the following CQL on your bugsites layer:

DWITHIN(the_geom,
collectGeometries(queryCollection('roads','the_geom','INCLUDE')), 200,
meters)

To try it out on 2.1.x you can do the same, but to get good
efficiency on queries you'll also have to add the
-Dorg.geotools.filter.function.simplify=true
system variable in your java startup (that will make the above function calls be
replaced with just a literal once, otherwise that will happen for each
feature in the
bugsites resultset, which if of course quite slow).

Now, why the wps in the build? Because the two modules share the
collectGeometries code, which has been factored out in its own class,
GeometryCollector.
http://svn.codehaus.org/geoserver/trunk/src/extension/wps/wps-core/src/main/java/org/geoserver/wps/gs/GeometryCollector.java

Wondering what to do about it. Push it back in GeoServer main?
Push it back into GeoTools main?

Update: I've pushed that class back to GeoTools and included the
querylayer module in the
community release, so it will be available for everybody starting tomorrow.

We've also written a blog post providing some usage examples:
http://geo-solutions.blogspot.com/2011/02/developer-corner-cross-layer-filtering.html

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313
mob: +39 333 8128928

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

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