Skip to main content
Question

SpatialFilter not returning all Filters


dbklingdom
Contributor
Forum|alt.badge.img+7

I have in my test spatialFilter that brings in 4 polygons Filters and 11238 Candidates, but the trans only returns Candidates for the first Filter. I get 10 records but should get 40.

6 replies

dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • October 16, 2017

Make sure your Pass Criteria parameter is set to 'Pass Against All Filters' in the SpatialFilter.


dbklingdom
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • October 16, 2017

Thx! Yes I have. Its weird that I still get 10 not 40.


dustin
Influencer
Forum|alt.badge.img+31
  • Influencer
  • October 16, 2017
dbklingdom wrote:

Thx! Yes I have. Its weird that I still get 10 not 40.

Try using a SpatialRelator, followed by a TestFilter.

 

 


takashi
Evangelist
  • October 16, 2017

Could you please post a screenshot of the parameters dialog?


mark2atsafe
Safer
Forum|alt.badge.img+46
  • Safer
  • October 17, 2017

Make sure Filter Type is "Multiple Filters" and not "Single Filter" or "Filters First". If it's single filter then only one filter is considered and if it's filters first then perhaps your filters are not actually first to reach the transformer.

For Pass Criteria, I'd say it might be better as "Pass Against One Filter".

It depends on whether this should be an OR test or an AND test.

For example, I pass in multiple candidate points and 3 polygon filters. The points represent cities in Canada. The polygons represent the three Canadian prairie provinces (MB, SK, AB). If I want to find which cities are in a prairie province, then it should be Pass Against One Filter. Clearly no city can pass against all filters (ie no city can fall inside every province). It is in Manitoba OR Saskatchewan OR Alberta.

On the other hand, say the polygons represented different things that might overlap (a forested area, an area with good soil, and an area free of flood risk). If I want to find a city that is in a forested area, with good soil, and no risk of flood, then it should be Pass Against All Filters. It needs to be Forested AND Good Soil AND No Flood Risk.

Hope this helps.


dbklingdom
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • October 17, 2017

Ok I should put this down. Was finally able Get My M:M cardinality by using PointOnAreaOverlayer with Dan’s help. The output is still M:1, but a list can be generated. Then look for the field _overlaps if it is greater than one you have M:M. Use ListExploder set to _overlaps and you get your data. Now you can transform that merger back to spatial etc. One weird problem is that I had to connect an Inspector to the reject port to stop errors. https://knowledge.safe.com/questions/32599/certain-transformers-output-ffs-files.html.

If anyone can tell me what that is about, and how to bypass??


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings