Solved

How to create overlaps with the name of the both polygons (which overlaps)?

  • 8 September 2022
  • 7 replies
  • 34 views

Badge

I have two polygons which overlaps and I use transformers to have the intersection (I tried Clipper, AreaOnareaoverlayer, spatialrelator and intersection) . So, it created a new polygon (the overlap of the two polygon.) The problem is that this new polygon belongs (in the attribute table) to one of the two polygon (The feature name of the new polygon is the name of one of the polygon) but I would like the name of the both polygon even if it created two overlap (the same but one with the name of the first polygon and one witch the second).

 

Thanks you

 

icon

Best answer by geomancer 8 September 2022, 17:36

View original

7 replies

Userlevel 4
Badge +36

You're on the right track with the AreaOnAreaOverlayer. In this transformer, create a list on the attribute that contains the polygon name. This will add the names of all overlapping polygons to the list. Next, use a ListConcatenator to write all these names back to the attribute that contains the polygon name.

Overlapping_Polygons_with_names

Badge

Thanks but it doesn't work even if I did what you did...I had to use "clipper" after "areaOnareaOverlayer" because the two polygons I want to intersect are in two diferent layer... With only areaOnareaOverlayer I only have missing attributes... So, to do what you did I tried with AreaOverArea only, then with Clipper after AreaonArea and with CLipper and after, listBuilder (and then, list sorter and list concatenator) but nothing works...

Userlevel 4
Badge +36

ListBuilder should not be necessary. Also there should be no need for Clipper just because the polygons are on two different layers, as AreaOnAreaOverlayer will combine the features from both layers.

However there may be a problem when the different layers have a different attribute for the polygon name, so you would have to rename the name attribute on one of the layers.

Overlapping_Polygons_with_names_2

Badge

ListBuilder should not be necessary. Also there should be no need for Clipper just because the polygons are on two different layers, as AreaOnAreaOverlayer will combine the features from both layers.

However there may be a problem when the different layers have a different attribute for the polygon name, so you would have to rename the name attribute on one of the layers.

Overlapping_Polygons_with_names_2

Oh thank you! But, I have the two names in the same case (as you have) , and I want in two separate case (features). Your first and third lines represent the part of the squares that don't overlap.

I tried with "AttributeExposer" but it only divides the two polygons in two attributes (not by comma), but I would like two features. For example (screen) (I would like the first or the second table. Thanks !

Example_overlaps

Userlevel 4
Badge +36

Forgive me, apparently I misunderstood your question. Depending on your exact needs you can use an AreaOnAreaOverlayer or a SpatialRelator. In both cases set Attribute Accumulation to Merge Attributes.

Objects_in_Cities

Badge

Forgive me, apparently I misunderstood your question. Depending on your exact needs you can use an AreaOnAreaOverlayer or a SpatialRelator. In both cases set Attribute Accumulation to Merge Attributes.

Objects_in_Cities

Ohh no your polygons were good ! (Two polygons which overlaps) and that correspond to the tables I sent you. I want that the intersection between the two polygons appears twice, once with the name of the first polygon et once with the name of the second polygon (as you seen in my table). Imagine that a city is in two areas (object). I want a feature which tell us that the city1 is in a area and another feature which tell us that the city1 is the second area too. For now, I only have the feature city1 that appears once with the name of an only area.

Sorry It's complicated because my english is bad

Userlevel 4
Badge +36

So, something like this?

Overlapping_Polygons_and_CitiesIf not, can you provide some sample data (or mock-up data) of cities and objects (areas)?

Reply