Just a guess, try to use http://localhost:8080/geoserver/*wps*/" instead of
http://localhost:8080/geoserver/ows/".
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
==
Ing. Alessio Fabiani
@alfa7691
Founder/Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 331 6233686
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
On Tue, Dec 3, 2013 at 12:23 PM, constan.amurrio
<constan.amur...@gmail.com>wrote:
> Hello to everyone!
> I've been working with some GeoServer processes using OpenLayers as client.
> I've been successful in those which use WFS as input (like
> gs:BufferFeatureCollection). My problem comes when I want to use processes
> that need as input raster data (tiff). I know that OpenLayers is not a WCS
> client, but you can send a POST request to the server to get back the
> result, right?. Particularly I want to execute the
> gs:RasterZontalStatistics, that needs a tiff and a WFS layer as input, and
> returns some statistics (average, min, max, etc.) for the tiff inside the
> geometries of the WFS Layer. This is the code I've used so far:
>
> ///*GEOPROCESS - Calculate the average/min/max values of the MDE raster
> according to user drawing selection*/
> function obtainElevationProcess(){
> var wpsFormat= new OpenLayers.Format.WPSExecute();
>
> var doc= wpsFormat.write({
> identifier: "gs:RasterZonalStatistics",
> dataInputs:[{
> identifier:'data',
> reference:{
> mimeType:"image/tiff",
> href: "http://geoserver/wcs",
> method: "POST",
> body: {
> wcs: {
> identifier:'forestry:mde200_V4',
> version:"1.1.1",
> domainSubset: {
> boundingBox: {
> projection:
> 'http://www.opengis.net/gml/srs/epsg.xml#3857',
> bounds: new
> OpenLayers.Bounds(-200931.8344047, 4681799.186142525,32948.35238090271,
> 4948113.428142309)
> }
> },
> output: {format:'image/tiff'},
> }
> }
> }
> },
> {
> identifier:"zones",
> reference:{
> mimeType:"text/xml;
> subtype=wfs-collection/1.0",
> href: "http://geoserver/wfs",
> method: 'POST',
> body:{
> wfs:{
> version:'1.0.0',
> outputFormat: "GML2",
> featureNS:
> "http://localhost:8080/thesis/forestry",
> featureType:'forestry:Lics',
> }
> }
> }
> }],
>
> responseForm:{
> rawDataOutput:{
> mimeType:"text/xml;subtype=wfs-collection/1.0",
> identifier:"statistics"
> }
> }
>
> });
>
>
> OpenLayers.Request.POST({
> url:"http://localhost:8080/geoserver/ows/",
> data:doc,
> headers: {
> "Content-Type": "text/xml;charset=utf-8"
> },
> success: function(response){
> alert(response.responseText);
> }
> });
>
> }/
>
> Once executed, OpenLayers returns this message (selection):
>
> /Process execution ecacba6c-a676-46b5-9010-bd4a2bb35632 failed
> Failed to retrieve value for input data
> Unrecognized request type {service=WCS, Output=image/tiff,
> Identifier=net.opengis.ows11.impl.CodeTypeImpl@1ad2fc (value:
> forestry:mde200_V4, codeSpace: null),
> DomainSubset=net.opengis.ows11.impl.BoundingBoxTypeImpl@111d0b5
> (lowerCorner: [-200931.8344047, 4681799.1861425], upperCorner:
> [32948.352380903, 4948113.4281423], crs:
> http://www.opengis.net/gml/srs/epsg.xml#3857, dimensions: null),
>
> version=1.1.1}</ows:ExceptionText></ows:Exception></ows:ExceptionReport></wps:ProcessFailed></wps:Status></wps:ExecuteResponse>/
>
> Does anyone an idea about how this can be done (if possible)? My
> environment
> is: Geoserver 2.3.5 / OpenLayers 2.13 / localhost on Apache.
>
> Help will be highly appreciated.
>
> Thanks.
>
> Constan.
>
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Use-of-Geoserver-raster-processes-within-OpenLayers-WCS-WPS-problem-tp5092361.html
> Sent from the GeoServer - User mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users