[Geoserver-users] Geoserver: Georectification via SLD fails

Hello Geoserver User List,

I encountered an error message when trying to warp a raster layer "on the
fly" using SLD. It should call the function "GeorectifyCoverage" and apply a
rendering transformation to the image based on some Ground Control Points
(GCP):

                <Transformation>
                    <ogc:Function name="gs:GeorectifyCoverage">
                        <ogc:Function name="parameter">
                            <ogc:Literal>data</ogc:Literal>
                        </ogc:Function>
                        <ogc:Function name="parameter">
                            <ogc:Literal>gcp</ogc:Literal>
                            <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>
                        <ogc:Function name="parameter">
                            <ogc:Literal>targetCRS</ogc:Literal>
                            <ogc:Literal>EPSG:32632</ogc:Literal>
                        </ogc:Function>
                    </ogc:Function>
                </Transformation>

Unfortunately it reports upon request from OpenLayers:

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

Nobody was able to even give me a hint on how to tackle that, so I address
myself to you in this matter. More details on my question can be found on
GIS Stackexchange
<http://gis.stackexchange.com/questions/65162/geoserver-georectification-via-sld-fails&gt;
.

Best,
xandriksson

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-Georectification-via-SLD-fails-tp5064734.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao,
I have asked Daniele (who worked on this implementation) to check the
process to see if it can be used as is as a Rendering Transformation
(which means inside an SLD for doing
the GeoRectification on the fly). We'll keep you posted.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

On Mon, Jul 8, 2013 at 4:18 PM, alsteine <alsteine@anonymised.com> wrote:

Hello Geoserver User List,

I encountered an error message when trying to warp a raster layer "on the
fly" using SLD. It should call the function "GeorectifyCoverage" and apply a
rendering transformation to the image based on some Ground Control Points
(GCP):

                <Transformation>
                    <ogc:Function name="gs:GeorectifyCoverage">
                        <ogc:Function name="parameter">
                            <ogc:Literal>data</ogc:Literal>
                        </ogc:Function>
                        <ogc:Function name="parameter">
                            <ogc:Literal>gcp</ogc:Literal>
                            <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>
                        <ogc:Function name="parameter">
                            <ogc:Literal>targetCRS</ogc:Literal>
                            <ogc:Literal>EPSG:32632</ogc:Literal>
                        </ogc:Function>
                    </ogc:Function>
                </Transformation>

Unfortunately it reports upon request from OpenLayers:

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

Nobody was able to even give me a hint on how to tackle that, so I address
myself to you in this matter. More details on my question can be found on
GIS Stackexchange
<http://gis.stackexchange.com/questions/65162/geoserver-georectification-via-sld-fails&gt;
.

Best,
xandriksson

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-Georectification-via-SLD-fails-tp5064734.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi,

you are direcly specifying the crs as a literal, therefore I think it doesn’t properly convert the provided CRS code to a proper CoordinateReferenceSystem object.
(We will check whether a proper converter exists for that, in the next days.)

You should let it take from the request. Please, check the attached examples.

warp.wps.xml represents a WPS request to be posted.

warp.sld.xml represents the SLD doing the renderingTransformation using the georectifyProcess.

As you can see, it deals with some env function which pass down the values using the parameter substitution mechanism.

As an instance,/geoserver/wms?LAYERS=mylayer&…&srs=EPSG:32632&env=gcp:values

width, height, bbox, crs are directly taken from the WMS request’s parameters.

Hope this helps.

Cheers,
Daniele

warp.wps.xml (2.21 KB)

warp.sld.xml (2.03 KB)

···

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Thu, Jul 11, 2013 at 10:46 AM, Simone Giannecchini <simone.giannecchini@anonymised.com> wrote:

Ciao,
I have asked Daniele (who worked on this implementation) to check the
process to see if it can be used as is as a Rendering Transformation
(which means inside an SLD for doing
the GeoRectification on the fly). We’ll keep you posted.

Regards,
Simone Giannecchini

Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


On Mon, Jul 8, 2013 at 4:18 PM, alsteine <alsteine@anonymised.com> wrote:

Hello Geoserver User List,

I encountered an error message when trying to warp a raster layer “on the
fly” using SLD. It should call the function “GeorectifyCoverage” and apply a
rendering transformation to the image based on some Ground Control Points
(GCP):

data gcp [[[0, 0], [308639.500, 5154180.500]], [[0, 450], [308639.500, 5150929.500]], [[600, 0], [315730.500, 5154180.500]], [[600, 450], [315730.500, 5150929.500]]] targetCRS EPSG:32632

Unfortunately it reports upon request from OpenLayers:

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

Nobody was able to even give me a hint on how to tackle that, so I address
myself to you in this matter. More details on my question can be found on
GIS Stackexchange
<http://gis.stackexchange.com/questions/65162/geoserver-georectification-via-sld-fails>
.

Best,
xandriksson


View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-Georectification-via-SLD-fails-tp5064734.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


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


See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks a lot! When the CRS parameter is passed to the SLD via a WMS request
instead of defining it in the SLD as a literal, GeorectifyCoverage accepts
it without complaints.

See the official documentation here
<http://docs.geoserver.org/stable/en/user/styling/sld-extensions/substitution.html&gt;
for more info on variable substitution in SLD.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Geoserver-Georectification-via-SLD-fails-tp5064734p5066468.html
Sent from the GeoServer - User mailing list archive at Nabble.com.