Hi list

I'm wrinting a new style and I have to make choices between filters and expressions. I was wondering which one would be more efficient in terms of rendering performance : 2 rules with static style, or one rule with dynamic style ?
One simple example would be (in ysld) :


Filter version, two rules :
rules:
- filter: ${railway = 'rail' AND tunnel <> 'yes'}
  symbolizers:
  - line:
      stroke-color: '#999999'
rules:
- filter: ${railway = 'rail' AND tunnel = 'yes'}
  symbolizers:
  - line:
      stroke-color: '#DDDDDD'


Expression version, one rule, expression in style :
rules:
- filter: ${railway = 'rail'}
  symbolizers:
  - line:
      stroke-color: ${if_then_else(isNull(tunnel),'#999999','#DDDDDD')}


I have mixed feelings about both. I can write filter expressions more easily because the syntax is simple, and I am not familiar with CQL. But I like the compacity of the expression version better.

Thanks for your thoughts !

--
Arnaud

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to