Transform - Geometry: Overlay

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.   

 

Overlay template operations act on the source drawing to produce a modified source drawing result based upon patterns in the overlay drawing.  Overlay operations change the geometry, that is, the number and shapes of objects, in the result.    See the Topology Overlays topic for an illustrated, conceptual guide to topology overlays.

 

 

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 overlay 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 template only to selected objects in the source drawing.

  10. Press the Transform button.

 

Rules:

 

 

 

 

Examples utilize two sample drawings,  Source Yellow and Overlay Blue, and show the result of different overlay operations between them.

 

 

The Source Yellow drawing consists of two areas that have been individually styled in different shades of yellow using Style overrides, with a Name field giving the name of the color.

 

 

The drawing Overlay Blue drawing contains three areas that have been individually styled in different shades of blue using Style overrides, with a Name field giving the name of the color.

 

 

Overlay

Perform an ESRI-style topology overlay on a pair of drawings in a map using identity, intersect, union, or update. The result drawing includes fields from the source drawing (transferred using the original field names) as well as fields from the overlay drawing (transferred using original names as modified based on the specified pattern, by default Overlay {name}). Both drawings can be restricted to the selection.  Options in the Operation box are:

 

  • identity - Use the boundaries of areas in the overlay drawing to split all areas, lines and points in the source drawing, and save each resulting part of the original object from the source drawing into the specified Result destination.
  • intersect - Intersect all objects in the source drawing with areas in the overlay drawing, and save 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.
  • union - Intersect all objects in the source drawing using areas in the overlay drawing, and then intersect all areas in the overlay drawing using areas in the source drawing.  Save all resulting pieces, discarding duplicates, from both operations into the specified Result destination.
  • update - Intersect all objects in the source drawing with areas in the overlay drawing.  Remove the intersection result objects from the source drawing and save the remaining source drawing object pieces together with all of the overlay drawing areas into the specified Result destination.

 

Launch the template by choosing a geometry field and then double-clicking the Overlay template.  When the template launches we can specify options.

 

 

Overlay : identity

Use the boundaries of areas in the Overlay drawing to split all areas, lines and points in the source drawing, and save each resulting part of the original object from the source drawing into the specified Result destination.

 

This operation is like using the boundaries of areas in the Overlay drawing as a "cookie cutter" to slice through objects in the source drawing.

 

 

With the focus on the map, in the Transform pane we choose the Source Yellow drawing and the Geom field.  

 

 

We then choose the Overlay template.

 

 

In the Overlay template we choose the identity operation.   For the Result we choose New Table, and then we enter Identity for the name of the New drawing, also entering an analogous name for the New table.  The name could be anything, but we will use a name that reminds us of the operation used to create the drawing.

 

Press Transform.  

 

A new drawing called Identity appears in the Project pane along with the new drawing's table.  We drag and drop the new Identity drawing into the Map, and we style it using Style overrides to use the Style field inherited into the new table by the identity operation.  

 

 

Because all of the resulting objects in the result Identity drawing include a Style field inherited from one of the two objects in the Source Yellow drawing, all of the objects are colored one of the two shades of yellow from that drawing, depending on which of the two objects participated in the intersection.

 

 

All of the objects except the two selected objects in the row above have inherited fields from the Overlay Blue drawing.   We have selected the two objects that have not inherited any fields from the Overlay Blue drawing.

 

 

Those two objects represent regions in the two, original Source Yellow objects that were not intersected by any of the objects in the Overlay Blue drawing.

 

Overlay : intersect

Intersect all objects in the source drawing with areas in the Overlay drawing, and save 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.

 

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

 

 

With the focus on the map, in the Transform pane we choose the Source Yellow drawing and the Geom field.  

 

 

We then choose the Overlay template.

 

 

In the Overlay template we choose the intersect operation.   For the Result we choose New Table, and then we enter Intersect for the name of the New drawing, also entering an analogous name for the New table.  The name could be anything, but we will use a name that reminds us of the operation used to create the drawing.

 

Press Transform.  

 

A new drawing called Intersect appears in the Project pane along with the new drawing's table.  We drag and drop the new Intersect drawing into the Map, and we style it using Style overrides to use the Style field inherited into the new table by the intersect operation.  

 

 

Because all of the resulting objects in the result Identity drawing include a Style field inherited from one of the two objects in the Source Yellow drawing, all of the objects are colored one of the two shades of yellow from that drawing, depending on which of the two objects participated in the intersection.

 

 

There are no records which do not include fields from the Source Yellow drawing, since the intersect operation produces objects that must contain regions from both the source drawing and the Overlay drawing.

 

See the Example: Overlay : Intersect topic for an example.

 

Overlay : union

Intersect all objects in the source drawing using areas in the Overlay drawing, and then intersect all areas in the Overlay drawing using areas in the source drawing.  Save all resulting pieces, discarding duplicates, from both operations into the specified Result destination.

 

Union is like a double cookie cut operation, 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.   Discarding duplicates, put all pieces into the Result.

 

 

 

With the focus on the map, in the Transform pane we choose the Source Yellow drawing and the Geom field.  

 

 

We then choose the Overlay template.

 

 

In the Overlay template we choose the union operation.   For the Result we choose New Table, and then we enter Union for the name of the New drawing, also entering an analogous name for the New table.  The name could be anything, but we will use a name that reminds us of the operation used to create the drawing.

 

Press Transform.  

 

A new drawing called Union appears in the Project pane along with the new drawing's table.  We drag and drop the new Union drawing into the Map, and we style it using Style overrides to use the Style field inherited into the new table by the union operation.  

 

 

Not all of the resulting objects in the result Identity drawing include a Style field inherited from one of the two objects in the Source Yellow drawing, so only some of the objects are colored one of the two shades of yellow from that drawing.   

 

Objects colored in default gray were constructed only from Overlay Blue drawing objects, so they contain NULLs in fields inherited from the Source Yellow drawing.

 

 

We select objects that have NULLs in fields inherited from the Source Yellow drawing.

 

 

In the map we can see that those selected objects correspond to regions that were covered by the Overlay Blue drawing, but not the Source Yellow drawing.

 

Overlay : update

Intersect all objects in the source drawing with areas in the Overlay drawing.  Remove the intersection result objects from the source drawing and save the remaining source drawing object pieces together with all of the Overlay drawing areas into the specified Result destination.

  

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.

 

 

 

With the focus on the map, in the Transform pane we choose the Source Yellow drawing and the Geom field.  

 

 

We then choose the Overlay template.

 

 

In the Overlay template we choose the update operation.   For the Result we choose New Table, and then we enter Update for the name of the New drawing, also entering an analogous name for the New table.  The name could be anything, but we will use a name that reminds us of the operation used to create the drawing.

 

Press Transform.  

 

A new drawing called Update appears in the Project pane along with the new drawing's table.  We drag and drop the new Update drawing into the Map, and we style it using Style overrides to use the Style field inherited into the new table by the update operation.  

 

 

Not all of the resulting objects in the result Identity drawing include a Style field inherited from one of the two objects in the Source Yellow drawing, so only some of the objects are colored one of the two shades of yellow from that drawing.   

 

Objects colored in default gray are Overlay Blue drawing objects pushed into the result drawing, so they contain NULLs in fields that other objects inherited from the Source Yellow drawing.

 

 

We select objects that have NULLs in fields inherited from the Source Yellow drawing.

 

 

In the map we can see that those selected objects correspond to Overlay Blue drawing objects that have been "pushed" into the result.

 

 

Notes

Curvilinear segments - As a practical matter, most people doing GIS will use straight line segments for lines and areas.   Few GIS systems do a good job of supporting curved segments, so there is much less data published using curved segments.   Manifold's ability to work with curved segments allows us to use that data within Manifold in a limited way, at least for display and interactive editing.  

 

However, most processing tools in Manifold, such as Transform templates and various Geom SQL functions, do their work by first converting a curvilinear segment into a straight line segment between the same two start and finish coordinates.  That will often lead to weird or otherwise unexpected results.  To avoid such problems, first convert curvilinear segments into equivalent constellations of straight line segments at whatever resolution is desired, using the Clean transform template with the convert curves to lines operation option and the number of linear segments desired to approximate the curve in the Curve limit parameter.   See the Curved Segments discussion in the Drawings topic.

 

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.

 

Different from topology operations in Join - Transform template Overlay operations are different from overlay operations in the Join dialog:

 

 

It is easy to take for granted the meaning of such common words but all the same there are a few technical nuances in spatial overlays as follows:

 

Overlay Adjacent

Adjacent means that both objects have at least one boundary location in common but have no interior locations in common.  

 

An object that is adjacent to another object is touching, but it does not intersect the other object.  Objects that are contained by or are containing another object are not adjacent.

Overlay Contained

Contained means that all locations of the contained object are entirely within the containing object.

 

An object that is contained by another object is touching that other object but it is not adjacent and it is not intersecting.

Overlay Containing

Containing means that all locations of the contained object are entirely within the containing object.

 

An object that is containing another object is touching that other object but it is not adjacent and it is not intersecting.

Overlay Intersecting

Intersection means that both objects have at least one interior location in common and also at least one exterior location not in common.

 

An object that intersects another object is touching, but it is not adjacent to the other object.  Objects that are contained by or are containing another object are not also intersecting, since to be intersecting some part of the object must within and also some part of the object must be outside of the other.

 

This is the same meaning of intersection used in Select pane templates, but it is a different meaning than used in topology overlays, as discussed in the Topology Overlays topic,.  Topology overlays use the classic set-theoretic meaning of "intersect," in which objects that are entirely contained by other objects are said to intersect as well.

Overlay Touching

Touching means that both objects have any location in common.  

 

One object that is touching another object may or may not be intersecting, and it may or may not be adjacent to the other object.  Objects that are contained by or are containing another object are also touching.

 

Consider the following example diagram, where the rectangular yellow area is in the target drawing and the other objects are in green, purple and blue overlay drawings.  The small diamond, and small circle shapes mark the location of point objects.   The black line, purple line, and right-angle green line objects, and the purple square and purple diamond point are placed directly upon or incident to the boundary of the yellow area.

 

The geometric relationships seen above:

 

 

Area objects are adjacent when only locations on their boundaries are coincident but no interior locations are in common.   The purple square is thus adjacent because only locations on the purple square boundary are coincident with locations on the yellow area boundary.    The green square in the corner of the yellow area is not adjacent because parts of the green square are coincident with the interior of the yellow area.

 

Line objects are adjacent if one of their end coordinates is coincident with the boundary of the yellow area.   The purple line is adjacent to the yellow area because only the end point of that line is coincident with the boundary.  None of the other lines are adjacent to the yellow area, because some part other than just the ends are coincident with some part of the yellow area.   

 

Points that are located on the boundary are adjacent to the yellow area, so the purple diamond point is adjacent.

 

The green square in the corner is contained by the yellow area even though part of the coincident locations are on the boundary.   Both green squares are contained by the yellow area since there is no requirement that only locations in the interior count and not coincident locations on the boundaries of the objects.  Likewise, the green L-shaped line is contained by the yellow square even though it is located entirely on the boundary of the yellow area.

 

Objects that have any part in common with the interior of the yellow area and which also have some part outside the yellow area are intersecting the yellow area.   None of the green objects are intersecting the yellow area because none of them have some part outside of the yellow area.  The green L-shaped line does not intersect the yellow area because no part of the green L-shaped line extends into the interior of the yellow area.   All of it is on the boundary only.   All of the blue objects have some part clearly within the interior of the yellow area and some part outside of the yellow area, so all of the blue objects are intersecting the yellow area.

 

The black line clearly is not completely contained within the yellow area, and because more than just the very end of it is coincident with the yellow area boundary it is not adjacent, either.   It does not intersect the yellow area because no part of the black line is coincident with an interior location of the yellow area.   But the black line is touching the yellow area.

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Geometry

 

Topology Overlays

 

Example: Overlay : Intersect - In this example we use the Overlay : intersect operation in the Transform pane to trim a drawing of points so that all points which do not fall within areas in a second drawing are deleted.   At the end of the topic, we repeat the operation using the Join dialog in a different approach.