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 = A∩B, A∩C, A∩D, A∩E, B∩C, B∩D, B∩E, C∩D, C∩E
2) 3/5 = A∩B∩C, A∩B∩D, A∩B∩E, A∩C∩D, A∩D∩E, A∩C∩E, B∩C∩E, B∩C∩D, B∩D∩E, C∩D∩E
3) 4/5 = A∩B∩C∩D, A∩B∩C∩E, B∩C∩D∩E, A∩C∩D∩E
4) 5/5 = A∩B∩C∩D
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.)
Solved! Go to Solution.
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 = A∩B, A∩C, A∩D, A∩E, B∩C, B∩D, B∩E, C∩D, C∩E, D∩E
4) 5/5 = A∩B∩C∩D∩E
Five different forest maps can mean several things.
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
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
A∩B: 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
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...
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 = A∩B, A∩C, A∩D, A∩E, B∩C, B∩D, B∩E, C∩D, C∩E, D∩E
4) 5/5 = A∩B∩C∩D∩E