Topology Overlays

The Overlay template appears in the template list when a geometry field, of type geom, geommfd, or geomwkb, has been picked in the Transform pane.  The Overlay template provides ESRI-style topology overlays using four different operations: identity, intersect, union, and update.   

 

The drawing to be modified is called the source drawing.   Topology overlays modify the source drawing by using objects in a second drawing layer, called the overlay drawing, to modify the source drawing.  Overlay template operations use only areas from the overlay drawing but they apply the operation and modify all types of objects, points, lines and areas, in the source drawing.

 

 

Topology overlay operations always create a new drawing and table for the Result destination.   The new component is a modified version of the source drawing, as modified by geometric operations using areas in the overlay drawing.

 

 

A simplified way to think of how overlays modify the source drawing is to think of objects in the overlay drawing as "cookie cutters" that modify objects in the source drawing they overlap by cutting out their shapes in the source drawing.   But that is only part of the story.

 

 

The reality is a much richer situation given that objects in the overlay drawing can combine in the usual Boolean set ways, to add, to intersect and so on, with objects in the source drawing.   It is like an overlay drawing "cookie cutter" that can both add and cut at the same time.

 

Using the Overlay template:

 

  1. Open a map that contains both the source drawing and the overlay drawing.

  2. In the Transform pane, pick the source drawing and the Geom field in that drawing.

  3. Double-click the Overlay template to launch it in the Transform pane.

  4. Choose the desired Operation.  

  5. Choose the Overlay drawing.

  6. Check the Overlay selection only box to use only selected areas in the overlay drawing.

  7. Specify a name pattern for fields passed through to the Result drawing.

  8. Name the New drawing and New table for the Result drawing.

  9. Check the Transform selection only box to apply the operation only to selected objects in the source drawing.

  10. Press the Transform button.

 

See the Transform - Geometry: Overlay topic.

 

Rules:

 

 

 

Overlay operations are different from spatial joins as used in the Join dialog:

 

 

Also:

 

 

Topology Overlay Operations

All overlays require two drawings: a source drawing that may contain areas, lines and points and an overlay drawing that must contain only areas. The areas in the overlay drawing guide the operation of the chosen overlay operation in modifying the source drawing to create a new, result drawing.

 

The result drawing will inherit all columns from both the overlay drawing and the source drawing. There is no mapping between the columns in the overlay drawing and the source drawing. Each resulting object inherits all attribute values from the overlay drawing and from objects in the source drawing from which it has been produced.

 

There are four ways to use an overlay drawing to modify the source drawing to create the modified source drawing result, called Identity, Intersect, Union and Update.   In the illustrations that follow the yellow drawing is the source drawing and the blue drawing is the overlay drawing.  In both cases the areas are shown as if they are made of thick paper or cardboard, to emphasize the cutting nature of the operations, to help convey the concepts involved.

 

The yellow source drawing has two areas.   The blue overlay drawing has three areas.

 

 

If we show the blue drawing with transparency we can see the relationship between the blue overlay drawing objects and the yellow source drawing objects.

Identity

The identity operation uses the boundaries of areas in the overlay drawing to split all areas, lines and points in the source drawing, and saves each resulting part of the original object from the source drawing into the specified Result destination.

 

To understand this operation, imagine that area boundaries in the overlay drawing are like a cookie cutter that cuts into pieces all overlapping objects in the source drawing.   The result is the source drawing is sliced into more objects.     Is "identity" a truly unhelpful name for this operation?  Yes, it is, but the name continues to stick  because legacy GIS packages have been calling it that since the Neolithic.   It is often easier to think of the identity operation as a cookie cutter operation.

 

Identity creates a result set of all the areas in the yellow source drawing, but cut up by their intersections with the areas in the blue overlay drawing. Instead of two areas in the yellow source drawing, the result is eight areas in the yellow source drawing. Each original yellow source drawing area has been split by its intersection with the three blue overlay drawing areas to create three smaller areas, plus a fourth area representing that part of the original yellow source drawing area not intersecting any blue overlay drawing areas.

Intersect

Intersects all objects in the source drawing with areas in the overlay drawing, and saves each resulting part of the original object from the source drawing that falls within an area in the overlay drawing into the specified Result destination.

 

Imagine this like pressing the source drawing against a steel wall where the only openings are cookie-cutter area boundaries in the overlay drawing.    We get all parts of the source drawing that are overlapped, and cut, by any area in the overlay drawing.

 

 

 

 

Intersect is like Identity but discarding all of the cut pieces in the source drawing that do not fall within an overlay drawing area.  

 

Topology overlays, as discussed in this topic, use the classic set-theoretic meaning of "intersect," in which objects that are entirely contained by other objects are said to intersect as well.   A different meaning is used in Select pane templates and spatial overlays, where an object that is entirely contained within another object does not "intersect" that object but is contained by that object.  

 

See an example in the Find Percentages of Open Space in ZIP Code Areas  video.

Union

Slice all objects in the source drawing using areas in the overlay drawing.  Next, slice all areas in the overlay drawing using areas in the source drawing.  Put all pieces together in the result, discarding duplicates.

 

More technically, the Union operation intersects all objects in the source drawing with areas in the overlay drawing and places each resulting part of the source drawing into the specified Result destination.  Next, the operation intersects all areas in the overlay drawing with areas in the source drawing and places each such resulting part into the result drawing, discarding duplicates.

 

Union is like a double cookie cut, first using the overlay drawing to cookie-cut the source drawing, then using the source drawing to cookie-cut the overlay drawing and then finally putting all the resulting pieces from both drawings together into the result.   That is equivalent to first doing an Identity onto yellow using blue as an overlay drawing, and then doing an Identity onto blue using yellow as an overlay drawing.   Duplicates for the six small pieces that intersect are removed, so that only one area in each such duplicated spot is put in the result.

 

 

Above we use the blue overlay drawing to cookie-cut the yellow source drawing.   Note that the two "outer" yellow source drawing areas are not within the blue overlay drawing areas.

 

 

Next we can imagine that the areas in the yellow source drawing are used to cookie-cut the areas in the blue overlay drawing.

 

We will discard duplicate areas that are found both in the sliced yellow areas as well as the sliced blue areas.  For the sake of illustration we will remove the duplicates from the sliced yellow areas as seen above.

 

 

Put all the pieces together into one result and we have a Topology : union operation result. The illustration at left shows where the pieces come from and the illustration at right shows the result.

Update

Intersect all objects in the source drawing with areas in the overlay drawing.  Remove the intersection result objects from the source drawing and place the remaining source drawing object pieces together with all of the overlay drawing areas into the result.  

 

This is like pushing the overlay drawing down into the source drawing, flattening into nothing any parts of the source drawing beneath any overlay drawing area.

 

 

The illustration at left shows where the pieces come from and the illustration at right shows the result.

Source Drawing and Overlay Drawing Examples

To launch an Overlay operation we first open the map that has both the source drawing and the overlay drawing as layers.  We click on the Transform pane and choose the source drawing, and the Geom field in that drawing.   We double-click the Overlay template to launch it in the Transform pane.   In the Overlay template we can choose the operation desired and the Overlay drawing to use.

 

It may seem that when doing an Overlay operation using any two drawings which drawing of the two we choose as the source drawing and which we choose as the overlay drawing does not matter, but that is true only for the Intersect and the Union operations in the limited case where both drawings contain only areas.   Even in that limited case the results for the Identity and the Update operations will be different depending on which drawing is the source drawing and which is the overlay drawing.

 

In general we can swap drawing roles from source drawing to overlay drawing only in the case where both drawings consist only of areas.  That is because the overlay drawing must always contain only areas.  If a given source drawing contains a mix of areas, lines and points, that is perfectly acceptable for a source drawing but a drawing that contains lines or points in addition to areas cannot be used as an overlay drawing.

 

Keeping the above in mind,  to better understand how topology overlays look we will consider how switching the roles of source drawing and overlay drawing changes the result, in the limited case where both drawings contain only areas.  

 

Consider two drawings, a yellow drawing with two areas and a blue drawing with three areas.

 

 

In the illustrations that follow we show the drawing which is the overlay drawing positioned above the source drawing.  

 

 

 

In the illustration above the upper, blue drawing is the overlay drawing and the lower, yellow drawing is the source drawing.

 

 

In the illustration above the upper, yellow drawing is the overlay drawing and the lower, blue drawing is the source drawing.

 

 It does not matter to Overlay operations which layer is higher or lower in a map.  In this topic the illustrations show the overlay drawing above the source drawing to exploit as a learning tool the usual English understanding of the word "overlay" as above something else, to help remember which is the overlay drawing and which is the source drawing.

Overlay : identity

The results of the Identity operation are different depending upon which of the two drawings we choose as the source drawing and which as the overlay drawing.  

 

Identity:  Yellow is the source drawing, blue is the overlay drawing.   The contents of the yellow source drawing, as sliced by the boundaries of blue areas, are placed into the results drawing.

 

 

Identity:  Blue is the source drawing, yellow is the overlay drawing.  The contents of the blue source drawing, as sliced by the boundaries of yellow areas, are placed into the results drawing.

 

Overlay : intersect

The results of the Intersect operation are the same regardless of which of the two drawings we choose as the source drawing and which as the overlay drawing.  

 

Intersect:  Yellow is the source drawing, blue is the overlay drawing.   Place in the result those areas formed by the intersection of objects in yellow and blue.

 

 

Intersect:  Blue is the source drawing, yellow is the overlay drawing.  The same result is obtained since the intersection of blue and yellow is the same.

 

Overlay : union

The results of the Union operation are the same regardless of which of the two drawings we choose as the source drawing and which as the overlay drawing.  

 

Union:  Yellow is the source drawing, blue is the overlay drawing.  Slice each drawing with the area boundaries of the other drawing and place all pieces from both drawings into the result, discarding duplicates.

 

Union:  Blue is the source drawing, yellow is the overlay drawing.  The result is the same since in both cases we slice each drawing with the area boundaries of the other drawing.

 

Overlay : update

The results of the Update operation are different depending upon which of the two drawings we choose as the source drawing and which as the overlay drawing.  

 

Update:  Yellow is the source drawing, blue is the overlay drawing.   Discard the areas of intersection from the yellow source drawing and keep all areas intact from the overlay drawing.

 

Update:  Blue is the source drawing, yellow is the overlay drawing.   The result is different because instead of discarding the areas of intersection from the yellow drawing we discard the areas of intersection from the blue source drawing and we keep all areas intact from the yellow drawing.

 

 

Update preserves all areas in the overlay drawing, removing anything from the source drawing that gets in the way of the overlay drawing.   We can think of Update as being an "updating" of the source drawing by using the overlay drawing as an overriding, dominant control.

 

For example, suppose we have a drawing of parcels that show property ownership.     A central group of triangular parcels is surrounded by a ring road.

 

 

Suppose there is a lake in the middle of the central group of triangular parcels, as shown below by a drawing of lakes in partially transparent form overlaying the drawing of parcels.

 

 

We would like to create a new parcels drawing that uses the overlay drawing of the lakes to blend the lakes areas into the parcels source drawing so that parcel lines are cut off at the edges of the lake without extending into the water body.   In legal reality, of course, the boundaries of parcels will often extend into water bodies, but to create a more understandable visual display we do not want to clutter up the lakes or ponds that we show with lines of parcels extending into them.

 

 

To create the above we use the Overlay : update operation with the parcels as the source drawing and the lakes as the overlay drawing.   The lakes area is "pressed into" the parcels drawing, with the lakes area taking priority over anything it overlaps.   

 

  

There are many reasons why we might want to override a source drawing layer with an overlay drawing layer using Update.   Applying water features, which are often invariant, to layers of other features such as boundaries is a classic example.   Once we "knock out" anything in the way of the water features we can then proceed, as in the illustration above, to format the areas showing water to more clearly indicate which parcels are waterfront and just how much dry land they may have.   Or, we may want to make calculations of dry land area for the purposes of paying property tax, not counting (as many jurisdictions do not) that part of the property which is underwater for the purposes of paying tax.

Overlaps

For best results, areas in the overlay drawing should not overlap each other.  When areas in the overlay drawing overlap each other, the operation will take the region of overlap and will assign it to one of the overlapping areas.

 

 

Consider a drawing with lines as seen at left above.   If we create buffers on those lines, the result might be something like seen at right above, where the various buffer areas in the buffers layer overlap in many complex ways.  

 

 

Suppose we now use the layer with buffers in a topology overlay operation.   Before the topology overlay is done, the complex arrangement of overlaps in the buffer areas as seen at left above will first be simplified into a non-overlapping set of objects, where regions of overlap between multiple objects will be assigned to only one of the objects.   The result will be something like the illustration at right above, where area objects do not overlap each other.   The illustration at right above has had an inner border added to make clear the edges of the area objects.

 

 

If we want to utilize the complex series of different regions implied by overlaps within the buffers drawing, we must first split up the various overlapping objects into separate, non-overlapping regions, as illustrated above.   See the 10 Minute Tutorial - Find Similar Lines video for an example of how that can be done.

Notes

Confusing Nomenclature - Topology overlay operations use old and somewhat mathematically misleading nomenclature because that is the established nomenclature which  the majority of GIS users expect. Most GIS people with advanced math education know perfectly well that the various geometric operations implemented in topology overlay operations are not really topological operations as mathematicians use the word.  But given the legacy GIS industry has used that nomenclature since Neolithic times it would be even more confusing to use different names, even if they were more mathematically accurate. 

 

Overlay is also a slightly misleading choice of word because the layer ordering,  which drawing is above or below another in the layer stack,  does not matter at all.  Since the overlay drawing works like a tool, operation, guide, stencil or pattern applied to the source drawing a more neutral name for it such as the stencil drawing or pattern drawing might have be clearer.  Be that as it may, the nomenclature is what it is so we all should become accustomed to it.

 

One last contribution to confusion is Manifold's own: what is called a source drawing by this documentation is often also referred to as the data drawing both in classic GIS discussions and also by Manifold's own programmers in technical presentations or comments on user forums.  On the one hand that is useful to match classic usage by other GIS systems but it can be really confusing to new users in terms of remembering which drawing is modified by the overlay drawing.   Using the words source drawing may clear that up.  Or not.

 

Fewer Limitations - The above overlays are similar to those in various legacy GIS systems, except that they are not subject to some of the limitations that some older GIS systems have. In particular, Manifold allows the source drawing to contain areas, lines and points and not just areas as is the case with some systems.   Manifold overlays these objects simultaneously without forcing us to perform the overlay operation once for each object type as would be required by some other systems. Manifold also automatically resolves overlaps between areas and other topological anomalies both in the source drawing and the overlay drawing, without forcing us to go through a separate topology cleaning step.

 

Two meanings of "intersect" - There are two notions of what "intersect" should mean, both of which are used by Manifold.   Topology overlays, as discussed in the Topology Overlays topic, use the classic set-theoretic meaning of "intersect," in which objects that are entirely contained by other objects are said to intersect as well.   A different meaning is used in Select pane templates and spatial joins in Join, where an object that is entirely contained within another object does not "intersect" that object but is contained by that object.  In the Join dialog and in Select pane templates, an object only intersects another object if some part of the object is outside the other object and some part is within the other object.   This allows the use of contained and containing to provide different selection criteria instead of simply duplicating what intersect does in a selection.

 

Question: What is a topologist?  Answer: Someone who cannot distinguish between a doughnut and a coffee cup.  

 

Videos

Find Percentages of Open Space in ZIP Code Areas  -  Uses Overlay : intersect:  Given a layer of polygons representing ZIP codes and a layer of polygons showing open spaces like parks and green spaces, find the percentage of open space in each ZIP code area.   This video shows how to do that start to finish in a few simple steps, from initial importing of shape files to final results, in just five minutes, with an additional six minutes of explanation what each step does.  Works in Manifold Release 9 or using the free Manifold Viewer.

 

See Also

Transform Pane

 

Transform Topics

 

Transform Reference