Raster WPS / WPS4R store outputs to Geoserver

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Raster WPS / WPS4R store outputs to Geoserver

julianrosser
Hi board,

I have been using the 52N WPS with the R extension for some raster-based processing. This has been working successfully for requests where the output is returned directly back. However I would like to have the outputs stored in Geoserver as many of the raster-based processes are long-running.

I have followed the instructions from:
https://wiki.52north.org/bin/view/Geoprocessing/StoreWPSOutputsInGeoserver

I have the WMS, WCS, WFS generators for Geoserver set in the config and it works correctly for vector operations which can be output via WFS. But when I change the output mime type to WCS or WMS I get a "NoApplicableCode" error (see below for full details of error, sample execute request, WPS4R process).

I'm using a Linux server running 52n-wps-webapp-3.3.0.

Can anyone given an indication of what might be going wrong please? Can outputs from R processes be stored directly in Geoserver?


Cheers
Julian



Example execute request to output WCS to Geoserver:

<wps:Execute service="WPS" version="1.0.0" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
  http://schemas.opengis.net/wps/1.0.0/wpsExecute_request.xsd">
  <ows:Identifier>org.n52.wps.server.r.test.return.surfacemodel</ows:Identifier>
  <wps:DataInputs>
  <wps:Input>
      <ows:Identifier xmlns:ns1="http://www.opengis.net/ows/1.1">inputRasterModel</ows:Identifier>
    <wps:Reference xlink:href="http://localhost:8010/wps/testData/c_dem_subset.tif" mimeType="image/tiff" />
    </wps:Input>
  </wps:DataInputs>
<wps:ResponseForm> 
<wps:ResponseDocument> 
<wps:Output mimeType="application/WCS"> 
<ows:Identifier>outputRasterModel</ows:Identifier> 
<ows:Title>outputRasterModel</ows:Title> 
<ows:Abstract>outputRasterModel</ows:Abstract> 
</wps:Output> 
</wps:ResponseDocument> 
</wps:ResponseForm> 
</wps:Execute>



Error report following above execute request:

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" version="1.0.0">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>
Error while executing the embedded process for: org.n52.wps.server.r.test.return.surfacemodel
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_StackTrace">
<ows:ExceptionText>
org.n52.wps.server.ExceptionReport: Error while executing the embedded process for: org.n52.wps.server.r.test.return.surfacemodel at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:716) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:92) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: org.n52.wps.server.ExceptionReport: Could not determine output format at org.n52.wps.server.request.ExecuteRequest.updateStatus(ExecuteRequest.java:872) at org.n52.wps.server.request.ExecuteRequest.updateStatusSuccess(ExecuteRequest.java:841) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:694) ... 5 more Caused by: org.n52.wps.server.ExceptionReport: Could not determine output format at org.n52.wps.server.response.ResponseData.<init>(ResponseData.java:166) at org.n52.wps.server.response.OutputDataItem.<init>(OutputDataItem.java:92) at org.n52.wps.server.response.ExecuteResponseBuilder.generateComplexDataOutput(ExecuteResponseBuilder.java:325) at org.n52.wps.server.response.ExecuteResponseBuilder.update(ExecuteResponseBuilder.java:165) at org.n52.wps.server.request.ExecuteRequest.updateStatus(ExecuteRequest.java:858) ... 7 more
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="JAVA_RootCause">
<ows:ExceptionText>
org.n52.wps.server.ExceptionReport: Could not determine output format
</ows:ExceptionText>
<ows:ExceptionText>
java.lang.RuntimeException: org.n52.wps.server.ExceptionReport: Could not determine output format at org.n52.wps.server.request.ExecuteRequest.updateStatus(ExecuteRequest.java:872) at org.n52.wps.server.request.ExecuteRequest.updateStatusSuccess(ExecuteRequest.java:841) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:694) at org.n52.wps.server.request.ExecuteRequest.call(ExecuteRequest.java:92) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: org.n52.wps.server.ExceptionReport: Could not determine output format at org.n52.wps.server.response.ResponseData.<init>(ResponseData.java:166) at org.n52.wps.server.response.OutputDataItem.<init>(OutputDataItem.java:92) at org.n52.wps.server.response.ExecuteResponseBuilder.generateComplexDataOutput(ExecuteResponseBuilder.java:325) at org.n52.wps.server.response.ExecuteResponseBuilder.update(ExecuteResponseBuilder.java:165) at org.n52.wps.server.request.ExecuteRequest.updateStatus(ExecuteRequest.java:858) ... 7 more
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>





R WPS process:

library(sp); library(maptools); library(rgdal);
# wps.des: id = test.return.surfacemodel, title = Takes and returns an inputRasterModel,
# abstract = Takes a raster dataset called inputRasterModel and returns it with an object called outputRasterModel;

# wps.in: inputRasterModel, type = tiff;

inputRasterModel25m = readGDAL(inputRasterModel)
outFile = "outputfromGdalR.tif"
outputRasterModel = writeGDAL(inputRasterModel25m, outFile, drivername="GTiff")

# wps.out: id = outputRasterModel, type = tiff, title = passing a raster back;
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Raster WPS / WPS4R store outputs to Geoserver

julianrosser
P.S. I should mention I am using a patched version of the WPS-R Jar that was helpfully provided by Benjamin back in March, see http://geoprocessing.forum.52north.org/Reading-raster-data-inputs-with-wpsr-td4026006.html

Julian


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Raster WPS / WPS4R store outputs to Geoserver

BenjaminPross
Hi Julian,

This exception most likely happens, because the mime type is not listed in the process description. Not sure there is an easy solution for this, but I will have a look.

Cheers,

Benjamin
Loading...