I am trying to generate raster zonal statistics for a raster by providing a shapefile in geoserver. When I make a gs:RasterZonalStatistics or ras:RasterZonalStatistics request,
I get an error saying: ras:RasterZonalStatisticsRaster Zonal StatisticsComputes statistics for the distribution of a certain quantity in a set of polygonal zones.Unrecognized request type {}
Request:
<?xml version="1.0" encoding="UTF-8"?><wps:Execute version="1.0.0" service="WPS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wps/1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wcs="http://www.opengis.net/wcs/1.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd"> <ows:Identifier>gs:RasterZonalStatistics</ows:Identifier> <wps:DataInputs> <wps:Input> <ows:Identifier>data</ows:Identifier> <wps:Reference mimeType="image/tiff" xlink:href="http://geoserver/wcs" method="POST"> <wps:Body> <wcs:GetCoverage service="WCS" version="1.1.1"> <ows:Identifier>test:tc</ows:Identifier> <wcs:DomainSubset> <ows:BoundingBox crs="http://www.opengis.net/gml/srs/epsg.xml#32643"> <ows:LowerCorner>277250.0 2738310.0</ows:LowerCorner> <ows:UpperCorner>720100.0 3383110.0</ows:UpperCorner> </ows:BoundingBox> </wcs:DomainSubset> <wcs:Output format="image/tiff"/> </wcs:GetCoverage> </wps:Body> </wps:Reference> </wps:Input> <wps:Input> <ows:Identifier>zones</ows:Identifier> <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" method="POST"> <wps:Body> <wfs:GetFeature service="WFS" version="1.0.0" outputFormat="GML2" xmlns:test="sparta-test"> <wfs:Query typeName="test:SingleFeatureSHP_091013007000000"/> </wfs:GetFeature> </wps:Body> </wps:Reference> </wps:Input> <wps:Input> <ows:Identifier>classification</ows:Identifier> <wps:Reference mimeType="image/tiff" xlink:href="http://geoserver/wcs" method="POST"> <wps:Body/> </wps:Reference> </wps:Input> </wps:DataInputs> <wps:ResponseForm> <wps:RawDataOutput mimeType="text/xml; subtype=wfs-collection/1.0"> <ows:Identifier>statistics</ows:Identifier> </wps:RawDataOutput> </wps:ResponseForm> </wps:Execute> Request made: ~$curl -u admin:geoserver -H 'Content-type: xml' -XPOST -d@'req2.xml' http://localhost:8080/geoserver/wps
Stack Trace:
02 Feb 10:16:13 ERROR [wps.executor] - Process execution failed org.geoserver.wps.WPSException: Unrecognized request type {} at org.geoserver.wps.executor.InternalWCSInputProvider.getValueInternal(InternalWCSInputProvider.java:70) at org.geoserver.wps.executor.AbstractInputProvider.getValue(AbstractInputProvider.java:100) at org.geoserver.wps.executor.LazyInputMap.parseInputs(LazyInputMap.java:89) at org.geoserver.wps.executor.LazyInputMap.get(LazyInputMap.java:49) at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.buildProcessArguments(AnnotationDrivenProcessFactory.java:736) at org.geotools.process.factory.AnnotationDrivenProcessFactory$InvokeMethodProcess.execute(AnnotationDrivenProcessFactory.java:616) at org.geoserver.wps.executor.ProcessStartupFilter$ProcessStartupWrapper.execute(ProcessStartupFilter.java:50) at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:224) at org.geoserver.wps.executor.DefaultProcessManager$ProcessCallable.call(DefaultProcessManager.java:192) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 02 Feb 10:16:13 INFO [geoserver.wps] - Request: execute service = WPS version = 1.0.0 baseUrl = http://localhost:8080/geoserver/ identifier: value = gs:RasterZonalStatistics dataInputs: input[0]: identifier = net.opengis.ows11.impl.CodeTypeImpl@32f3ea94 (value: data, codeSpace: null) reference = net.opengis.wps10.impl.InputReferenceTypeImpl@77b0af44 (body: net.opengis.wcs11.impl.GetCoverageTypeImpl@6c635b65 (service: WCS, version: 1.1.1, baseUrl: null, extendedProperties: {}), encoding: null, href: http://geoserver/wcs, method: POST, mimeType: image/tiff, schema: null)input[0]: identifier = net.opengis.ows11.impl.CodeTypeImpl@f486934 (value: zones, codeSpace: null) reference = net.opengis.wps10.impl.InputReferenceTypeImpl@22c28503 (body: net.opengis.wfs.impl.GetFeatureTypeImpl@507ac490 (handle: null, service: WFS, version: 1.0.0, baseUrl: null, providedVersion: null, extendedProperties: {}) (maxFeatures: null, outputFormat: GML2, resultType: <unset>, traverseXlinkDepth: null, traverseXlinkExpiry: null, formatOptions: null, metadata: null, startIndex: null, viewParams: null), encoding: null, href: http://geoserver/wfs, method: POST, mimeType: text/xml, schema: null)input[0]: identifier = net.opengis.ows11.impl.CodeTypeImpl@26b40589 (value: classification, codeSpace: null) reference = net.opengis.wps10.impl.InputReferenceTypeImpl@6af9c9a2 (body: {}, encoding: null, href: http://geoserver/wcs, method: POST, mimeType: image/tiff, schema: null) responseForm: rawDataOutput: identifier = net.opengis.ows11.impl.CodeTypeImpl@5c25b363 (value: statistics, codeSpace: null) mimeType = text/xml; subtype=wfs-collection/1.0 Even if I try WPS request builder to generate the same request, I get the same error.
Geoserver Infomartion:
GeoServer Version
2.18.2
Git Revision 4f27a36677fe1c75d115bde8365a8f2e2dfe5efa
Build Date 18-Jan-2021 15:47
GeoTools Version 24.2 (rev c181af0627b27f4410982a361063dbddd1f61f7d)
GeoWebCache Version 1.18.2 (rev 1.18.x/5aa98cd64d29d06df7970e609ae2435fe3369c35)