0

I have a WPS running in GeoServer but the requests fails due to a exception:

The request to sum all values in a region:

<?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>ras:RasterZonalStatistics</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>data</ows:Identifier>
      <wps:Reference mimeType="image/tif" xlink:href="http://geoserver/wcs" method="POST">
        <wps:Body>
          <wcs:GetCoverage service="WCS" version="1.0.0">
            <ows:Identifier>CSR:areas_of_endemism</ows:Identifier>
            <wcs:DomainSubset>
              <gml:BoundingBox crs="http://www.opengis.net/gml/srs/epsg.xml#4326">
                <ows:LowerCorner>-73.98318216 -33.75117799312799</ows:LowerCorner>
                <ows:UpperCorner>-29.99993216 5.269572006872011</ows:UpperCorner>
              </gml:BoundingBox>
            </wcs:DomainSubset>
            <wcs:Output format="image/tif"/>
          </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:CSR="csr.ufmg.br">
            <wfs:Query typeName="CSR:biome_amazon_am"/>
          </wfs:GetFeature>
        </wps:Body>
      </wps:Reference>
    </wps:Input>
    <wps:Input>
      <ows:Identifier>classification</ows:Identifier>
      <wps:Reference mimeType="image/tif" xlink:href="http://geoserver/wcs" method="POST">
        <wps:Body>
          <wcs:GetCoverage service="WCS" version="1.0.0">
            <ows:Identifier>CSR:bio_conserv_prior_arthropods_deforest_perc30</ows:Identifier>
            <wcs:DomainSubset>
              <gml:BoundingBox crs="http://www.opengis.net/gml/srs/epsg.xml#4326">
                <ows:LowerCorner>-75.45176103044321 -17.847385259953924</ows:LowerCorner>
                <ows:UpperCorner>-42.415647949967656 6.646507267816007</ows:UpperCorner>
              </gml:BoundingBox>
            </wcs:DomainSubset>
            <wcs:Output format="image/tif"/>
          </wcs:GetCoverage>
        </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>

And the expcetion is:

<wps:ExecuteResponse xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:x
link="http://www.w3.org/1999/xlink" xml:lang="en" service="WPS" serviceInstance="http://maps.csr.ufmg.br:80/geoserver/ows?" version="1.0.0">
    <wps:Process w
ps:processVersion="1.0.0">
        <ows:Identifier>ras:RasterZonalStatistics</ows:Identifier>
        <ows:Title>Raster Zonal Statistics</ows:Title>
        <ows:Abstract>Computes s
tatistics for the distribution of a certain quantity in a set of polygonal zones.</ows:Abstract>
    </wps:Process>
    <wps:Status creationTime="2019-06-07T00:20:4
0.652Z">
        <wps:ProcessFailed>
            <ows:ExceptionReport version="1.1.0">
                <ows:Exception exceptionCode="NoApplicableCode">
                    <ows:ExceptionText>Process failed during e
xecution
Process execution d7a3c5ac-9a1d-443d-9919-37254a5a2a0b failed
Failed to retrieve value for input data
format image/tif is not supported for this coverage</ows:ExceptionText>
                </ows:Exception>
            </ows:ExceptionReport>
        </wps:ProcessFailed>
    </wps:Status>
</wps:Execut
eResponse>

Trying to find the problem, I tested requesting WCS map:

<GetCoverage version="1.0.0" service="WCS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/wcs" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/getCoverage.xsd">
    <sourceCoverage>CSR:uso_da_terra_2013</sourceCoverage>
    <domainSubset>
        <spatialSubset>
            <gml:Envelope srsName="EPSG:4326">
                <gml:pos>-73.98318216 -33.75117799312799</gml:pos>
                <gml:pos>-29.99993216 5.269572006872011</gml:pos>
            </gml:Envelope>
            <gml:Grid dimension="2">
                <gml:limits>
                    <gml:GridEnvelope>
                        <gml:low>0 0</gml:low>
                        <gml:high>6736 5059</gml:high>
                    </gml:GridEnvelope>
                </gml:limits>
                <gml:axisName>x</gml:axisName>
                <gml:axisName>y</gml:axisName>
            </gml:Grid>
        </spatialSubset>
    </domainSubset>
    <output>
        <crs>EPSG:4326</crs>
        <format>tif</format>
    </output>
</GetCoverage>

And I got almost the same error:

<ServiceExceptionReport version="1.2.0" >
    <ServiceException code="InvalidParameterValue" locator="format">
      format tif is not supported for this coverage
    </ServiceException>
</ServiceExceptionReport>

I am using GeoServer 2.15.1

I concluded that the issue is with the WCS, but I couldn't find the solution.

  • 1
    I guess that the correct format is image/tiff. You can find the supported formats by making a GetCapabilities request for the WCS Service. – user30184 Jun 7 at 5:53
  • @user30184 no success, same error. – Asfixia Jun 7 at 13:09
  • What formats did you see in GetCapabilities? – user30184 Jun 7 at 13:16
  • @user30184 i am not sure but: i have the following 'profiles': gml-coverage, special-format, geotiff-coverage, crs-gridded-coverage. I not sure, all these are each in a <ows:Profile> element. PS: The 2.0 request had worked, but the 1.0.0 isnt, one uses coverageId the other use identifier wich is 'CSR:bio_conserv_prior_arthropods_deforest_perc30' . ' localhost:8081/geoserver/… ' – Asfixia Jun 7 at 13:52
  • Sorry, i have found the supported formats: application/gml+xml, application/x-gzip, image/jpeg, image/png, image/tiff, text/plain – Asfixia Jun 7 at 16:03
1

I could get the WCS 2.0.1 request working

Working WCS 2.0.1 Request

In XML is:

<?xml version="1.0" encoding="UTF-8"?>
<wcs:GetCoverage xmlns:wcs="http://www.opengis.net/wcs/2.0"
    xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.opengis.net/wcs/2.0 ../../wcsAll.xsd"
    service="WCS" version="2.0.0">
    <wcs:requestParameters>
        <wcs:mediatype>multipart/related</wcs:mediatype>
        <wcs:Format>image/geotiff</wcs:Format>
    </wcs:requestParameters>
    <wcs:CoverageId>CSR__uso_da_terra_2013</wcs:CoverageId>
</wcs:GetCoverage>

The request that finally worked for WPS, is using the (WCS 2.0) requests.

<?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>ras: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 xmlns:wcs="http://www.opengis.net/wcs/2.0"
                xmlns:gml="http://www.opengis.net/gml/3.2"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                service="WCS" version="2.0.1">
                <wcs:requestParameters>
                    <wcs:mediatype>multipart/related</wcs:mediatype>
                    <wcs:Format>image/geotiff</wcs:Format>
                </wcs:requestParameters>
                <wcs:CoverageId>CSR__areas_of_endemism</wcs:CoverageId>
            </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:CSR="csr.ufmg.br">
            <wfs:Query typeName="CSR:biome_amazon_am"/>
          </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>
            <wcs:GetCoverage xmlns:wcs="http://www.opengis.net/wcs/2.0"
                xmlns:gml="http://www.opengis.net/gml/3.2"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                service="WCS" version="2.0.1">
                <wcs:requestParameters>
                    <wcs:mediatype>multipart/related</wcs:mediatype>
                    <wcs:Format>image/geotiff</wcs:Format>
                </wcs:requestParameters>
                <wcs:CoverageId>CSR__bio_conserv_prior_arthropods_deforest_perc30</wcs:CoverageId>
            </wcs:GetCoverage>
        </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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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