Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I have a raster image and the coordinates of its four corner pixels. My goal is to warp the image with respect to this coordinates ("georectify") on the fly when requested via GeoServer to display in OpenLayers.

Inspired by this discussion list, my idea was to do the following in GeoServer:

  1. Create a WorldImage layer (raster + text file with geodata)
  2. Create a Styled Layer Descriptor (SLD) calling the Web Processing Service (WPS) GeorectifyCoverage which "georectifies a raster via Ground Control Points using gdal_warp".
  3. Apply the SLD to the layer.


When I request the layer for example via the OpenLayers preview, it throws an error reporting:

Could not convert the value EPSG:32632 into the expected type interface for parameter targetCRS

Oddly enough, when I use the "WPS request builder" (in the GeoServer Web Application) to call GeorectifyCoverage with the same parameters, it gives the right output. So the error must originate somewhere from my SLD document below.

Can anybody give me a clue what might be wrong with it?

Additional Info

SLD document calling WPS rendering transformation GeorectifyCoverage:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation=" StyledLayerDescriptor.xsd" xmlns="" xmlns:ogc="" xmlns:xlink="" xmlns:xsi="">
            <Title>Georectify Coverage</Title>
            <Abstract>Warps image to specified GCP</Abstract>
                    <ogc:Function name="gs:GeorectifyCoverage">
                        <ogc:Function name="parameter">
                        <ogc:Function name="parameter">
                            <ogc:Literal>[[[0, 0], [308639.500, 5154180.500]], [[0, 450], [308639.500, 5150929.500]], [[600, 0], [315730.500, 5154180.500]], [[600, 450], [315730.500, 5150929.500]]]</ogc:Literal>
                        <ogc:Function name="parameter">

where GeorectifyCoverage requires the following input:

  • data: input raster (my layer name)
  • gcp: List of Ground control points (my corner coordinates)
  • targetCRS: system to use for the output raster (my CRS corresponding to the GCP)


  • When I call a different WPS function like Contour using the same document structure and raster image it works perfectly.
  • When I change EPSG:32632 to EPSG:4326 the same error is reported.
  • Changing the raster format (jpeg, TIFF) does not helo.
  • Processing the same data offline with the command line tools gdal_translate (assign GCPs) and gdalwarp results in the desired output.

My System:

  • Ubuntu 12.04
  • OpenGeo Suite 3.0.2
  • GeoServer 2.2

Alternative approaches using OpenGeo would also be welcome.

share|improve this question
up vote 1 down vote accepted

I asked the same on the GeoServer User mailing list and the GeoSolutions founder Simone Giannecchini himself suggested me the following workaround:

Instead of specifying the input parameter targetCRS as a <ogc:Literal>, one could pass it to the function via a WMS request. This can be achieved using Variable substitution in SLD, i.e., defining targetCRS in the SLD (here called georectify) as a env request parameter (here wms_crs)

<ogc:Function name="parameter">
        <ogc:Function name="env">

and then pass down the actual value (EPSG:32632) through a WMS request like in


We tried that out and it worked.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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