Skip to main content

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

@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


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.


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.


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.


@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


@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.


Reply