I just got thru an exercise in which I was using a third party Google style SLD set. The file for major highways had each resolution and highway type in a separate FeatureTypeStyle element. When I tried to style just Interstates xor US highways- each within its own FeatureTypeStyle - it displayed quickly. When I tried to include both interstate and US highways in the same SLD file (each resolution and type within a separate FeatureTypeStyle) it was very slow (minutes). When I removed all the FeatureTypeStyle tags except one enclosing (all the Rules were in one element), then the display was almost instantaneous.
I am trying to “learn by example”, but I realize that I don’t understand FeatureTypeStyle. I would appreciate and help or pointers to documentation that I may not have found.
Thanks,
-Al
Hi Al,
You have kind of hit on one of the things I dont like about SLD... too many ways to do things.
One thing to take into account is how the renderer is processing the document... I am not 100% sure what the geoserver/geotools renderer does but multiple feautre type styles might mean multiple passes over the same dataset... which what might be leading to the performance hit.
I think a good rule of thumb is that if you can do something with a single FeatureTypeStyle with multiple rules that is probably the way to go.
Also there are many people on this list who know more about SLD then I so hopefully they can give you better insights.
-Justin
Al Byers wrote:
I just got thru an exercise in which I was using a third party Google style SLD set. The file for major highways had each resolution and highway type in a separate FeatureTypeStyle element. When I tried to style just Interstates xor US highways- each within its own FeatureTypeStyle - it displayed quickly. When I tried to include both interstate and US highways in the same SLD file (each resolution and type within a separate FeatureTypeStyle) it was very slow (minutes). When I removed all the FeatureTypeStyle tags except one enclosing (all the Rules were in one element), then the display was almost instantaneous.
I am trying to "learn by example", but I realize that I don't understand FeatureTypeStyle. I would appreciate and help or pointers to documentation that I may not have found.
Thanks,
-Al
!DSPAM:4007,46a66299129041030819293!
------------------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
!DSPAM:4007,46a66299129041030819293!
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4007,46a66299129041030819293!
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
Al Byers ha scritto:
I just got thru an exercise in which I was using a third party Google style SLD set. The file for major highways had each resolution and highway type in a separate FeatureTypeStyle element. When I tried to style just Interstates xor US highways- each within its own FeatureTypeStyle - it displayed quickly. When I tried to include both interstate and US highways in the same SLD file (each resolution and type within a separate FeatureTypeStyle) it was very slow (minutes). When I removed all the FeatureTypeStyle tags except one enclosing (all the Rules were in one element), then the display was almost instantaneous.
I am trying to "learn by example", but I realize that I don't understand FeatureTypeStyle. I would appreciate and help or pointers to documentation that I may not have found.
Unfortunately there is basically none. But you can think about the SLD
as a SQL query, that is, a declaration of what to do.
The renderer is much alike a SQL planner/executor, and it can deal
with some input configs better than others.
For performance oriented questions like these the only thing we could do
is to expose the major elements of the rendering algorithms, so that
one can judge which spec would be faster.... unfortunately our plate
is so full that I don't think we'll be able to do that.
Justin suggestion is sound thought, always try to put more stuff in
a single featuretypestyle instead of splitting it up, this should reduce
the number of queries we perform to render the map.
Cheers
Andrea