Hi,
I want to reproject data via sld:
<?xml version="1.0" encoding="ISO-8859-1"?>
<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>RAIN_SLD</Name>
    <UserStyle>
      <Title>RAIN</Title>
      <FeatureTypeStyle>
        <Transformation>
          <ogc:Function name="gs:BufferFeatureCollection">
            <ogc:Function name="parameter">
              <ogc:Literal>features</ogc:Literal>
              <ogc:Function name="gs:Reproject">
                <ogc:Function name="parameter">
                  <ogc:Literal>features</ogc:Literal>
                </ogc:Function> <!-- end parameter -->
                <ogc:Function name="parameter">
                  <ogc:Literal>forcedCRS</ogc:Literal>
                  <ogc:Literal>EPSG:4326</ogc:Literal>
                </ogc:Function> <!-- end parameter -->
                <ogc:Function name="parameter">
                  <ogc:Literal>targetCRS</ogc:Literal>
                  <ogc:Literal>EPSG:900913</ogc:Literal> <!-- end parameter -->
                </ogc:Function> <!-- end targetCRS -->
              </ogc:Function> <!-- end reporject -->
            </ogc:Function> <!-- end parameter -->
            <ogc:Function name="parameter">
              <ogc:Literal>distance</ogc:Literal>
              <ogc:Function name="env">
                <ogc:Literal>BUFFER_DIS</ogc:Literal>
                <ogc:Literal>10000</ogc:Literal>
              </ogc:Function>
            </ogc:Function> <!-- end parameter -->
          </ogc:Function>
        </Transformation>

        <Rule>
          <Name>BUFFER</Name>
          <Title>BUFFER</Title>
          <ogc:Filter>
            <ogc:PropertyIsEqualTo>
              <ogc:PropertyName>SN</ogc:PropertyName>
              <ogc:Literal>A0001</ogc:Literal>
            </ogc:PropertyIsEqualTo>
          </ogc:Filter>

          <PolygonSymbolizer>
            <Stroke>
              <CssParameter name="stroke">#d3d3d3</CssParameter>
              <CssParameter name="stroke-width">2</CssParameter>
            </Stroke>
          </PolygonSymbolizer>

          <PointSymbolizer>
            <Graphic>
              <Mark>
                <WellKnownName>circle</WellKnownName>
                <Fill>
                  <CssParameter name="fill">#ff0000</CssParameter>
                </Fill>
              </Mark>
              <Size>6</Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>


When i requested the layer with the SLD above, i got an error:

Could not convert the value EPSG:4326 into the expected type interface 
org.opengis.referencing.crs.CoordinateReferenceSystem for parameter forcedCRS.

I found an example: Geoserver: Georectification via SLD fails

It is useful. But in my situation, 2 CRSs(forcedCRS and targetCRS) must be set.

How could I do with it?


GeoServer:
        Version 2.5.1
        Git version: d0961aa9d87ccaca185b89b339d053ae91a6fa35
        GeoTools version: 11.1 (rev d0db3a062cbcf1e6751db061d5b347e0af228ce6)
        GeoWebCache version: 1.5.2 (rev 
1.5.x/aac4b4f7ad149a4d36df3997e21709501ce56186)
Best regards,
L
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to