Question

Cut overlapping polygons based on date

  • 17 January 2023
  • 8 replies
  • 7 views

I have a polygon layer with overlapping polygons. These polygons have dates. What I would like to have is no more overlapping polygons.

Where two or more polygons overlap, I would like to preserve the youngest polygon. If the size of the overlapping polygons are different, then I would like to cut out the youngest polygon and preserve what is left from the older polygon.


8 replies

Userlevel 4
Badge +30

Hi @joost​ Please, could you share your example?

Badge +10

An AreaOnArea Overlayer should work here, if you build a list which includes the date, you can then sort this list in descending order and use the first list element as the date for the polygon

Badge +2

@joost​ Thanks for including some sample data. I think something along the lines of this might get you close:

imageAreaOnAreaOverlayer as mentioned above, but create a list of the dates (DATUM). Use ListSorter to sort the date list then Dissolve on the first date in the list.

Example attached (FME 2022.2)

Hi everyone,

 

I am still trying to get it working. Looks like the date field is not doing what I want it to do. Still looking for the right answer, despite the help I allready got here. I put the databases and the workbench as attachment.

 

What I want as a result is that there are no overlapping areas anymore and that the newwest (by date) polygon stays, and even cuts out of an underlaying bigger polygon.

I forgot the attachment, so here it is

Badge +10

Hi everyone,

 

I am still trying to get it working. Looks like the date field is not doing what I want it to do. Still looking for the right answer, despite the help I allready got here. I put the databases and the workbench as attachment.

 

What I want as a result is that there are no overlapping areas anymore and that the newwest (by date) polygon stays, and even cuts out of an underlaying bigger polygon.

Do you have an example where the output is not as you expect? If I look at polygons with ID 18 and 221 which overlap, 221 is more recent so this shape is cut out of 18

 

Edit: i think the step you are missing is making sure the features that are kept have the information of the most recent polygon. I would build a bigger list with all the relevant attributes then use a listindexer after the sorter to retrieve all the information from the most recent polygon in the list

Do you have an example where the output is not as you expect? If I look at polygons with ID 18 and 221 which overlap, 221 is more recent so this shape is cut out of 18

 

Edit: i think the step you are missing is making sure the features that are kept have the information of the most recent polygon. I would build a bigger list with all the relevant attributes then use a listindexer after the sorter to retrieve all the information from the most recent polygon in the list

You are absolutely right with your edit. It's about the information. Building a bigger list I can do here, i suppose:

imageThe listindexer I will try to explore, never used it.

 

Thanks, for so far, and maybe I will return if I cant get it right.

Do you have an example where the output is not as you expect? If I look at polygons with ID 18 and 221 which overlap, 221 is more recent so this shape is cut out of 18

 

Edit: i think the step you are missing is making sure the features that are kept have the information of the most recent polygon. I would build a bigger list with all the relevant attributes then use a listindexer after the sorter to retrieve all the information from the most recent polygon in the list

Looks like it is working, with this set up:

image

Reply