Question

spatialrelator not functioning correctly


Badge +1
I am using a spatial relator for a very simple operation to determine if land parcels are within areas designated as Nitrate Vulnerable Zones in the UK. 

 

I feed in the NVZ layer into Supplier and the land parcels into the Requestor. 

 

I am using the SpatialRelator to tell me if the land parcels interact with the NVZ's at all. 

 

 

The Spatial Relator is not giving results for the land parcels but I cannot work out why. 

 

This is the sort of scenatios I have

 

 

and this is how I have the spatial Relator

 

 

 

 

Any assistance would be great. I have spent all morning trying to work it out. 

 

I looked at the AreaonArea but there are too many features to process. 

 

 

Thanks

 

Seb 

11 replies

Badge +2
Hi,

 

 

Please use only "WITHIN" option in "Tests to Perform" to know which polygons are inside the Supplier
Badge +2
Please see the attribute named "_related_candidates" in ourput. If it is > 0 then polygon is inside...
Badge +1
It is still not working correctly. This is one example. SR is not picking it up as related at all. i.e. _related_candidates = 0

 

Badge +2
Add 2DForcer for both requestor and supplier and check once.
Userlevel 1
Badge +21
Are you not getting any overlaps reported at all, or just in some instances, where you are expecting them?

 

 

Where polygons are very complex I have seen cases where various spatial comparisons in fme (clipper/area on area overlayer,/spatial relator) do not produce expected output in a minority of cases.
Badge +1
Thanks E.Gomm

 

it is just in some places where there should be an INTERSECT / WITHIN result but there isnt. I have tried to deaggregate but it doesnt make any difference. 

 

 

Did you find any solutions for the complex geom? 
Userlevel 1
Badge +21
None that solved 100% of the cases (there is a case outstanding with Safe), coordinate rounder or anchoredsnapper helped in some instances.
Badge

I am having a very similar issue whereby the SpatialRelator is not detecting all instances of intersecting area features. Did you ever find a solution for this @sebkingsley?

Userlevel 4
Badge +13

I am having a very similar issue whereby the SpatialRelator is not detecting all instances of intersecting area features. Did you ever find a solution for this @sebkingsley?

In FME 2016 we've been working hard on updating SpatialRelator, particularly around the issue of handling aggregate, or multi-part, features. I'd suggest giving a try to the latest FME 2016.0 beta , be sure to "upgrade" (off the right click menu of any existing SpatialRelator you may have had) and if it is still not giving you what you want then please do send an example in to support@safe.com .

Badge +3

Maybe you have aggregates? These will be rejected (see outputport) (use deaggregator on them)

Compound test should not be a problem.

You can check wich createria passed by doing following.

Set calculate cardinality to " yes". This will create a list with very usefull information.

One of wich is a list of pass-criteria, like this:

_relationships{0}.pass{0} (string): INTERSECTS

_relationships{0}.pass{0} (string): OVERLAPS

for each object with

_related_candidates > 0

btw: rejects dont have "_related_candidates = 0" for they have no such attributes.

Userlevel 2
Badge +16

Are both datasets in the same coordinate system? Different coordinate systems may also be a cause of the SpatialRelator not acting as desired. In that case you want to reproject your datasets into the same coordinate system first using the Reprojector.

Reply