Hi all,

I'm building GeoServer trunk with "-Pwps" options and everything seems to be
working pretty smooth (tried a simple gt:DoubleAddition process which works
fine). But I do have a question regarding a process that requires a feature
collection input. Take gt:BufferFeatureCollection process as an example, I
used following options respectively trying to feed the process with GML (wfs
feature collection) from a live WFS service but the results confused me. So
I'm trying to see if anyone has similar experience or have any clue.

Option 1: a static GML file (saved from a WFS GetFeature response from
GeoServer 2.1)
<!-- 
                        <wps:Reference 
                                
schema="http://schemas.opengis.net/gml/3.1.1/feature.xsd"; 
                                mimeType="text/xml; subtype=wfs-collection/1.1"
                                
xlink:href="http://localhost:8080/.../playground/wps/data/sample.xml"/> 
-->
Option 2: a live WFS GetFeature call to GeoServer 2.1
<!--             
                        <wps:Reference 
                                
schema="http://schemas.opengis.net/gml/3.1.1/feature.xsd"; 
                                mimeType="text/xml; subtype=wfs-collection/1.1"
                        
xlink:href="http://localhost:8080/geoserver-2.1-snapshot/ows?service=WFS&version=1.1.0&request=getfeature&typename=it.geosolutions:highways&FeatureId=highways.1"/>
                        -->
Option 3: a live WFS HTTP POST GetFeature call to GeoServer 2.1
<!--
                        <wps:Reference mimeType="text/xml; 
subtype=wfs-collection/1.0"
xlink:href="http://localhost:8080/geoserver-2.1/wfs"; method="POST">
                        <wps:Body>
                                <wfs:GetFeature service="WFS" version="1.0.0"
outputFormat="GML2">
                                <wfs:Query typeName="it.geosolutions:highways">
                                        <ogc:Filter>
                                                <ogc:FeatureId 
fid="highways.1"></ogc:FeatureId>
                                        </ogc:Filter>
                                </wfs:Query>
                                </wfs:GetFeature>
                        </wps:Body>
                </wps:Reference>
-->
Option 4: inline GML
                        <!--  
                        <wps:ComplexData mimetype="text/xml; 
subtype=wfs-collection/1.1"
encoding="UTF-8">
                                <wfs:FeatureCollection numberOfFeatures="1"
                                        
timeStamp="2010-10-28T23:56:29.995-07:00"
                                        
xsi:schemaLocation="http://www.opengis.net/wfs
http://localhost:8080/geoserver-2.1-snapshot-10282010/schemas/wfs/1.1.0/wfs.xsd
http://www.geo-solutions.it
http://localhost:8080/geoserver-2.1-snapshot-10282010/wfs?service=WFS&amp;version=1.1.0&amp;request=DescribeFeatureType&amp;typeName=it.geosolutions%3Ahighways";
                                        xmlns:ogc="http://www.opengis.net/ogc";
xmlns:gml="http://www.opengis.net/gml";
                                        
xmlns:it.geosolutions="http://www.geo-solutions.it";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                                        
xmlns:topp="http://www.openplans.org/topp";
xmlns:xlink="http://www.w3.org/1999/xlink";
                                        xmlns:ows="http://www.opengis.net/ows";
xmlns:wfs="http://www.opengis.net/wfs";>
                                        <gml:featureMembers>
                                                <it.geosolutions:highways 
gml:id="highways.1">
                                                        
<it.geosolutions:the_geom>
                                                                
<gml:MultiLineString srsDimension="2"
                                                                        
srsName="urn:x-ogc:def:crs:EPSG:4326">
                                                                        
<gml:lineStringMember>
                                                                                
<gml:LineString>
                                                                                
        <gml:posList>37.769034 -122.397233 37.769474 -122.397642
                                                                                
                37.769796 -122.397846 37.770061 -122.397977 37.770872
                                                                                
                -122.398163 37.771951 -122.398085 37.772221 -122.398093
                                                                                
                37.772474 -122.398224 37.772768 -122.398567 37.773345
                                                                                
                -122.399321 37.773497 -122.399591 37.774593
-122.401125</gml:posList>
                                                                                
</gml:LineString>
                                                                        
</gml:lineStringMember>
                                                                
</gml:MultiLineString>
                                                        
</it.geosolutions:the_geom>
                                                        
<it.geosolutions:LENGTH>0.469</it.geosolutions:LENGTH>
                                                        
<it.geosolutions:HWYNAME>I 280</it.geosolutions:HWYNAME>
                                                        
<it.geosolutions:FCC>A11</it.geosolutions:FCC>
                                                        
<it.geosolutions:STATEFIPS>06</it.geosolutions:STATEFIPS>
                                                        
<it.geosolutions:ALT1_NAME />
                                                        
<it.geosolutions:ROAD_TYPE>Major
Roads/Highways</it.geosolutions:ROAD_TYPE>
                                                </it.geosolutions:highways>
                                        </gml:featureMembers>
                                </wfs:FeatureCollection>
                        </wps:ComplexData>
                        -->

None of the above four options generate correct WPS execute response, all
returned exception. But what's interesting is that by looking at a sample
WPS execute request built with WPS Query Builder, if in option 3 (reference
WFS GetFeature HTTP POST), change the value of xlink:href to
"http://geoserver/wfs";, it just worked.

My only guess is this is a hard code value to indicate the WFS is from the
same parent GeoServer instance as WPS, so it figures out where to load the
GML.

Can anyone explain more what's going on? How can I use an external WFS to
feed GeoServer WPS?

Thanks
 
-- 
View this message in context: 
http://old.nabble.com/Question-about-GeoServer-WPS-Execute-request-tp30088818p30088818.html
Sent from the GeoServer - User mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to