Skip to main content

I have 1 dataset with many overlapping features. These overlaps tend to have a different feature name. I have been given a list that tells me which name takes priority over the other. I want to find the overlaps and then just carry through the areas that take priority.

 

For instance ancient woodland trumps everything. Building footprints trump everything else. Wetlands and pumping stations trump grassed areas.

 

I have started with an AreaOnAreaOverlayer, generating a list (OverlapAttributes), AreaCalculator, Counter and Tester, where the _overlaps > 1. I've then added a ListExploder.

 

Where the '_area', '_count' and '_overlaps' are the same, I want to only take the feature with the highest priority name.

 

Am I going about this the right way?

I'm a lost as to where to go from here!

 

Attached is some test data and my workbench so far.

 

Thank you!

The next transformer will be an AttributeValueMapper to map the names to a priority value. So

Ancient Woodland = 1, Building Footprints = 2 etc

Then a Sorter to sort the features on _count first and Priority seconds. In Lowest to Highest order.

Then a Sampler to sample the first feature with Group By set to use the _count value.


The next transformer will be an AttributeValueMapper to map the names to a priority value. So

Ancient Woodland = 1, Building Footprints = 2 etc

Then a Sorter to sort the features on _count first and Priority seconds. In Lowest to Highest order.

Then a Sampler to sample the first feature with Group By set to use the _count value.

I'll give this a go, thank you!


Another approach, that makes use of list functionality.

Area priority 

  • Make sure all polygons hava a unique number (use the UUIDGenerator to create one)
  • Use the AttributeValueMapper to map the names to a priority value, as @Gary Nicholson​ proposes
  • Perform an AreaOnAreaOverlayer, add the feature name, priority and ID attributes to a list
  • Use a ListSorter on the priority attribute
  • Use a ListIndexer to write the values of listitem 0 (feature name, priority and ID ) into the corresponding attributes
  • Use a Dissolver on ID and feature name (or ID and priority) to combine adjacent objects with identical attributes
  • Optionally add an Aggregator on ID and feature name (or ID and priority) to combine disjunct objects with identical attributes

See the attached workspace (based on the solution to this question) for a mockup.


Another approach, that makes use of list functionality.

Area priority 

  • Make sure all polygons hava a unique number (use the UUIDGenerator to create one)
  • Use the AttributeValueMapper to map the names to a priority value, as @Gary Nicholson​ proposes
  • Perform an AreaOnAreaOverlayer, add the feature name, priority and ID attributes to a list
  • Use a ListSorter on the priority attribute
  • Use a ListIndexer to write the values of listitem 0 (feature name, priority and ID ) into the corresponding attributes
  • Use a Dissolver on ID and feature name (or ID and priority) to combine adjacent objects with identical attributes
  • Optionally add an Aggregator on ID and feature name (or ID and priority) to combine disjunct objects with identical attributes

See the attached workspace (based on the solution to this question) for a mockup.

Thank you! Hadn't thought about using a dissolver.


The next transformer will be an AttributeValueMapper to map the names to a priority value. So

Ancient Woodland = 1, Building Footprints = 2 etc

Then a Sorter to sort the features on _count first and Priority seconds. In Lowest to Highest order.

Then a Sampler to sample the first feature with Group By set to use the _count value.

@Gary Nicholson​ any idea how I retain the areas that did not overlap?

fmeAreas


@Gary Nicholson​ any idea how I retain the areas that did not overlap?

fmeAreas

Those ones are coming out of the failed port of the tester. IE. The _overlaps value is 0.


Another approach, that makes use of list functionality.

Area priority 

  • Make sure all polygons hava a unique number (use the UUIDGenerator to create one)
  • Use the AttributeValueMapper to map the names to a priority value, as @Gary Nicholson​ proposes
  • Perform an AreaOnAreaOverlayer, add the feature name, priority and ID attributes to a list
  • Use a ListSorter on the priority attribute
  • Use a ListIndexer to write the values of listitem 0 (feature name, priority and ID ) into the corresponding attributes
  • Use a Dissolver on ID and feature name (or ID and priority) to combine adjacent objects with identical attributes
  • Optionally add an Aggregator on ID and feature name (or ID and priority) to combine disjunct objects with identical attributes

See the attached workspace (based on the solution to this question) for a mockup.

I would have used the ListSorter as well rather than exploding the list, but I didn't want to completely rewrite the workspace as @Hannah Wheldon​ was almost there.

As always with FME there are multiple ways to do things.


@Gary Nicholson​ any idea how I retain the areas that did not overlap?

fmeAreas

@Gary Nicholson​ thank you for all your help! Slight facepalm moment with that last question!


I would have used the ListSorter as well rather than exploding the list, but I didn't want to completely rewrite the workspace as @Hannah Wheldon​ was almost there.

As always with FME there are multiple ways to do things.

@geomancer​ @Gary Nicholson​ good to see the other ways of doing this while I'm still in my early days of FME


Reply