Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
From: James Macgill <jmacgill@ps...> - 2003-06-20 16:20:45
At 05:05 PM 6/20/2003 +0930, Geoghegan, Sean wrote:
>I just notice something when playing around with styles and the
>Java2DRenderer. It seems that the rules are processed in the order that
>features appear in the feature collection. Whereas the SLD spec says:
>"Rules should be placed [in the SLD document] in the order of priority in
>a UserStyle and stylers should attempt to render the higher priority rules
>over the top of the lower priority rules."
>So perhaps the iteration needs to change so that you do a reverse
>iteration over the rules and within that you then iterate over the feature
>appling the rule if the feature compiles with the FeatureTypeStyle name
>and the rules filter.
>Am I reading the spec (and the code) right here? What are other peoples
>opinions on the interpretation. I bring this up because as it is, I was
>playing around with highlighting single point features, but if the feature
>to highlight appears early in the collection and there are other features
>nearby, then the other features can sometimes be rendered over the
Its important to make the distinction between multiple FeatureTypeStyles
(FTS) and multiple Rules.
The best way to manage highlighting is to add an additional FTS which
contains the rule and symbolizers for the highlight
According to the spec, UserStyles and FeatureTypeStyles are processed top
to bottom so you would want to put your FTS after the FTS which is doing
the normal rendering.
That said, I take your point about rule ordering, we may well be doing them
in the wrong order, I'll have to do some tests, doing them in any other
order whilst getting the 'else' rules right may be a little tricky though.