1

I currently use Leaflet as client of WMS server. I need to get MNT layer 1m. IGN WMS Server : https://wxs.ign.fr/altimetrie/geoportail/r/wms The layer I want to get is RGEALTI-MNT_PYR-ZIP_FXX_LAMB93_WMS. You can find the doc : https://geoservices.ign.fr/services-web-experts-altimetrie. I need a custom dynamic styling of this layer. I tried to use the argument SLD_BODY :

<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>RGEALTI-MNT_PYR-ZIP_FXX_LAMB93_WMS</Name>
            <UserStyle>
                <Title>SLD Cook Book: Simple polygon with stroke</Title>
                <IsDefault>1</IsDefault>
                <FeatureTypeStyle>
                    <Rule>
                        <RasterSymbolizer>
                            <Geometry>
                                <ogc:PropertyName>grid</ogc:PropertyName>
                            </Geometry>
                            <ColorMap  type="ramp">
                                <ColorMapEntry color="#30123b" quantity="8908597" label="8908597,0000" opacity="1.0"/>
                                <ColorMapEntry color="#321543" quantity="8917234.7707183" label="8917234,7707" opacity="1.0"/>
                            </ColorMap>
                            <ContrastEnhancement/>
                        </RasterSymbolizer>
                    </Rule>
                </FeatureTypeStyle>
            </UserStyle>
        </NamedLayer>  
</StyledLayerDescriptor>

I tried to make a random request with bbox but it return a black and white style, the default style. Is there a way to know if the WMS server support sld_body? What am I do wrong?

2
  • It is rather uncommon to support SLD_BODY because it may lead to heavy queries on the server side and other security issues. One possible way to check would be to make a GetStyles request but at least my GeoServer seems to support it only with WMS 1.1.0, not 1.3.0. That server answers only "Resource parameter not found" but I do not know what the error means. So I suggest to contact IGN and ask.
    – user30184
    Commented Jan 14, 2023 at 14:30
  • 1
    I contacted IGN and there is no support of SLD_BODY. There is risk of security.
    – Kareivis
    Commented Jan 31, 2023 at 23:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.