[fdo-internals] Bug in FdoFilter::ToString()

Igor Jarm igor at sl-king.com
Fri Jul 9 05:53:57 EDT 2010


Hello,

FdoFilter::ToString() returns wrong string representation of "complex"
filter NOT(a AND b).
The following is a description of a bug:

1. filter = NOT ( a AND b)
2. filter.ToString -> NOT a AND b == (NOT a) AND b     //WRONG
3. FfdoFilter::Parse("NOT a AND b") -> NOT a AND b

A sample code to reproduce two different filters when they should be
identical:

FdoPtr<FdoFilter> flt1 = FdoFilter::Parse(L"Geometry INTERSECTS
GeomFromText('POLYGON ((461848 100030, 462399 100892, 463039 100544, 462697
99882, 462545 99926, 462652 100525, 462539 100612, 462075 99911, 461848
100030))')");//a
FdoPtr<FdoFilter> flt2 = FdoFilter::Parse(L"POVRSINA < 200");//b
FdoPtr<FdoFilter> fltand = FdoFilter::Combine(flt1,
FdoBinaryLogicalOperations_And, flt2);
FdoPtr<FdoFilter> fltnot = FdoUnaryLogicalOperator::Create(fltand,
FdoUnaryLogicalOperations_Not);
FdoPtr<FdoFilter> fltnot2 = FdoFilter::Parse(fltnot->ToString());
//fltnot != fltnot2

Surely this is not correct or is it ?

Regards,
Igor Jarm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20100709/3c920ea1/attachment.html


More information about the fdo-internals mailing list