TransWikia.com

Length limit to GeoServer SLD files in QGIS?

Geographic Information Systems Asked on July 27, 2021

I’m symbolizing a polygon layer by an attribute called kkod. I’ve copy pasted the FeatureTypeStyle block about 10 times for each kkod but the 11th time the WMS layer is no longer symbolized in QGIS, but it is valid and visible in layer preview in GeoServer.

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"
  xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <NamedLayer>
    <Name>tk_my</Name>
    <UserStyle>
      <Title>A dark orange polygon style</Title>
     <FeatureTypeStyle>
       <Rule>
         <Name>Vattenyta</Name>
         <ogc:Filter>
           <ogc:PropertyIsEqualTo>
             <ogc:PropertyName>kkod</ogc:PropertyName>
             <ogc:Literal>1</ogc:Literal>
           </ogc:PropertyIsEqualTo>
         </ogc:Filter>
       <PolygonSymbolizer>
         <Fill>
           <CssParameter name="fill">#bed4eb</CssParameter>
         </Fill>
         <Stroke>
           <CssParameter name="stroke">#bed4eb</CssParameter>
           <CssParameter name="stroke-width">1</CssParameter>
         </Stroke>
       </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>

many more

     <FeatureTypeStyle>
       <Rule>
         <Name>Låg bebyggelse</Name>
         <ogc:Filter>
           <ogc:PropertyIsEqualTo>
             <ogc:PropertyName>kkod</ogc:PropertyName>
             <ogc:Literal>14</ogc:Literal>
           </ogc:PropertyIsEqualTo>
         </ogc:Filter>
       <PolygonSymbolizer>
         <Fill>
           <CssParameter name="fill">#fadaa2</CssParameter>
         </Fill>
         <Stroke>
           <CssParameter name="stroke">#fadaa2</CssParameter>
           <CssParameter name="stroke-width">0.5</CssParameter>
         </Stroke>
       </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
      
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

I’ve looked in the very long log, can it be this that is causing the problem?

Request: getServiceInfo
2021-07-15 11:37:15,641 ERROR [geoserver.ows] - 
org.geoserver.platform.ServiceException: Rendering request would use 71895KB, whilst the maximum memory allowed is 65536KB

One Answer

GeoServer has service limits avoiding the usage of too much memory. Each FeatureTypeStyle makes the rendering engine allocate one more rendering surface, to handle them as Z levels. At 11 of them, the memory limit kicks in and the server refuses to answer your request.

You can adjust it in Services-WMS

Correct answer by Andrea Aime on July 27, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP