Question

Help with SpatialFilter / SpacialRelator Transformers?


Badge

Hello, I'm still new to FME and need some guidance on what transformer to use. What I need to do is filter on features from a GDB that are contained inside a polygon from another GDB, and if so copy only certain attributes from the Filter feature to the Candidate features.

The attribute field names will share the same name on what attribute values I need to set on the passed Candidate features. Is there a way to expose only the attributes that I want to merge from the Filter feature to set for the Candidate features? I don't want the Candidate features to have all of the attribute values of the Filter feature, just certain ones.

Example:

GDB containing polygon features that have an attribute COUNTY.

Separate GDB that will filter features on "contain" inside a polygon feature and copy the attribute value COUNTY from the polygon feature to the features that are contained inside the polygon.

So there are multiple polygon features in the Filter GDB, and multiple features in the Candidate GDB.

Thank you for any help.


2 replies

Badge +22

Put an attribute keeper on the filter features just prior to the spatialFilter/Spatial relator, to keep only the attributes you want to transfer to the candidates.

 

Do any of your filter features overlap? Could a candidate be inside more than one filter feature? If yes, use the SpatialRelator

If a candidate feature crosses the boundary of the filter feature. Do you want to assign the attributes or not? If yes, consider an intersects rather than contains.

Badge

Put an attribute keeper on the filter features just prior to the spatialFilter/Spatial relator, to keep only the attributes you want to transfer to the candidates.

 

Do any of your filter features overlap? Could a candidate be inside more than one filter feature? If yes, use the SpatialRelator

If a candidate feature crosses the boundary of the filter feature. Do you want to assign the attributes or not? If yes, consider an intersects rather than contains.

Ah.. the attribute keeper! Thanks @jdh

Reply