Intersection Overlays Example
This case study is a small, but sophisticated, example that uses Transfer Rules, Split with, Clip with (Intersect) and Spatial Overlays commands. It uses Manifold System Release 5.00 Professional Edition with Service Pack 1 (SP1) installed. This example is an intermediate example that assumes basic familiarity with Manifold System.

Suppose we have a map with two drawings A and B that contain area objects that intersect each other. B contains green rectangles while A has blue triangles seen in 50% transparency so their overlaps with the B areas may easily be seen.

Both A and B have field names. The A drawing contains triangles and one field called Triangle with numeric values 1, 2, 3 or 4. The B drawing contains rectangles and one field called Square with text values Tom, Dick, Harry and Jane.
Our task is to create a new drawing that contains the spatial intersection of A and B, where all such objects have field values from both A and B. We also want the objects to be split up so that anywhere there is a boundary either from A or from B there will also be a boundary in the resultant drawing. This is a more complex task than simply finding the intersection of A with B where, say, just those parts of the B areas that are within the A areas are retained.
Step 1: Get ready
Like many GIS tasks, our task begins with a few preliminary steps to get organized. Begin by making a copy of B called B 2. Since we will operate on the B drawing we'll make a copy of the original drawing should we ever need it.

Right click onto the Triangle and the Square columns in the table windows and set the Transfer Rules for each to Copy in both directions.
We now need to arrange both drawings so that both A and B have fields of the same type. That is, we would like to equip the A drawing with a text field called Square and we would like the B drawing to have a numeric field called Triangle. With only two fields per drawing, we could quickly add one extra field to each drawing. However, if there are many fields involved we would like a faster way. Here is a fast trick:

Click on the A layer, click on one of the triangles and then Copy it. Click on the B layer and Paste the triangle into the B layer. This will add the fields from the A layer into the B layer. When pasted, the new triangle in the B layer will be selected. Since we don't need any triangles in the B layer, Delete it right away. The triangle will be gone but the new field structure will remain. Next, Copy a rectangle from the B layer and Paste it into the A layer. Delete the pasted triangle.

The result will be that both the A and the B drawings will now have the same fields. The newly-added fields will have default values (empty for strings, 0 for numbers) for the pre-existing objects. Note that the transfer rules established for these fields will be copied as well (which is one reason we set up the transfer rules as desired at the very beginning of this example).
Step 2: Make boundary lines in A
Since we will want to chop up the resultant areas by boundaries in both A and B, we'll need some boundary lines in A with which to cut objects.
![]()
Set up the transform toolbar as above and press Apply.

The result are lines in A that are the boundaries.
Step 3: Cut areas in B
We can now use the selected lines in A to cut the areas in B like wire through soft cheese.
![]()
Load the transform toolbar as seen above and press Apply.

This splits the areas in B along the boundary lines in A.

If we look at the table for B, we can see that new objects have been created. Because we previously set the 1:N Transfer Rules to Copy, each new area created from one of the four original rectangles inherited a copy of the Square value from its parent.
Step 4: Create intersection of A and B areas
We can now create the intersection of the A and B areas using the Clip with (Intersect) operator.
![]()
Set up the transform toolbar as above and press Apply. This will use the areas in A (the lines are ignored) to clip the B areas down to only their region of intersection with the A areas.

As can be seen, the result is that all of the B areas that lie outside A areas are deleted. Because we previously split the B areas using the boundary lines in A, the edges of the A and the B areas are perfectly aligned.

There are fewer records in the table since some of the B objects that lay outside the A areas have been deleted.
Step 5: Transfer A values to B areas
The final step is to use Spatial Overlays to transfer the values of A areas to those B areas they contain.
We want to transfer all of the values of the Triangle field from the A drawing to the B drawing. However, we don't want to transfer the empty value of the Square field.

So, we right click on the Square field in the A drawing's table and uncheck the Transfer Column box. Press OK.

We then click on the B layer and choose the Drawing - Spatial Overlay command. Our Source is all objects in A and the Target is all objects in B with the method being to transfer values from areas to contained areas. This will transfer values from areas in A to all B areas that are contained by them. Press OK.

Like magic, the Triangle field in the B drawing will be populated with the appropriate value from whatever A area contains it.
If we turn off the A layer and then select some of the areas in B we can see that the result of our operation is indeed a group of areas that are the intersection of the areas in A and B that are correctly split along all boundaries that occurred either in A or in B.

From the table we can see that each area has correctly inherited the value of whatever original B field it had as well as the value of the A area that overlaid it.
Notes
Why did we take the time to create the same field
structure in both drawings? The Spatial Overlay command can
transfer data between layers in maps only when those layers have exactly the
same field names and types, including the same transfer rules. 
Why did we create boundary lines in A and then use the Split with command? Why not simply use Clip with (Intersect) directly? We could do that, if desired. The difference would be that the areas in B would not be split along the boundaries of the areas in A. For example, as executed above the example results in two areas in B in the locations marked by red arrows in the illustration at right. These were both part of the same rectangle initially. Had we omitted the Split with command these would still be part of the same rectangle and after the Clip with (Intersect) command would be one area.
Like what you see? Now is the time to buy Manifold System and
get all these capabilities for yourself. It's only $245 and it
totally outperforms ancient systems from an earlier era. You get more power, better
ease of use and a spectacularly driven engineering organization working to serve you
better. While you are at it, why not order a copy of TIGER/Line 1997 as well? Visit
the Manifold.net
Online Store for a quick, easy, and secure purchase of Manifold
products, or (in the US) call 800-556-5919 to order by telephone (9-5
PST).
|
Home Page -
Products -
Search -
Support -
Shopping -
News -
Online Store Prices, terms and conditions, and product specifications subject to change without notice. Please contact Manifold Net with any special needs or requests. |