FME 2017.0 (17271).
I have a polygon layer which consists of an area with buffer zones around it. The polygons do not overlap. I also have point data of address which covers a larger area and includes postal and non-postal addresses. I want to select only the postal addresses that fall within the polygons.
The address data is stored in SQL Server using the Geometry data type to store the locations (WKB Geometry). So I've been comparing ways of doing the selection. In doing this I've found that using FeatureReader with both a WHERE Clause AND a Spatial Filter results in some address records being selected twice.
I read in the polygons then send these to the FeatureReader. The FeatureReader connects to Microsoft SQL Server Spatial to read the point data. The Spatial Filter is set to "Contains".
If I leave it like this and add a Tester to do "Postal NOT LIKE 'N'", I get 653,819 records. If, instead of the Tester, I add a WHERE Clause to the FeatureReader, I get 654,305 records. This is a difference of 486, and these are all duplicates i.e. some address points are being selected twice. It's pretty random which ones are selected and they are not on the boundary of a polygon.
I wondered if it was something to do with this message in the Translation Log:
Notice - reader format `MSSQL_SPATIAL' does not support querying by spatial predicate, but supports envelope queries. FME will create equivalent results by performing spatial predicate calculations locally. Performance should not be affected.
I only get this if I use both a WHERE Clause and a Spatial Filter in the FeatureReader. If I just use the Spatial Filter in the FeatureReader, that message does not appear in the log.
Incidentally, there's no difference in processing time between FeatureReader (Spatial Filter only) + Tester vs FeatureReader (Spatial Filter & WHERE Clause) - both are 1.5 hours. So I'm not desperate for an answer on this one.
By comparison, reading both datasets and using a PointOnAreaOverlayer + Tester takes 2 hours 20 mins.