Hello,
I'm trying to call WMS GetMap using HTTP POST and a custom SLD Style in HTTP 
POST Body.
This is my call:

URL: http://localhost:8080/geoserver/wms
Body: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<ogc:GetMap xmlns:ogc="http://www.opengis.net/ows";
            xmlns:gml="http://www.opengis.net/gml";
   version="1.1.1" service="WMS">
   <StyledLayerDescriptor version="1.0.0">
        <NamedLayer>
            <Name>cite:TC2M_HOURLY</Name>
            <UserStyle>
                <name>test</name>
                <IsDefault>1</IsDefault>
                <FeatureTypeStyle>
                    <Transformation>
                        <ogc:Function name="gs:CropCoverage">
                            <ogc:Function name="parameter">
                                <ogc:Literal>coverage</ogc:Literal>
                            </ogc:Function>
                            <ogc:Function name="parameter">
                                <ogc:Literal>cropShape</ogc:Literal>
                                <ogc:Literal>POLYGON((11 42, 12 44, 13 43, 11 
42))</ogc:Literal>
                            </ogc:Function>
                        </ogc:Function>
                    </Transformation>
                </FeatureTypeStyle>
            </UserStyle>
        </NamedLayer>
   </StyledLayerDescriptor>
   <BoundingBox srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
      <gml:coord><gml:X>3</gml:X><gml:Y>35</gml:Y></gml:coord>
      <gml:coord><gml:X>20</gml:X><gml:Y>48</gml:Y></gml:coord>
   </BoundingBox>
   <Output>
      <Format>image/png</Format>
      <Size><Width>550</Width><Height>250</Height></Size>
   </Output>
</ogc:GetMap>

The HTTP invocation return status 200 and a blank PNG image.
The same xml woks well used in a defined style:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" 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"; 
xmlns:wcs="http://www.opengis.net/wcs/1.1.1";
  xsi:schemaLocation="http://www.opengis.net/sld 
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd";>
  <NamedLayer>
    <Name>Temperature</Name>
    <UserStyle>
      <Name>Temperature</Name>
      <Title>Temperature</Title>
      <Abstract>Style for Temperature</Abstract>
      <FeatureTypeStyle>
        <FeatureTypeName>Feature</FeatureTypeName>
        <Transformation>
            <ogc:Function name="gs:CropCoverage">
              <ogc:Function name="parameter">
                <ogc:Literal>coverage</ogc:Literal>
              </ogc:Function>
              <ogc:Function name="parameter">
                <ogc:Literal>cropShape</ogc:Literal>

                <ogc:Literal>POLYGON((11 42, 12 44, 13 43, 11 42))</ogc:Literal>

              </ogc:Function>
            </ogc:Function>
        </Transformation>
        <Rule>
          <RasterSymbolizer>
            <Opacity>1</Opacity>

            <ChannelSelection>
              <GrayChannel>
                <SourceChannelName>1</SourceChannelName>
              </GrayChannel>
            </ChannelSelection>
            <ColorMap>
              <ColorMapEntry color="#000000" quantity="-30000" opacity="1.0"/>
              <ColorMapEntry color="#000000" quantity="0" opacity="1.0"/>
              <ColorMapEntry color="#0000FF" quantity="5" opacity="1.0"/>
              <ColorMapEntry color="#00BFFF" quantity="10" opacity="1.0"/>
              <ColorMapEntry color="#FFFF00" quantity="20" opacity="1.0"/>
              <ColorMapEntry color="${env('col','#FF0000')}" quantity="30" 
opacity="1.0"/>
            </ColorMap>
          </RasterSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Could you help me with this issue?
Tks
BR


Donato Nicoletti
Manager

Storm Reply
Via Nizza, 262 - Int. 26/56
10126 - Torino - ITALY
phone: +39 011 29100
mobile: +39 349 5307739
d.nicole...@reply.it<mailto:d.nicole...@reply.it>
www.reply.it<http://www.reply.it> <http://>

[Storm Reply]

Attachment: storm.png
Description: storm.png

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to