[udig-devel] [jira] Erstellt: (UDIG-793) ColorBrewer creates faulty SLDs - but they work

Matthias Basler (JIRA) jira at codehaus.org
Tue May 16 13:07:41 PDT 2006


ColorBrewer creates faulty SLDs - but they work
-----------------------------------------------

         Key: UDIG-793
         URL: http://jira.codehaus.org/browse/UDIG-793
     Project: uDIG
        Type: Bug

  Components: style  
    Versions: UDIG 1.1.M8    
 Environment: Found on trunk on 2006-05-16
    Reporter: Matthias Basler
 Assigned to: Justin Deoliveira 
     Fix For: uDig 1.1.RC1


Hope I'm not telling something stupid here ...
I tried creating a style for a shapefile (bc_voting_areas) that uses the themer (ColorBrewer) to separate the polygons into 5 classes by the "NDP" value. I exported the SLD and also looked into the XML view of the SLD. Below is an excerpt.
I noticed that the Filter constraints only use "PropertyIsLessThan" or "PropertyIsLessThanOrEqualTo", but it should be

    PropertyIsMoreThanOrEqualTo <lower value>
    AND
    PropertyIsLessThan <upper value>

so the "LessThanOrEqualTo" should be "MoreThanOrEqualTo ", shouldn't it?
The funny thing is that the shapefile gets correctly colored, as far as I can tell. Even if I reimport such SLD file the shapefile gets colored correctly. Could this be because the rules are used bottom to top, so a value already assigned to (f.e.) rule03 will be overridden by rule02 and then rule01.

...
                    <sld:Name>rule01</sld:Name>
                    <sld:Title> to 2.541816346352377</sld:Title>
                    <sld:Abstract>Abstract</sld:Abstract>
                    <ogc:Filter>
                        <ogc:PropertyIsLessThan>
                            <ogc:PropertyName>NDP</ogc:PropertyName>
                            <ogc:Literal>2.541816346352377</ogc:Literal>
                        </ogc:PropertyIsLessThan>
                    </ogc:Filter>
                    <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
...
                    <sld:Name>rule02</sld:Name>
                    <sld:Title>2.541816346352377 to 26.114990622838725</sld:Title>
                    <sld:Abstract>Abstract</sld:Abstract>
                    <ogc:Filter>
                        <ogc:And>
                            <ogc:PropertyIsLessThanOrEqualTo>
                                <ogc:Literal>2.541816346352377</ogc:Literal>
                                <ogc:PropertyName>NDP</ogc:PropertyName>
                            </ogc:PropertyIsLessThanOrEqualTo>
                            <ogc:PropertyIsLessThan>
                                <ogc:PropertyName>NDP</ogc:PropertyName>
                                <ogc:Literal>26.114990622838725</ogc:Literal>
                            </ogc:PropertyIsLessThan>
                        </ogc:And>
                    </ogc:Filter>
                    <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>
...
                    <sld:Name>rule05</sld:Name>
                    <sld:Title>73.26133917581141 to </sld:Title>
                    <sld:Abstract>Abstract</sld:Abstract>
                    <ogc:Filter>
                        <ogc:PropertyIsLessThanOrEqualTo>
                            <ogc:Literal>73.26133917581141</ogc:Literal>
                            <ogc:PropertyName>NDP</ogc:PropertyName>
                        </ogc:PropertyIsLessThanOrEqualTo>
                    </ogc:Filter>
                    <sld:MaxScaleDenominator>1.7976931348623157E308</sld:MaxScaleDenominator>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



More information about the udig-devel mailing list