Skip to main content
Solved

Spatial filter not giving the correct result.


Forum|alt.badge.img+2

I have a spatial filter that isn't giving me the correct result. I am trying to determine if a feature falls within a polygon. If it does it should pass. If it doesn't it should fail. I know the feature is within the polygon and therefore should be 'passing' but instead it keeps failing. I'm assuming I have something set incorrectly. These are my parameters:

 

Filter type: Multiple Filters

Pass Criteria: Pass against one filter

Support Mode: Support aggregates

Spatial Predicates to test: Contains candidate, touches candidate, intersects candidate

Use bounding box: no

Curve boundary rule: Default rule

 

Merge attributes is selected

Accumulation mode: Merge Filter

Conflict resolution: Use candidate

 

Preserves Feature Order: Per output port

Best answer by markatsafe

@chris28​ There are two coordinate systems:

  • SPHERICAL_MERCATOR for the Filter area
  • CANA83-10TM115-EAP for the Candidate

If I reproject the Filter area (test_against_poly) to CANA83-10TM115-EAP then the SpatialFilter seems to work as expected using the Spatial Predicates to Test: "Filter OGC-Intersects Candidate"

image

View original
Did this help you find an answer to your question?

6 replies

Forum|alt.badge.img+2

@chris28​ The usual reason SpatialFilter fails to make a match is because the the two input datasets have difference coordinate systems. If your inspecting your data in Data Inspector, switch off background maps.

If this isn't the problem, please feel free to attached a small sample dataset


Forum|alt.badge.img+2
  • Author
  • March 18, 2022

They are not in the same coordinate system but before the filter I am using the ESRIReprojector to project the data first. So therefore they should be in the same coordinate system when they are being matched. I've attached a sample of the data though.


Forum|alt.badge.img+1
  • March 20, 2022

Hello Chris, in my case it worked! You are using 2 different CS. I reprojected your "input_poly" to "test_against_poly" EPSG: 3400 --> EPSG: 3857 and instead of "SpatialFilter", I use AreaonAreaOverlayer. I hope it helps

123Sorry my FME is in German but I hope its still readable.


Forum|alt.badge.img+2
  • Author
  • March 21, 2022

Thank you gisgis. I am doing a reproject but the AreaonAreaOverlayer won't work as I don't want them both output. I just want the filter to check if the input_poly is located inside or touches the test_against_polygon. If it passes then it will move on to the next test.


Forum|alt.badge.img+2
  • Best Answer
  • March 22, 2022

@chris28​ There are two coordinate systems:

  • SPHERICAL_MERCATOR for the Filter area
  • CANA83-10TM115-EAP for the Candidate

If I reproject the Filter area (test_against_poly) to CANA83-10TM115-EAP then the SpatialFilter seems to work as expected using the Spatial Predicates to Test: "Filter OGC-Intersects Candidate"

image


Forum|alt.badge.img+2
  • Author
  • March 22, 2022
markatsafe wrote:

@chris28​ There are two coordinate systems:

  • SPHERICAL_MERCATOR for the Filter area
  • CANA83-10TM115-EAP for the Candidate

If I reproject the Filter area (test_against_poly) to CANA83-10TM115-EAP then the SpatialFilter seems to work as expected using the Spatial Predicates to Test: "Filter OGC-Intersects Candidate"

image

Thanks for your help markatsafe. I did have the reprojector but it wasn't giving me the correct result. I changed it up and now it's working.


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