Hi Ben,

Ah, that makes sense. I'm posting the working curl command and XML
GetFeature request for others who might be searching through the archives.

The following goes in a file called GetFeature.xml (for example):

<wfs:GetFeature service='WFS' version='2.0.0'
xmlns:topp='http://www.openplans.org/topp'
xmlns:fes='http://www.opengis.net/fes/2.0'
xmlns:wfs='http://www.opengis.net/wfs/2.0'
count='500'>
<wfs:Query typeNames='geo:siteLog'>
<fes:Filter>
<fes:PropertyIsEqualTo>
<fes:ValueReference>geo:siteIdentification/geo:fourCharacterID</fes:ValueReference>
<fes:Literal>AAAA</fes:Literal>
</fes:PropertyIsEqualTo>
</fes:Filter>
</wfs:Query>
</wfs:GetFeature>

Use the following shell command to run the query using POST and store the
result in GetFeature_Result.xml:

curl -X POST -H "Content-type: application/gml+xml;version=3.2" -d
@GetFeature.xml http://localhost:8080/geoserver/wfs > GetFeature_Result.xml




On Mon, Aug 14, 2017 at 4:13 PM, Ben Caradoc-Davies <b...@transient.nz>
wrote:

> Gavin,
>
> filter complex features by referencing xpath properties in the output. The
> client never needs to know about the source tables. app-schema converts the
> client filter into filters against the source tables, or efficient SQL join
> queries if joining is used.
>
> The cql_filter vendor parameter works fine for top-level properties like
> gml:name but I can find no way of encoding xpaths because "/" and "@" are
> invalid and not recognised as part of the property selector. In these cases
> you should be able to use filter (OGC Filter XML) rather than cql_filter.
>
> Kind regards,
> Ben.
>
> On 15/08/17 07:42, Gavin Medley wrote:
>
>> Hi all,
>>
>> How would one use a CQL_Filter parameter in a WFS request to filter the
>> results given by an app schema mapped complex feature using feature
>> chaining. The way I understand it, CQL_Filter operates using a WHERE
>> statement in a CQL query but how does that work when each (linked) mapping
>> file may be accessing a different table? Does the filter get applied to
>> the
>> top level mapping file? I haven't been able to make it work at all.
>> Perhaps
>> I'm totally misunderstanding it though.
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> Geoserver-users mailing list
>>
>> Please make sure you read the following two resources before posting to
>> this list:
>> - Earning your support instead of buying it, but Ian Turton:
>> http://www.ianturton.com/talks/foss4g.html#/
>> - The GeoServer user list posting guidelines:
>> http://geoserver.org/comm/userlist-guidelines.html
>>
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
> --
> Ben Caradoc-Davies <b...@transient.nz>
> Director
> Transient Software Limited <http://transient.nz/>
> New Zealand
>



-- 
Gavin Medley
Software Engineer I
*UNAVCO*
6350 Nautilus Drive
Boulder, CO 80301-5394
med...@unavco.org
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to