Generate a single shapefile from various intersection agreements

3572
4
Jump to solution
05-25-2015 06:31 AM
RobertBeno
New Contributor

I have five vector files wherein I want to determine the spatial agreements among them using intersect. Here is my illustration. (Actually these are forest shapefiles from five different forest maps)

A = vector_file_1.shp
B
= vector_file_2.shp
C
= vector_file_3.shp
D
= vector_file_4.shp
E
= vector_file_5.shp

So that I will have a set of spatial agreement from 2/5, 3/5, 4/5 to 5/5. For example:

1)   2/5 = AB, AC, AD, AE, BC, BD, BE, CD, CE
2)   3/5 = ABC, ABD, ABE, ACD, ADE, ACE, BCE, BCD, BDE, CDE
3)   4/5 = ABCD, ABCE, BCDE, ACDE
4)   5/5 = ABCD

My question is what geoprocessing technique will I use to generate a single shapefile from each agreement above (except item # 4), supposing I've done the intersection combinations for agreement items 1-3? Will I use intersection again, union or other technique?

(My professor told me to just add a field and put a number code on that field, for each shapefile, unfortunately I forgot the next process he mentioned.)

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

You should use the Union overlay for this type of analysis. Before you do so, follow the instructions of your professor. Add a numeric field to each of the featureclasses and fill it with the value 1.

After the union of the the 5 featureclasses you can sum the 5 fields into a new field. You may have to select each if the numeric fields (fieldname IS NULL) and replace the NULL value with 0.

Since what I deduce from your explanation is that you are not interested in distinguishing between the different cases, just to denote where there is forest in 2, 3, 4 or all 5 input featureclasses, the sum of the numeric fields will result in a value ranging from 1 to 5. You are looking for the values 2 to 5.

On a side note, you were missing someting:

1)  2/5 = AB, AC, AD, AE, BC, BD, BE, CD, CE, DE

4)  5/5 = ABCD∩E

View solution in original post

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

Five different forest maps can mean several things.

  • there are from separate but adjoining areas
  • there are from the same area but the areas delineated as forest do not overlap in each shapefile
  • the areas are the same but the areas can overlap by varying degrees...perhaps representing different classification accuracies/methods

The first case would be a merge.  The latter two cases would depend upon the outcome you want

Intersect .... performs the geometric intersection ignoring all areas where there is no overlap, but retaining the attributes of both

Union ...   does the same but retains all areas, even those that don't overlap

And of course don't forget the other options Erase, Identity, Spatial Join, Symmetrical Difference and Update are all other overlay tools.

Your choice will depend upon how you want the geometry reconfigured during the operation (ie. compare  Identity, Union and Update) and how you want the attributes treated.

So if you can provide some answers to those questions, you will be done.  If you have a field with a unique code in each shapefile, then the attributes could be carried forward between operations.  In your final result, you could produce a new field and concatenate the various unique input fields into on.  This operation is equivalent to the Combine operation in raster world (amongst other tools).

Sorry for the slightly indirect answer...but I teach...and you will only learn by being pushed in the right-ish direction

JayantaPoddar
MVP Esteemed Contributor

Hi Robert,

You could create a single shapefile using Union of A,B,C,D and E shapefiles.

Then you could make the queries in attribute table (Select by Attributes) like

AB: IS NOT NULL AND IS NOT NULL

Export the selected features to a new shapefile, if required.

Repeat similar query for the desired combinations with "AND" operator in Attribute table



Think Location
DanPatterson_Retired
MVP Emeritus

Jayanta...I see you missed the point of my last sentence...It would be nice to see what Robert offered as his first venture first...

0 Kudos
XanderBakker
Esri Esteemed Contributor

You should use the Union overlay for this type of analysis. Before you do so, follow the instructions of your professor. Add a numeric field to each of the featureclasses and fill it with the value 1.

After the union of the the 5 featureclasses you can sum the 5 fields into a new field. You may have to select each if the numeric fields (fieldname IS NULL) and replace the NULL value with 0.

Since what I deduce from your explanation is that you are not interested in distinguishing between the different cases, just to denote where there is forest in 2, 3, 4 or all 5 input featureclasses, the sum of the numeric fields will result in a value ranging from 1 to 5. You are looking for the values 2 to 5.

On a side note, you were missing someting:

1)  2/5 = AB, AC, AD, AE, BC, BD, BE, CD, CE, DE

4)  5/5 = ABCD∩E

0 Kudos