[Geoserver-users] SLD_BODY param

This is a much better solution for you since you wont have to worry
about filtering in the sld!! So the request looks like:

..."LAYERS=myLayer,myLayer&styles=default,highlighted&FILTER=(),<Filter>
<F

eatureId
fid="highlightedFeature"></Filter>"...

The only thing that changes between request is the feature id you want
to highlight. And you don't have to worry about creating the sld on

the

fly.

This seems a much better solution, but I've checked wms specification
and I cannot find any FILTER parameter in wms request, is it a geoserver
"vendor-specific" parameter? Where can I find some usage examples?

Aitor Calero Garcia ha scritto:

This is a much better solution for you since you wont have to worry
about filtering in the sld!! So the request looks like:

..."LAYERS=myLayer,myLayer&styles=default,highlighted&FILTER=(),<Filter>
<F

eatureId
fid="highlightedFeature"></Filter>"...

The only thing that changes between request is the feature id you want
to highlight. And you don't have to worry about creating the sld on

the

fly.

This seems a much better solution, but I've checked wms specification
and I cannot find any FILTER parameter in wms request, is it a geoserver
"vendor-specific" parameter? Where can I find some usage examples?

Yes, it's a vendor specific one. It's the same as the FILTER parameter in the WFS 1.0 spec.
We don't have examples now, since it's a new feature in 1.5.0 (in 1.4.1
was there too, but did not work). Anyways, here are some samples (filters are url-encoded):

http://localhost:8080/geoserver/wms?request=GetMap&layers=tiger:poly_landmarks,tiger:tiger_roads&styles=,&bbox=-73.97,40.74,-73.93,40.78&Format=image/png&width=344&height=500&srs=EPSG:4326&filter=(<Filter%20xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>LANAME</PropertyName><Literal>East%20River</Literal></PropertyIsEqualTo></Filter>)(<Filter%20xmlns="http://www.opengis.net/ogc"><PropertyIsEqualTo><PropertyName>NAME</PropertyName><Literal>West%20Rd</Literal></PropertyIsEqualTo></Filter>)

We do also have a simpler sintax, cql, coming from the catalog spec,
but it's new and may change a little (the separators between filters will change):

wms?request=GetMap&layers=tiger:poly_landmarks,tiger:tiger_roads&styles=,&bbox=-73.97,40.74,-73.93,40.78&Format=image/png&width=344&height=500&srs=EPSG:4326&cql_Filter=[LANAME%20=%20%22East%20River%22][NAME%20=%20%22West%20Rd%22]

The CQL sintax and samples are here: http://docs.codehaus.org/display/GEOTOOLS/CQL+User+Guide

To test out both kind of filters, you'll need a recent nightly, since
1.5.0rc1 did not have full CQL support.
You can download nightlies here: http://geo.openplans.org/nightly/1.5.x/

Cheers
Andrea