[Geoserver-users] limit to the number of rules on a sld file

Hello and a happy new year!

I would like to know if there is a limit to the number of rules / filters on a sld file that we import into geoserver.
I ask because the sld file has around 430 diferent rules, based on a field that defines the colorindex of a dng file imported into a postgis/postgres database.
If I reduce the same file to about 20 rules, it works well, and shows the openlayers preview. But with the 430 rules file, the browser prompts to save a wms file …

Any ideas?

Thank you

Carlos Sousa

Server Setup:
HP Proliant DL350 - Xeon 5530 x 2 - 8GB ram - 156gb HDD
Ubuntu 12.04.3 LTS Server (default LAMP setup) + Postgres 9.1.9 / Postgis 2.0 + Geoserver 2.4.3 + Tomcat7 + Oracle Java 7

original_co.qml (303 KB)

subset_co.sld (8.02 KB)

Hi Carlos,
The “original_co” you attached is a QML file (from QGIS I assume), rather than an SLD. Did you export it wrong? I wasn’t aware GeoServer could load them.
Cheers,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

On 2 January 2014 09:59, carlos sousa <carlozousa@anonymised.com> wrote:

Hello and a happy new year!

I would like to know if there is a limit to the number of rules / filters on a sld file that we import into geoserver.
I ask because the sld file has around 430 diferent rules, based on a field that defines the colorindex of a dng file imported into a postgis/postgres database.
If I reduce the same file to about 20 rules, it works well, and shows the openlayers preview. But with the 430 rules file, the browser prompts to save a wms file …

Any ideas?

Thank you

Carlos Sousa

Server Setup:
HP Proliant DL350 - Xeon 5530 x 2 - 8GB ram - 156gb HDD
Ubuntu 12.04.3 LTS Server (default LAMP setup) + Postgres 9.1.9 / Postgis 2.0 + Geoserver 2.4.3 + Tomcat7 + Oracle Java 7


Rapidly troubleshoot problems before they affect your business. Most IT
organizations don’t have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,
Well, the first thing obviously “wrong” is that QGIS sees to have nested statements in there. At least it seems superfluous. For example you have:

ogc:Filter
ogc:And
ogc:And
ogc:And
ogc:PropertyIsEqualTo
ogc:PropertyNamelevel</ogc:PropertyName>
ogc:Literal15</ogc:Literal>
</ogc:PropertyIsEqualTo>
ogc:PropertyIsEqualTo
ogc:PropertyNamestyle</ogc:PropertyName>
ogc:Literal0</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
ogc:PropertyIsEqualTo
ogc:PropertyNameweight</ogc:PropertyName>
ogc:Literal0</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
ogc:PropertyIsEqualTo
ogc:PropertyNamecolorindex</ogc:PropertyName>
ogc:Literal3</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>

You only need the outer set I believe (it passes validation with and without the extras, but you can cull about 10% of the lines this way). You may want to report that as a bug to the QGIS tracker.

That said, I can upload it to my test GeoServer just fine. GeoServer 2.4.3 on a Windows Server and using the FireFox browser.
What happens if you use the “Browse” button at the bottom of your “New Style” page? It works for me and as noted, passes validation.

(Having ~16,000 lines, it does highlight that GeoServer’s style editor only expects <=9999 lines for line numbering :slight_smile: ).

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

Regards,
Jonathan