Opened 15 years ago

#3021 new defect

SLD: expression is not exported inside the <rule>

Reported by: sholl Owned by: sdlime
Priority: normal Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc:

Description

When exporting the following mapfile-layer as an SLD using generateSLD() from python mapscript, the resulting SLD lacks a filter-property inside the <rule> to classify the the layer correctly:

LAYER
    CONNECTION "xx/xx@xx"
    CONNECTIONTYPE ORACLESPATIAL
    DATA "geom from ISAL..."
     METADATA
        "wms_srs"       "EPSG:325833"
        "wms_layer_group"
"/Fachinfo/Umwelt/Boden_und_Abfallwirtschaft/Kom: Altlast"
        "wms_extent"    "3376670 5693050 3412800 5742770"
        "wms_title"     "Altlast: Typ"
      END
    NAME "altlast_typ"
    SIZEUNITS PIXELS
    STATUS ON
    TOLERANCE 10
    TOLERANCEUNITS PIXELS
    TRANSPARENCY 100
    TYPE POINT
    UNITS METERS
#    CLASSITEM CODE
    CLASS
      EXPRESSION ('[CODE]'>='70000' and '[CODE]'<'80000')
      NAME "Stoffl. schaedl. Bodenveraenderung: saniert"
      MINSCALE 50000
      METADATA
      END
      STYLE
        SIZE 7
        COLOR 0 0 0
        SYMBOL "triangle"
      END
      TEMPLATE "../html/altlast_typ.html"
    END
    [...]
END

The resulting SLD looks like the following:

<StyledLayerDescriptor xmlns="http://www.opengis.net/sld"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc" xml
ns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://ww w.opengis.net/sld
http://10.224.1.83/schemas/sld/1.0.0/StyledLayerDescriptor.xsd">  
<NamedLayer> 
 <Name>altlast_typ</Name> 
 <UserStyle> <FeatureTypeStyle>
 <Rule> 
  <Name>Stoffl. schaedl. Bodenveraenderung: saniert</Name>
          <MinScaleDenominator>50000.000000</MinScaleDenominator>
          <PointSymbolizer>
            <Graphic>
              <Mark>
                <WellKnownName>triangle</WellKnownName>
                <Fill>
                  <CssParameter name="fill">#0000ff</CssParameter>
                </Fill>
              </Mark>
              <Size>7</Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
[...]
     </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Change History (0)

Note: See TracTickets for help on using tickets.