Rendering a layer using a 16-featuretypestyle SLD takes about 16 times as much memory as using a style with one featuretypestyle. Where you don't actually care about the stacking order, you should keep things in a single featuretypestyle.
It looks like no two rules from your style will affect the same feature, so it should be safe for you to consolidate into one featuretypestyle; this should help things a lot.
The error appears to be with my SLD. I currently have 16 FeatureTypeStyle
elements. If I add one more the problem appears. If I remove it again, then
everything works. So it seems like there is a limit to the number of
FeatureTypeStyle elements allowed in a SLD. Is this the case? If so, is
there a way to use multiple SLD's for a layer? My SLD is listed below.
thanks
Dan
<?xml version="1.0" encoding="UTF-8"?>
<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>Entities</Name>
<UserStyle>
<Name>Entities</Name>
<Title>C2 Entities</Title>
<!--
<FeatureTypeStyle>
<Rule>
<Title>Entities</Title>
<TextSymbolizer>
<Label>
<ogc:PropertyName>NAME</ogc:PropertyName>
</Label>
<CssParameter name="font-family">Times New
Roman</CssParameter>
<CssParameter name="font-style">Normal</CssParameter>
<CssParameter name="font-size">8</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
<LabelPlacement>
<PointPlacement>
<Displacement>
<DisplacementX>0</DisplacementX>
<DisplacementY>10</DisplacementY>
</Displacement>
</PointPlacement>
</LabelPlacement>
<Fill>
<CssParameter name="fill">#FFFF00</CssParameter>
<CssParameter name="fill-opacity">1.0</CssParameter>
</Fill>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
-->
<!-- NFAC -->
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>NFAC</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="icon21.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>26</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>NAS</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="icon21.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>26</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- MISSION SEVERITY 1 -->
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POLYGON</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#00FF00</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POINT</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="jet.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>26</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>PATH</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#00FF00</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-opacity">1.0</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- MISSION SEVERITY 2 -->
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>2</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POLYGON</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#0000FF</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>2</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POINT</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="jet.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>26</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>2</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>PATH</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#0000FF</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-opacity">1.0</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- MISSION SEVERITY 3 -->
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POLYGON</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#FF9900</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POINT</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="jet.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>26</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>3</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>PATH</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#FF9900</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-opacity">1.0</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- MISSION SEVERITY 4 -->
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>4</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POLYGON</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#FFFF00</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>4</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POINT</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="jet.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>26</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>4</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>PATH</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#FFFF00</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-opacity">1.0</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
<!-- MISSION SEVERITY 5 -->
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>5</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POLYGON</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
<CssParameter name="fill-opacity">0.5</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>5</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>POINT</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple"
xlink:href="jet.png"/>
<Format>image/png</Format>
</ExternalGraphic>
<Opacity>
<ogc:Literal>1.0</ogc:Literal>
</Opacity>
<Size>
<ogc:Literal>26</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter xmlns:gml="http://www.opengis.net/gml">
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>MISSION</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>SEVERITY</ogc:PropertyName>
<ogc:Literal>5</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>GEOMETRY_TYPE_ID</ogc:PropertyName>
<ogc:Literal>PATH</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:And>
</ogc:Filter>
<LineSymbolizer>
<Stroke>
<CssParameter name="stroke">#FF0000</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
<CssParameter name="stroke-opacity">1.0</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Andrea Aime-4 wrote:
Dan MacLeod ha scritto:
I tried to view my layer using KML and recieved the error below. Does
anyone
know what would cause this error? My layer only has about 50 features in
it.
For some reason the KMZ map producer is trying to build a raster overlay
that would require 65MB of memory to be generated, which is an insane
size, roughly 8300x8300. The maximum render size protection triggers
and disallows such a big raster to be created
Now sure why such a big raster is required, but you can try to increase
the maximum memory allowed for a single request.
If you can share the dataset and the sld please attach them to a
bug report at jira.codehaus.org, so that we can have a look at it
when time allows.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users