app-schema chained feature ogc:Filter problem
---------------------------------------------
Key: GEOT-2969
URL: http://jira.codehaus.org/browse/GEOT-2969
Project: GeoTools
Issue Type: Bug
Components: data app-schema
Affects Versions: 2.6.1, 2.6.0
Reporter: Ben Caradoc-Davies
Assignee: Ben Caradoc-Davies
Filter request with property files reported to not return expected features.
Features are returned in unfiltered request.
http://old.nabble.com/App-schema-chained-feature-ogc:Filter-problem-td27336031.html
Selected emails:
{code}
-------- Original Message --------
Subject: [Geoserver-users] App-schema chained feature ogc:Filter problem
Date: Wed, 27 Jan 2010 17:08:46 +0800
From: Rickard
To: geoserver-users
Hi,
I'm trying to map a small complex schema using the app-schema
extension in Geoserver 2.0.1. I have managed to map my schema and I
get the expected result back when issuing GetFeature request, but I
have problems getting an ogc:Filter query to work.
My feature looks like:
<test:Test gml:id="test.1">
<test:text>test</test:text>
<test:objectIdentifier>
<test:Identifier>
<test:localId>id1</test:localId>
<test:namespace>namespace1</test:namespace>
</test:Identifier>
</test:objectIdentifier>
<test:geometry></test:geometry>
</test:Test>
And my filter looks like:
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>
test:objectIdentifier/test:Identifier/test:localId
</ogc:PropertyName>
<ogc:Literal>id1</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
If I map the objectIdentifier inline, the filter works as expected and
I get the expected result. However when I map the objectIdentifier
using feature chaining the result always comes back empty.
Inline mapping:
<AttributeMapping>
<targetAttribute>test:objectIdentifier/test:Identifier/test:localId</targetAttribute>
<sourceExpression>
<OCQL>localId</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>test:objectIdentifier/test:Identifier/test:namespace</targetAttribute>
<sourceExpression>
<OCQL>namespace</OCQL>
</sourceExpression>
</AttributeMapping>
Chained mapping:
<AttributeMapping>
<targetAttribute>test:objectIdentifier</targetAttribute>
<sourceExpression>
<OCQL>getID()</OCQL>
<linkElement>test:Identifier</linkElement>
<linkField>FEATURE_LINK</linkField>
</sourceExpression>
<isMultiple>false</isMultiple>
</AttributeMapping>
Non-feature type, test:Identifier, included using <includedTypes>:
<AttributeMapping>
<targetAttribute>test:localId</targetAttribute>
<sourceExpression>
<OCQL>localId</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>test:namespace</targetAttribute>
<sourceExpression>
<CQL>namespace</OCQL>
</sourceExpression>
</AttributeMapping>
<AttributeMapping>
<targetAttribute>FEATURE_LINK</targetAttribute>
<sourceExpression>
<OCQL>TEST_ID</OCQL>
</sourceExpression>
</AttributeMapping>
To summarise, both mappings work when issuing a GetFeature request,
but I can only get the inline mapping to work with an ogc:Filter.
Simple property files are used as storage backend.
Any ideas what I'm doing wrong? Are there any known issues with
chained features and filter queries?
Regards,
Rickard.
-------- Original Message --------
Subject: Re: [Geoserver-users] App-schema chained feature ogc:Filter problem
Date: Tue, 2 Feb 2010 15:24:15 +0800
From: Rickard
To: Caradoc-Davies, Ben (CESRE, Kensington)
CC: [email protected]
Hello,
Thanks for the reply; I'm attaching my configuration files as requested.
Regards,
Rickard
On Mon, Feb 1, 2010 at 3:57 AM, Ben Caradoc-Davies wrote:
> Rickard,
>
> this looks like a new bug. We have unit test coverage on this use case. It
> should work properly. The fact that you can get all features does indeed
> indicate that it is a filter handling problem.
>
> Please send us your mapping files and property files and we will see if we
> can reproduce the problem.
>
> Kind regards,
> Ben.
>
>
> On 27/01/10 17:08, Rickard wrote:
>>
>> Hi,
>>
>> I'm trying to map a small complex schema using the app-schema
>> extension in Geoserver 2.0.1. I have managed to map my schema and I
>> get the expected result back when issuing GetFeature request, but I
>> have problems getting an ogc:Filter query to work.
>>
>> My feature looks like:
>> <test:Test gml:id="test.1">
>> <test:text>test</test:text>
>> <test:objectIdentifier>
>> <test:Identifier>
>> <test:localId>id1</test:localId>
>> <test:namespace>namespace1</test:namespace>
>> </test:Identifier>
>> </test:objectIdentifier>
>> <test:geometry></test:geometry>
>> </test:Test>
>>
>> And my filter looks like:
>> <ogc:Filter>
>> <ogc:PropertyIsEqualTo>
>> <ogc:PropertyName>
>> test:objectIdentifier/test:Identifier/test:localId
>> </ogc:PropertyName>
>> <ogc:Literal>id1</ogc:Literal>
>> </ogc:PropertyIsEqualTo>
>> </ogc:Filter>
>>
>>
>> If I map the objectIdentifier inline, the filter works as expected and
>> I get the expected result. However when I map the objectIdentifier
>> using feature chaining the result always comes back empty.
>>
>>
>> Inline mapping:
>> <AttributeMapping>
>>
>> <targetAttribute>test:objectIdentifier/test:Identifier/test:localId</targetAttribute>
>> <sourceExpression>
>> <OCQL>localId</OCQL>
>> </sourceExpression>
>> </AttributeMapping>
>> <AttributeMapping>
>>
>>
>> <targetAttribute>test:objectIdentifier/test:Identifier/test:namespace</targetAttribute>
>> <sourceExpression>
>> <OCQL>namespace</OCQL>
>> </sourceExpression>
>> </AttributeMapping>
>>
>>
>> Chained mapping:
>> <AttributeMapping>
>> <targetAttribute>test:objectIdentifier</targetAttribute>
>> <sourceExpression>
>> <OCQL>getID()</OCQL>
>> <linkElement>test:Identifier</linkElement>
>> <linkField>FEATURE_LINK</linkField>
>> </sourceExpression>
>> <isMultiple>false</isMultiple>
>> </AttributeMapping>
>>
>>
>> Non-feature type, test:Identifier, included using<includedTypes>:
>> <AttributeMapping>
>> <targetAttribute>test:localId</targetAttribute>
>> <sourceExpression>
>> <OCQL>localId</OCQL>
>> </sourceExpression>
>> </AttributeMapping>
>> <AttributeMapping>
>> <targetAttribute>test:namespace</targetAttribute>
>> <sourceExpression>
>> <CQL>namespace</OCQL>
>> </sourceExpression>
>> </AttributeMapping>
>> <AttributeMapping>
>> <targetAttribute>FEATURE_LINK</targetAttribute>
>> <sourceExpression>
>> <OCQL>TEST_ID</OCQL>
>> </sourceExpression>
>> </AttributeMapping>
>>
>>
>> To summarise, both mappings work when issuing a GetFeature request,
>> but I can only get the inline mapping to work with an ogc:Filter.
>> Simple property files are used as storage backend.
>>
>> Any ideas what I'm doing wrong? Are there any known issues with
>> chained features and filter queries?
>>
>>
>> Regards,
>> Rickard.
>>
{code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel