Merging multiple layers and adding a field that shows the name or number of input layer/s as an attribute

536
1
05-23-2023 09:07 PM
HelenSquires
New Contributor

Hi Brains Trust,

I have around 100 layers that I need to merge but I also need to be able to identify which input layers were used for each polygon created in the merge ie how to add an field which shows either input layer names or how many layers overlap to create the polygon ie 1 or 3 or 6. The ranking will help us determine whether to use certain polygons as it means it has occurred in a higher number of input layers.

I don't have script or model building experience. Any help would be fantastic.

Thank you.

0 Kudos
1 Reply
JohannesLindner
MVP Frequent Contributor

Hey Helen,

this will probably need a bit of Python.

 

Just to be clear: What type of "merge" are you talking about? Let's say we have two overlapping polygons in 2 layers:

JohannesLindner_0-1684910974989.png

 

Is your desired output the result of the Merge geoprocessing tool? This will combine multiple tables, each row of each table will be copied without editing. (Selection to show that they still overlap)

JohannesLindner_1-1684911114948.png

 

Or do you want the result of the geoprocessing tool Union? This works similar to Merge, but it creates the intersections as extra polygons. (Selection to show that the original polygons have been edited)

JohannesLindner_2-1684911233025.png

 

Or do you want the result of the editing tool Merge? This takes 2 geometries and turns them into one.

JohannesLindner_3-1684911381601.png

 

Or do you want something else?


Have a great day!
Johannes
0 Kudos