On 10/05/11 17:28, Andrea Aime wrote:
On Tue, May 10, 2011 at 6:31 AM, Niels<niels.charl...@csiro.au>  wrote:
What I mean is for example filtering on the following equation:
a/b/c = "foo"
Hum... OGC filter against  features is xpath based.
Soo... when I say a = 10 against a simple feature the corresponding xpath
filter would be:

feature[a = 10]

whilst doing what you say against a complex one would result in:

feature[a/b/c = 10]

where, as you say, some between a, b or c is multivalued (so we're actually
looking at a list if not a tree).
Is this even valid? What would it mean? Afaik you can do something like:

feature[a/b/c[1] = 10]

that is, select the specific subelement to test (assuming c is the
multivalued bit).
But what would be the meaning of the former writing? all a/b/c
subelements must be equal to 10?
Just one? Afaik the xpath engine would return a list of elements and
the comparison would fail.

Yes, it is very valid. The X-Path standard explicitely says that the filter [a/b/c = 10] with a/b/c returning multiple values will return true if the equation returns true for any of these values. This is exactly the approach I have been following here, too. So if the OGC filter is X-path based as you call it, I am absolutely right to make the filter systems in Geotools support this by default!

--
*Niels Charlier*

Software Engineer
CSIRO Earth Science and Resource Engineering
Phone: +61 8 6436 8914

Australian Resources Research Centre
26 Dick Perry Avenue, Kensington WA 6151
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to