generateSLD bug

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Mon Oct 31 15:44:59 EST 2005


Hi There,

  The expression parsor will work if some rules are followed like 
appropriate brackets and spaces between operator and values. In your 
case here are the expressions that should give you a valid output:

   1)  EXPRESSION ([fieldname] > 20 AND [fieldname] <= 40)
     result : <ogc:Filter><AND> 
<ogc:PropertyIsGreaterThan><ogc:PropertyName>fieldname</ogc:PropertyName><ogc:Literal>20</ogc:Literal></ogc:PropertyIsGreaterThan> 
<ogc:PropertyIsLessThanOrEqualTo><ogc:PropertyName>fieldname</ogc:PropertyName><ogc:Literal>40</ogc:Literal></ogc:PropertyIsLessThanOrEqualTo></AND></ogc:Filter>



   2)  EXPRESSION ([fieldname] <= 40)
      result : <ogc:Filter> 
<ogc:PropertyIsLessThanOrEqualTo><ogc:PropertyName>fieldname</ogc:PropertyName><ogc:Literal>40</ogc:Literal></ogc:PropertyIsLessThanOrEqualTo></ogc:Filter>


  Let me know if it works.

Later,

Stefanie Weykam wrote:
> I don't know if this bug has been filed before:
> 
> generateSLD():
> 
> Some class expressions are not properly understood and create erroneous
> filters in XML documents. It seems that not all logical operators are
> recognised:
> 
> 
> This expression      fieldname >20 AND fieldname <=40
> 
> results in   .. PropertyIsGreaterThan ... Literal 20
> instead of IsBetween
> 
> and with this expression      fieldname  <=40
>  the Proterty line is completely missing 
> 
> 
> I have just upgraded from MapServer/MapScript4.4 to 4.6.1 and it is still
> the same.
> 

-- 
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list