Empty KML output with very large layers in version 2.1.0, not in 2.0.3

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Empty KML output with very large layers in version 2.1.0, not in 2.0.3

Boxmer
After upgrading from 2.0.3 to 2.1.0 and migrating data (all in Postgis database), we noticed that KML output for very large layers (ie that come from shapefiles from thousands of small polygons) comes out empty. On version 2.0.3 and 2.02 we had no problems downloading KMLs, although some very large (over 50MB).  Each layer has its own style as sld, which is fairly simple with a legend. On 2.0.3 the KML would download and display correctly with its style. On 2.1.0, the KML request sent to Geoserver returns an empty KML with just a heading. Nothing shows up in GeoServer logs. We had to downgrade until we can solve this. I have replicated the error with many other large layers in my localhost GeoServer. Smaller layers (size, no. of features)seem to have no problem. I have both versions running on Tomcat 6. I use &mode=download at the end of the request to obtain complete KML independent from the database. With 2.0.3 KML downloads complete and opens ok, with 2.1.0=empty output. What changed from one version to another that it no loger works? How to fix this?
I noticed that cnanging the style of those huge layers to a flat, simple color does the trick, but each layer needs to have its own legend and colors. The sld (below) is simple enough so I don't know why would it cause to fail and only in version 2.1.0.
Here are the examples:
 
E.g. request url:
http://localhost:8083/geoserver210/cite/wms/kml?layers=cite:liondistrib&legend=true&mode=download

Results in kml:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/kml/2.2 http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd"/>

Ends there, so it's just returning the heading. Nothing more.

Same request in Geoserver 2.0.3 and 2.0.2 returns complete KML with all geometries (too large to copy paste here but just the first lines:)

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/kml/2.2 http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd">
   <Document>
      <name>liondistrib</name>
      <Document xmlns:atom="http://purl.org/atom/ns#">
         <name>liondistrib</name>
         <Placemark id="liondistrib.1">
            <name>
<![CDATA[liondistrib.1]]>
</name>
            <description>
<![CDATA[<h4>liondistrib</h4>
<ul class="textattributes">
  <li><strong><span class="atr-name">area</span>:</strong> <span class="atr-value">2.64547139466990</span></li>
  <li><strong><span class="atr-name">perimeter</span>:</strong> <span class="atr-value">107.138858879165</span></li>
  <li><strong><span class="atr-name">cov_</span>:</strong> <span class="atr-value">2</span></li>
  <li><strong><span class="atr-name">cov_id</span>:</strong> <span class="atr-value">1</span></li>
  <li><strong><span class="atr-name">value</span>:</strong> <span class="atr-value">0</span></li>
  <li><strong><span class="atr-name">class_name</span>:</strong> <span class="atr-value">Potential distribution</span></li>  
</ul>
]]>
</description>
            <LookAt>
               <longitude>-89.11942829238805</longitude>
               <latitude>19.078508357803443</latitude>
               <heading>10.0</heading>
               <tilt>10.0</tilt>
               <range>700</range>
            </LookAt>
            <Style> <IconStyle> <color>00ffffff</color> <scale>0.4</scale> <Icon> <href>http://icons.opengeo.org/markers/icon-poly.1.png</href> </Icon> </IconStyle> <LabelStyle> <color>00ffffff</color> </LabelStyle> <PolyStyle> <color>ff2fad92</color> <outline>0</outline> </PolyStyle> </Style>            <MultiGeometry>
               <Point>
                  <coordinates>-89.11942829238805,19.078508357803443</coordinates>
               </Point>
               <Polygon>
                  <outerBoundaryIs>
                     <LinearRing>
                        <coordinates>-90.75385037,18.44911881 -90.75411977,18.44913901 -90.75414094,18.44888191 -90.75441033,18.44890211 -90.7544315,18.44864501 -90.7547009,18.44866521 -90.75472206,18.44840811 -90.75499146,18.44842831 -90.75501262,18.44817121 -90.75528202,18.44819141 -90.75530318,18.44793431 -90.75557258,18.44795451
---CODE SNIPPED-----

Stylesheet SLD used to show legend and colors:

<?xml version="1.0" encoding="iso-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld 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>liondistrib</Name>
  <UserStyle>
   <Name>liondistrib</Name>
   <Title>Lion distribution</Title>
   <Abstract>  Summary </Abstract>
   <FeatureTypeStyle>
    <FeatureTypeName>liondistrib</FeatureTypeName>
    <Rule>
     <Title>Inadequate habitat</Title>
     <ogc:Filter>
      <ogc:PropertyIsEqualTo>
       <ogc:PropertyName>class_name</ogc:PropertyName>
       <ogc:Literal>Inadequate habitat</ogc:Literal>
      </ogc:PropertyIsEqualTo>
     </ogc:Filter>
     <PolygonSymbolizer>
      <Fill>
       <CssParameter name="fill">#92ad2f</CssParameter>
      </Fill>
     </PolygonSymbolizer>
    </Rule>
    <Rule>
     <Title>Adquate habitat</Title>
     <ogc:Filter>
      <ogc:PropertyIsEqualTo>
       <ogc:PropertyName>class_name</ogc:PropertyName>
       <ogc:Literal>Adequate habitat</ogc:Literal>
      </ogc:PropertyIsEqualTo>
     </ogc:Filter>
     <PolygonSymbolizer>
      <Fill>
       <CssParameter name="fill">#b7ff00</CssParameter>
      </Fill>
     </PolygonSymbolizer>
    </Rule>
   </FeatureTypeStyle>
  </UserStyle>
 </NamedLayer>
</StyledLayerDescriptor>