Question

finding and estimate spatial intersection between 2D polygones


Hello FME Community,

I got a problem with polygones (Buildings), which intersect each other. The data is given as 2D Polygones (or maybe as 3D, but better would be, if I could solve the problem with the 2D Dataset). Each Polygone got an ID. Each polygone got the attribute "height". Some Buildings are so complex, that they are mapped as many polygones with the same ID.

To review the situation: I got 2D polygones and some of them are intersecting each other. This could be in many ways, Sometimes 1 Polygone is just intersected by another, but there are many situations, in which the polygones are intersected by more then 1 polygone. It happend, that one polygone is with 100% of its Volumen in another one (100% overlapping). On top, in could happen, that the polygone is intersected by another polygone with the same ID and by polygones with another ID (so the grouped by doesnt work).

 

The Goal: I Need to figure out the Volumen of each polygone without the intersections. The intersected part must be attached to the biggest polygone in Volumen. The new determined Volumen is going into a new Attribute called P_VOLUMEN (so neither the geometry nor the Attribute "height" is touched). It doesn't matter, if the intersected polygones belong to each other (same ID) or not. In result each polygone got his old attributes and geometry + a Attribute called P_VOLUMEN in wich stands the new determined Volumen given by height * new area (included the intersection).

I draw a Picture with paint to illustrate the Situation (in this, both polygones got the same height).

If it's possible, I would like to create a 2nd table like:

ID Polygone A | overlapps About XY % | with ID B | and this is XY % of ID A's original Volumen (the | means, that this is a Attribute).

Thank u so much for ur help and sorry for my bad english.


15 replies

My first guess was this solution:

 

  1. calculate the Volumen
  2. AreaOnAreaOverlayer; to cut the overlapping polygones into separeted pieces
  3. Aggregator (grouped by ID) + Dissolvert; to merge all pieces together (here I make my first mistake because the intersection could happend between polygones which got not the same ID) and dissolve the multipolygones.
  4. calculate the P_Volumen
  5. Join the new Volumen on the old Polygones. But after that I got the same polygone several times each time with different P_VOLUMEN, I created (with AreaonArea, Agg + Diss) multipart polygones.

but with this Workflow, I dont respect the fact, that the overlapping could happen between polygones with different IDs.

2. guess:

  1. calculate Volumen
  2. AreaOnAreaOverlayer
  3. new Volumen
  4. ListBuilder (grouped by ID); over the new Volumen
  5. ListSummer; to get the P_VOLUMEN

samesame, I dont respect the fact, that the overlapping could happen between polygones with different IDs.

Now I be at one's wits' end.

 

Any ideas??

Badge +6

@knigge

I was trying to solve your problem.I hope my way can help you.

 

 

I'll put a screenshot online for you. Maybe this solution will be enough for you.Greez Michael
Badge +6

@knigge

I was trying to solve your problem.I hope my way can help you.

 

 

I'll put a screenshot online for you. Maybe this solution will be enough for you.Greez Michael

https://knowledge.safe.com/questions/38221/percentoverlap-transformer-compatibility.html

@knigge

I was trying to solve your problem.I hope my way can help you.

 

 

I'll put a screenshot online for you. Maybe this solution will be enough for you.Greez Michael

Hey featuremichael, thank u so much.

I didn't tryied it yet, but I will rebuild it now in my workflow.

Maybe u could offer me this little example as a fme-file?

Badge +6

@knigge

I was trying to solve your problem.I hope my way can help you.

 

 

I'll put a screenshot online for you. Maybe this solution will be enough for you.Greez Michael

If i understand it false what u mean.

please explane to me what u need.

1.Grey ?

2.Orange ?

or The Sum of Grey and Orange ;-)

 

If i understand it false what u mean.

please explane to me what u need.

1.Grey ?

2.Orange ?

or The Sum of Grey and Orange ;-)

 

In this case, the Right Building is bigger (got a bigger Volumen) as the left one. So the overlapping part depends to that one.

So I Need the original Volumen of both (as given by area*height) and I Need the new P_VOLUMEN from Right (which should be in this case the same like the original Volumen, cause it get the overlapping part) and the P_VOLUMEN from the left one, which should be original Volumen - overlapping part.

Userlevel 1
Badge +10

My first guess was this solution:

 

  1. calculate the Volumen
  2. AreaOnAreaOverlayer; to cut the overlapping polygones into separeted pieces
  3. Aggregator (grouped by ID) + Dissolvert; to merge all pieces together (here I make my first mistake because the intersection could happend between polygones which got not the same ID) and dissolve the multipolygones.
  4. calculate the P_Volumen
  5. Join the new Volumen on the old Polygones. But after that I got the same polygone several times each time with different P_VOLUMEN, I created (with AreaonArea, Agg + Diss) multipart polygones.

but with this Workflow, I dont respect the fact, that the overlapping could happen between polygones with different IDs.

2. guess:

  1. calculate Volumen
  2. AreaOnAreaOverlayer
  3. new Volumen
  4. ListBuilder (grouped by ID); over the new Volumen
  5. ListSummer; to get the P_VOLUMEN

samesame, I dont respect the fact, that the overlapping could happen between polygones with different IDs.

Now I be at one's wits' end.

 

Any ideas??

This looks along the lines of the approach I would take, I attach an example with some very simple data as per your example

overlapping_polygons.fmw

@knigge

I was trying to solve your problem.I hope my way can help you.

 

 

I'll put a screenshot online for you. Maybe this solution will be enough for you.Greez Michael

Is there the Option to PN you?

I tried to build ur workflow. But somehow I made a mistake. Maybe u could upload the file?

But it seems, that Maybe this is the solution.

Badge +6

Is there the Option to PN you?

I tried to build ur workflow. But somehow I made a mistake. Maybe u could upload the file?

But it seems, that Maybe this is the solution.

volume.fmw <-- FME 2017.1.1.1 WIN32

I know that this is not the full solution but a way to get closer to the end.

I'll give it a try next day.

 

 

( if u will write me something, just reply any message + Set the Viewable by (under the SUBMIT Button to "Viewable by Original Poster)

p.s: i speak german too ;-)

This looks along the lines of the approach I would take, I attach an example with some very simple data as per your example

overlapping_polygons.fmw

Hey ebygomm,

thank u so much … it Looks like, we are on a good way. I tested ur workflow and it did a good Job. But as the resultes, there are some polygones missing. The Thing is, that I Need to hold all polygones and just adding a new Attribute called P_VOLUMEN which Shows the Volumen respect the overlapping.

I give u a example Building.... okay, I cant upload *.zip or *.shp files.

Userlevel 1
Badge +10

Hey ebygomm,

thank u so much … it Looks like, we are on a good way. I tested ur workflow and it did a good Job. But as the resultes, there are some polygones missing. The Thing is, that I Need to hold all polygones and just adding a new Attribute called P_VOLUMEN which Shows the Volumen respect the overlapping.

I give u a example Building.... okay, I cant upload *.zip or *.shp files.

So there are cases where polygons completely overlap and in this case the P_VOLUMEN of the smaller polygon would be 0?

So there are cases where polygons completely overlap and in this case the P_VOLUMEN of the smaller polygon would be 0?

Good morning,

correct, in this case, the P_VOLUMEN of the smaller one would be 0 (and the Attribute VOLUMEN holds the original Volumen).

I tried it the way, that I estimate the new P_VOLUMEN and Joint just this Information (left ID <-> Right ID) on the original dataset. So I can be sure, that I dont modify the geometry and the original Attributes are not touched.

The keyinformation I Need to solve this Problem is "which polygones overlapping eachother and how big is this?". So if I could get the Information like:

  1. ID
  2. VOLUMEN
  3. overlapped by XY, with XY qm (e.g. as a list)

then, I think, i could solve the problem

Userlevel 1
Badge +10

Good morning,

correct, in this case, the P_VOLUMEN of the smaller one would be 0 (and the Attribute VOLUMEN holds the original Volumen).

I tried it the way, that I estimate the new P_VOLUMEN and Joint just this Information (left ID <-> Right ID) on the original dataset. So I can be sure, that I dont modify the geometry and the original Attributes are not touched.

The keyinformation I Need to solve this Problem is "which polygones overlapping eachother and how big is this?". So if I could get the Information like:

  1. ID
  2. VOLUMEN
  3. overlapped by XY, with XY qm (e.g. as a list)

then, I think, i could solve the problem

If is just the complete overlaps that are missing you could use this sort of process on the end, to add in any polygons that don't exist in the final data and set the value of P_VOLUMEN to zero

If is just the complete overlaps that are missing you could use this sort of process on the end, to add in any polygons that don't exist in the final data and set the value of P_VOLUMEN to zero

Thank you so much, it seems, that the Problem is solved.

 

I will run the complet Workflow now for all data we got and a colleague of mine will check it.

 

Thank u again!

This looks along the lines of the approach I would take, I attach an example with some very simple data as per your example

overlapping_polygons.fmw

Hey ebygomm,

I got antoher question.

In ur Workflow, the Accumulation Moden in the Aggregator (Aggregate based on id) is set on "Merge Incoming Attributes". This causes some troubles.

To explain: in the beginning of my workflow I use the transfomer "UUIDGenerator" and this _uuid is used serveral times to merge splittet pathes together (joiner or merger). After the overlapping path the _uuid is used again. What happend in the Aggregator and Accumulation Mode: Merge Incoming Attributes is, that, if the ID changed cause of ur ListSorter and AttributeCreator, the _uuid changed too. So afterwards, when I joined the overlappath (which I just use for some Polygones) with my original data (just the P_VOLUMEN and some other Attributes) it happend, that for 1 Polygone in the original data (_uuid) I got 2 or more Polygones in the overlappath and so I got this Polygone in my final data duplicated with different P_VOLUMEN attributes.

I think, I could solve the problem simple change the Accumulation Mode to "Use Attributes From One Feature". The sum out of new_area should be not effected by that. But then, if I get the Accumulation Mode right, the Aggregator will hold the Attributes from the in area biggest Polygone. This could make troubles too.

Or, maybe better, I just keep the id and the new_area attribute in the ListSorter Path and aggregat then. So the Attribute _uuid will not touched.

Just asking ....

Reply