I've created SLD style for GeoServer and send it to GeoServer. But after sending GeoServer change it to another SLD. It is source SLD I send

<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
                            <CssParameter name="fill">#ff0000</CssParameter>
                            <CssParameter name="fill-opacity">1</CssParameter>
                            <CssParameter name="stroke">#000000</CssParameter>
                            <CssParameter name="stroke-width">1</CssParameter>
                                <gml:Polygon gml:id="polygon.1" gml:srsName="http://www.opengis.net/def/crs/EPSG/0/26713">

and it is when GeoServer generate

<?xml version="1.0" encoding="UTF-8"?><sld:StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" version="1.0.0">
    <sld:Name>Default Styler</sld:Name>
      <sld:Name>Default Styler</sld:Name>
                    <gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" "/>
              <sld:CssParameter name="fill">#ff0000</sld:CssParameter>

What is the problem and what format should I use to filter SLD by polygon coordinates?

1 Answer 1


There are at least two problems with your input SLD:

  1. You have told the parser that you are using GML 2 but are passing in GML 3 so GeoServer is ignoring the bits that it doesn't expect. So you should send a Polygon like:

                 <gml:coordinates  decimal="." cs="," ts=" ">
                    51.443481,32.625497 51.443481,32.971804 52.146606,32.971804 52.146606,32.625497 51.443481,32.625497
  2. The Filter element should come before the Symbolizer the order of the elements is fixed in the SLD standard and the XML schema. But GeoServer is relaxed about reading that so it less of a problem.

And if you are sticking with GML3 then the PosList should not have commas between the values.

  • tnx bro . how do u understand it's gml2 or gml3?
    – hamed
    Jul 31, 2021 at 14:24
  • Because the standard specifies which one to use and that form of a polygon changed between them.
    – Ian Turton
    Jul 31, 2021 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.