Question

Best way to use the same feature types many times in a workspace


 

I am new to FME and would like some feedback if possible on a workspace I have set up. I’m sure there is a better way to structure it but I am stuck for ideas.

I am wanting to join one attribute (site_code) from three different polygon feature classes (Facility sites, Open Space sites, and Road sites) to another polygon feature class (landfill sites).

Before I start assigning site codes I am wanting to temporarily convert my landfill site data from a polygon to a point to get the centroid inside the polygon. I have used the CentrePointReplacer Transformer to do this with the Mode set to ‘Inside Point’. Is this the best approach?

I then want to run the temporary landfill points through a series of checks to assign them a site code:

  1. The first check needs to find what Facility sites the landfill sites fall on and assign them a facility site code. Anything that didn’t get a facility site code moves onto the next check.
  2. The second check needs to find what Open Space sites the landfill sites fall on and assign them an Open Space site code. Anything that didn’t get an Open Space site code moves onto the next check.
  3. The third check needs to find what Road sites the landfill sites fall on and assign them a Road site code. Anything that didn’t get a Road site code moves onto the next check.
  4. The Fourth check goes back to find what Open Space sites the landfill sites fall on with a 20 metre maximum distance applied and assigns them the matching Open Space site code. Anything that didn’t get an Open Space site code here moves onto the next check.
  5. And the lastly check goes back to find what Road sites the landfill sites fall on with a 50 metre maximum distance applied and assigns them the matching Road site code.
  6. After all the above checks anything left with no site code matches just gets assigned a generic code.

At the moment I only have one feature class I am processing in the workspace this way but eventually I will need to have 56 different feature classes using the same three site feature types which is going to get super messy to manage I imagine. What is the best way to use the same feature types (of a reader) multiple times in a workspace?

Any suggestions on how I could improve this process would be greatly appreciated.

Thanks so much in advance.


2 replies

Userlevel 5
Badge +25

You can use the Merge Filter (in the feature type's parameters) to route all input feature types that match a wildcard or regex through that single one.

Badge +3

@map1234

 

What you describe is a traditional overlay.

 

I would expose the fme_feature_type format parameter (on the readers themselves or using a attribute exposer).

 

The tolerances(or as u call it "maximum distance") you can add to the feature types by using a Bufferer.

Then send all to a single AreaOnAreaOverlayer.

Have the AoAo create a list.

Group the landfills by their (unique) id and merge the lists if needed (can be done without).

All related objects now have their "matches" in the lists.

Use a list duplicate remover on the relevant attribute.

Query the list.

 

Your setup seems to work like a test filter, that is once something is matched, it will not be used to match to another feature type. (which assume that no landfill site falls in more than one of the other sites; Is this true? Then it's ok, else its erroneous.)

 

 

Reply