Le 25/01/2019 à 10:34, Andrea Aime a écrit :
Oh dear, now I see it... and it's truly horrible! :-D
I thought the various FeatureTypeStyle had a different FeatureTypeName, but it's just a different Name instead. FeatureTypeStyles are very heavy objects rendering wise, you should not use them as mere classifiers. Every time you create a FeatureTypeStyle, a new z level in the map is created.

So creating a new z level for each FeatureTypeStyle is pretty much what was intended.


This means that even in the best of conditions, with that style GeoServer would be allocating tens of drawing surfaces, with an insane memory usage going with it (I think I see 42 FeatureTypeStyles, for a 4x4 metatile , 1024x1024, 4 bytes per pixel, that would be 168MB of RAM (you don't get that high, see below, the stacks of rendering surfaces are actually split in two).

Now, that's indeed very bad. I do need to rewrite things.


So why is it doing two queries anyways? Because you have two different names for the sortGroup, which makes the various feature type styles un-mergeable.

Oh OK, now I see it ! Nice pick Andrea !


Do yourself a favor and, if possible, use a single FeatureTypeStyle instead ;-)

OK, I understand the problem now, very clear.
The problem is that I do need to order all these features the way I did (i.e., for instance, 'water' on top of 'wood').

So, from what you say, the "right" way to do this would be to use a single FeatureTypeStyle for the first sortByGroup, and use a zOrder and add the appropriate column in my datasource ?

For the second sortByGroup, I need to have many things ordered (i.e. road casing and roads going over/under buildings. So in this case, I believe I do need one FeatureTypeStyle per road type and a sortbygroup, right ?


Thanks a lot for your help Andrea !

Cheers

--
Arnaud


_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to