I am using Geoserver 2.7. I have SLD style with a link to external graphic.
When I do WMS GetMap request in KML format, I got some mistakes in getting
icon href. I did some debuging and I found that method
"trySingleExternalGraphic" in class IconPropertyExtractor works unclear for
me.

This method analyzes each rule one by one and checks if there is only one
single rule applicable.

here is code:
<code>
for (MiniRule rule : rules) {
    final boolean applicable =(rule.isElseFilter && !applied) ||
                            (rule.filter == null) ||
                            (rule.filter.evaluate(feature));
              if (applicable) {
                  if (singleRule == null) {
                         singleRule = rule;
                     } else {
                        return null;
                     }
}
</code>

So, in case, I have only 1 applicable rule for each feature, but also I have
ElseFilter, I got result, that I have 2 applicable rules. But I guess
ElseFilter shouldn't be counted! 
Is it my misunderstanding of how sld works, or is it geoserver's bug?



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Kml-module-Wrong-result-while-analyzing-ElseFilter-in-sld-style-tp5196138.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to