Ticket #866 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

problem with genrated sld for polygon layer

Reported by: assefa Owned by: mapserverbugs
Priority: high Milestone:
Component: WMS Server Version: 4.3
Severity: normal Keywords:
Cc:

Description

Iniital e-mail by "Van Ulden, Joost" <jvanulde@nrcan.gc.ca>

I am exploring the SLD support in more detail and have a question regarding
the output from the mapscript generatesld function.

For a polygon class I get the following:

<Rule>
	<ogc:Filter>
		<ogc:PropertyIsEqualTo>
			<ogc:PropertyName>TECUNIT</ogc:PropertyName>
			<ogc:Literal>DTrd</ogc:Literal>
		</ogc:PropertyIsEqualTo>
	</ogc:Filter>
	<PolygonSymbolizer>
	<Fill>
		<GraphicFill>
		<Graphic>
			<Mark>
				<WellKnownName>square</WellKnownName>
				<Fill>
				<CssParameter
name="fill">#6600ff</CssParameter>
				</Fill>
				<Stroke>
					<CssParameter
name="Stroke">#000000</CssParameter>
				</Stroke>
			</Mark>
			<Size>1</Size>
		</Graphic>
		</GraphicFill>
		<CssParameter name="fill">#6600ff</CssParameter>
	</Fill>
	<Stroke>
		<CssParameter name="stroke">#000000</CssParameter>
	</Stroke>
	</PolygonSymbolizer>
</Rule>

I am wondering why it is using a marker fill when my mapfile class looks
like this:

  CLASS
    NAME "DTrd" 
    EXPRESSION "DTrd"
    COLOR 102 0 255
    OUTLINECOLOR 0 0 0
  END

Am I doing something wrong?  I was expecting something closer to:

<Rule>
	<ogc:Filter>
		<ogc:PropertyIsEqualTo>
			<ogc:PropertyName>TECUNIT</ogc:PropertyName>
			<ogc:Literal>DTrd</ogc:Literal>
		</ogc:PropertyIsEqualTo>
	</ogc:Filter>
	<PolygonSymbolizer>
	<Fill>
		<CssParameter name="fill">#6600ff</CssParameter>
	</Fill>
	<Stroke>
		<CssParameter name="stroke">#000000</CssParameter>
	</Stroke>
	</PolygonSymbolizer>
</Rule>

Change History

Changed 9 years ago by assefa

  • status changed from new to closed
  • resolution set to fixed
This is fixed in CVS version 1.39 in mapogcsld.c.   test layer looks like :

 LAYER
  NAME bathymetry
  TYPE POLYGON
  STATUS ON
  CLASSITEM TECUNIT
CLASS
    NAME "DTrd" 
    EXPRESSION "DTrd"
    COLOR 102 0 255
    OUTLINECOLOR 0 0 0
  END
END

 Generated sld is :

<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" 
xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" 
xmlns:xlink="http://www.w3.org/1999/xlink" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.opengis.net/sld 
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>bathymetry</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<ogc:Filter><ogc:PropertyIsEqualTo><ogc:PropertyName>TECUNIT</ogc:PropertyName>
<ogc:Literal>DTrd</ogc:Literal></ogc:PropertyIsEqualTo></ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#6600ff</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>

</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
 
Note: See TracTickets for help on using tickets.