Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to create a WPS-chain in Geoserver.

Here's the HTTP-Post statement:

<?xml version="1.0" encoding="UTF-8"?>
<wps:Execute version="1.0.0" service="WPS" ...>
  <ows:Identifier>gs:Flst</ows:Identifier>
  <wps:DataInputs>
    <wps:Input>
      <ows:Identifier>FlstID</ows:Identifier>

       <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wps" method="POST">
        <wps:Body>
            <wps:Execute version="1.0.0" service="WPS">
            <ows:Identifier>gs:createnumber</ows:Identifier>
            <wps:DataInputs>
                <wps:Input>
                <ows:Identifier>plht</ows:Identifier>
                    <wps:Data>
                    <wps:LiteralData>testid</wps:LiteralData>
                    </wps:Data>
                </wps:Input>
            </wps:DataInputs>
            <wps:ResponseForm>
            <wps:RawDataOutput>
                <ows:Identifier>number</ows:Identifier>
            </wps:RawDataOutput>
            </wps:ResponseForm>
            </wps:Execute>
        </wps:Body>
       </wps:Reference>

     </wps:Input>
    <wps:Input>
      <ows:Identifier>FlstFeatures</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">
          <wfs:Query typeName="Test:nyc_census_blocks">
            <ogc:Filter>
            <ogc:PropertyIsEqualTo>
                <ogc:PropertyName>blkid</ogc:PropertyName>
                <Literal>360050028001007</Literal>
            </ogc:PropertyIsEqualTo>
            </ogc:Filter>
             </wfs:Query>
          </wfs:GetFeature>
        </wps:Body>
      </wps:Reference>
    </wps:Input>
  </wps:DataInputs>
  <wps:ResponseForm>
    <wps:RawDataOutput>
      <ows:Identifier>result</ows:Identifier>
    </wps:RawDataOutput>
  </wps:ResponseForm>
</wps:Execute>

The first WPS (gs:flst) has two Inputs: 1. A number, which is generated by a WPS called gs:createnumber 2. A SimpleFeatureCollection, which is retrieved from a wfs

The number from the first Input is the ID of the Feature in the WFS. How can I insert this number in the Filter-block?

I tried to use

<Filter>
<ogc:PropertyIsEqualTo>
            <ogc:PropertyName>blkid</ogc:PropertyName>
            <ows:Identifier>number</ows:Identifier>
</ogc:PropertyIsEqualTo>
</ogc:Filter>

but that didn't work (Exception org.geotools.filter.AttributeExpressionImpl cannot be cast to org.opengis.filter.Filter)

Thank's for helping!

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.