On 08/02/2010 04:23 PM, Gregor at HostGIS wrote: > I'm trying to use CQL to filter, but am having a tough time with it. In > fact, I'm having a hard time finding CQL tutorials besides these which > I've already exhausted: > http://zing.z3950.org/cql/intro.html > http://geoserver.org/display/GEOSDOC/Common+Query+Language+%28CQL%29+Tutorial+%28unfinished%29 > > With no filter, I see everything colored per my SLD, indicating that my > filtering field (FUTUREZONE) is present and contains expected values. > > This these filters, I see exactly what I expect: > &CQL_FILTER=ACRES< 1 > &CQL_FILTER=ACRES> 1 > Likewise I can filter by ID# and other numeric fields. > > But these always shows a blank map. The second one, in particular, > should match all parcels. The first I know matches parcels because they > are visible with the appropriate color per the SLD. > &CQL_FILTER=FUTUREZONE = PF > &CQL_FILTER=FUTUREZONE> AA > If I add " or %22 to the string, I only get parse errors. > > Am I missing something as to the syntax for matching strings? You have to wrap strings in single quotes (CQL is modelled after SQL in this regard.) Check out http://www.refractions.net:8080/confluence/display/EN/Common+Query+Language for a pretty good overview.
By the way, if you click on the "menu" icon (looks like a tiny list with bullet points) in the OpenLayers layer preview, there is a text box where you can try out CQL filters without having to manually URL-encode them. -- David Winslow OpenGeo - http://opengeo.org/ ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://p.sf.net/sfu/dev2dev-palm _______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
