Help with an SLD filter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with an SLD filter

todd runstein
I can't get my "Or" filter working.  Here's what I
want to use:

<ogc:Filter>
  <ogc:Or>
    <ogc:PropertyIsLike wildCard="*" escape="\"
singleChar="?">
      <ogc:PropertyName>fename</ogc:PropertyName>
      <ogc:Literal>I-*</ogc:Literal>
    </ogc:PropertyIsLike>
    <ogc:PropertyIsEqualTo>
      <ogc:PropertyName>fetype</ogc:PropertyName>
      <ogc:Literal>Hwy</ogc:Literal>
    </ogc:PropertyIsEqualTo>
  </ogc:Or>
</ogc:Filter>

Unfortunately, it's not working.  Each of these
filters work fine by themselves.  But using "Or"
causes only one of them to be rendered (the
"PropertyIsEqualTo" is used, regardless of the order).
 There are no errors in the log file - and I'm set to
FINEST.

Any suggestions on what I'm doing wrong?  I'm running
this on geoserver 1.3.0-RC6 and pulling Tiger data out
of PostGIS.  

Thanks,

Todd

The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
Get a handle on your data with "pocOLAP", the "little" OLAP project
http://pocolap.sourceforge.net
________________________________________


               
__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Help with an SLD filter

Justin Deoliveira-3
Hi Todd,

I experimented with some SLD filters using an "or" filter to try and
replicate your problem. Unfortunatley I could not. Here is what I did, I
would suggess you try following similar steps to see if it works.

I setup the following SLD Rule:

<Rule>
         <ogc:Filter>
           <ogc:Or>
           <ogc:PropertyIsEqualTo>
             <ogc:PropertyName>state_name</ogc:PropertyName>
             <ogc:Literal>Illinois</ogc:Literal>
           </ogc:PropertyIsEqualTo>
           <ogc:PropertyIsLike wildCard="*" escape="\" singleChar="?">
             <ogc:PropertyName>state_name</ogc:PropertyName>
             <ogc:Literal>N*</ogc:Literal>
           </ogc:PropertyIsLike>
           </ogc:Or>
         </ogc:Filter>
         <PolygonSymbolizer>
            <Fill>
               <CssParameter name="fill">#FF0000</CssParameter>
            </Fill>
         </PolygonSymbolizer>
</Rule>

Using it to query the states layer it worked as expected.

Perhaps you can include the rest of your sld document, maybe something
else is throwing the filter off.

-Justin


todd runstein wrote:

> I can't get my "Or" filter working.  Here's what I
> want to use:
>
> <ogc:Filter>
>   <ogc:Or>
>     <ogc:PropertyIsLike wildCard="*" escape="\"
> singleChar="?">
>       <ogc:PropertyName>fename</ogc:PropertyName>
>       <ogc:Literal>I-*</ogc:Literal>
>     </ogc:PropertyIsLike>
>     <ogc:PropertyIsEqualTo>
>       <ogc:PropertyName>fetype</ogc:PropertyName>
>       <ogc:Literal>Hwy</ogc:Literal>
>     </ogc:PropertyIsEqualTo>
>   </ogc:Or>
> </ogc:Filter>
>
> Unfortunately, it's not working.  Each of these
> filters work fine by themselves.  But using "Or"
> causes only one of them to be rendered (the
> "PropertyIsEqualTo" is used, regardless of the order).
>  There are no errors in the log file - and I'm set to
> FINEST.
>
> Any suggestions on what I'm doing wrong?  I'm running
> this on geoserver 1.3.0-RC6 and pulling Tiger data out
> of PostGIS.  
>
> Thanks,
>
> Todd
>
> The only "dumb question" is the one you were too afraid to ask.
> ________________________________________
> Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
> http://routeruler.sourceforge.net
> ________________________________________
> Get a handle on your data with "pocOLAP", the "little" OLAP project
> http://pocolap.sourceforge.net
> ________________________________________
>
>
>
> __________________________________________
> Yahoo! DSL – Something to write home about.
> Just $16.99/mo. or less.
> dsl.yahoo.com
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Geoserver-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>


--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geoserver-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geoserver-users