Overlay templates become available when the Transform dialog is launched for an active drawing layer in a map. That active drawing is called the target drawing. Based on geometric relationships with objects in a second drawing in the map, called an overlay drawing, the templates transfer field values from the overlay drawing into the target drawing.
For example, the Country field value of France in an overlay drawing might be transferred to all objects in the target drawing that intersect France. Those objects in the modified target drawing will have a new Country field added to their tables that shows they are part of France.
The GIS jargon word overlay can obscure what is going on. Replace that word with the phrase Transfer field values to and what is going on becomes clearer.
Overlay Adjacent |
Transfer field values from adjacent objects in the overlay to objects in the target. Above: Take fields from the adjacent area in the blue overlay drawing and transfer them into areas in the yellow target drawing.
Real life example: A country requires special permits for any construction on real estate parcels that are next to (that is, adjacent) to a wetlands area. The overlay is a drawing of wetlands areas with a Wetlands field that has a value of Yes for each wetlands area. The target is a drawing of real estate parcels.
The Overlay Adjacent template creates a modified target drawing where each parcel adjacent to a wetlands area also has a new Wetlands field with a value of Yes, in addition to all the other fields that parcel had in the original target.
When the government receives a request for a construction permit for a particular parcel it can quickly check to see if the Wetlands field for that parcel contains Yes, and if so apply the special permit process. |
Overlay Contained |
Transfer field values from contained objects in the overlay to objects in the target. Above: Take fields from contained points in the blue overlay drawing, sum the field values and transfer the result into the area in the yellow target drawing.
Real life example: A target drawing shows provinces in France as areas with information in fields for each province such as the name of the province. However, the drawing does not have a Population field giving the total population of the province. The overlay drawing contains points for each populated place in France and includes information fields for each point giving its name, Population and other information.
The Overlay Contained template creates a modified target drawing with a new Population field with the sum of the Population values for populated place points contained by each area. We can specify that the sum of the values is to be used in the Options for the template.
See the Example: Overlay Contained topic. |
Overlay Containing |
Transfer field values from containing objects in the overlay to objects in the target. Above: Take fields from the containing area in the blue overlay drawing and transfer them into the points in the yellow target drawing.
Real life example: A target drawing shows points in the US where each point has a street address. The overlay drawing shows Census Block Group area with each area having a Block Group number. We want to add the correct Census Block Group number to each point in our target drawing.
The Overlay Containing template creates a modified target drawing where each point within a particular Census Block Group automatically receives the containing area's Census Block Group number.
See the Example: Overlay Containing topic. |
Overlay Intersecting |
Transfer field values from intersecting objects in the overlay to objects in the target. Above: Take fields from the intersecting area in the blue overlay drawing and transfer them into the lines in the yellow target drawing. Ignore adjacent areas and non-intersecting lines in the target.
Real life example: We will take a truck on a transcontinental journey and we would like to minimize the amount of total road tax we will pay on the journey. We have several possible routes from which to choose.
A target drawing shows lines that represent different routes through the road network from our start location to the destination The overlay drawing shows states as area objects. Each state has a Road Tax which is charged to any truck passing on a road through that state. We would like to add a field to each route line that gives the sum of all of the Road Tax values for every state through which the route line passes. That will tell us the total tax that will have to be paid for each route.
The Overlay Intersecting template creates a modified target drawing where each route line acquires a new Road Tax field with the sum of the Road Tax values for each of the intersecting state areas through which the route line passes. We can specify that the sum of the values is to be used in the Options for the template. |
Overlay Touching |
Transfer field values from touching objects in the overlay to objects in the target. Above: Take fields from the touching area in the blue overlay drawing and transfer them into the points and areas in the yellow target drawing. Anything that is containing or adjacent is also touching.
Real life example: We are studying the proposed path of a crude oil pipeline and we would like to know what water features may be affected. A target drawing shows wells, rivers and lakes as points, lines and area objects. The overlay drawing shows the proposed route of the pipeline as a line object, with a field called Pipeline giving the name of the proposed route. We would like to know each water feature that the route of the pipeline touches.
The Overlay Touching template creates a modified target drawing where each well, river or lake which the pipeline touches acquires a new Pipeline field that includes the name of the proposed pipeline route. The default Options setting of copy will transfer the name of the proposed pipeline route. |
Overlay templates are different from Overlay Topology templates:
Overlay templates transfer fields into the target drawing based on the overlay. Overlay templates do not change objects.
Overlay Topology templates alter objects in the target drawing based on the overlay.
Also:
Overlay templates allow any mix of points, lines and areas in both the target drawing and the overlay drawing.
Overlay Topology templates allow only areas in the overlay drawing but allow any mix of points, lines and areas in the target drawing.
A classic example of using overlays is to transfer the value of a field in an area to all the points that fall within the area.
Suppose we have a map of France with two drawings as layers, one drawing that shows Cities as points and the other that shows Provinces (regions) as areas.
The table for Cities gives the name of each city and the table for Provinces gives the name of each region. We would like to create a new, improved table for Cities that has both the name of the city and the name of the region in which that city is located.
That is an easy task for which we use the Overlay Contained template. See the Example: Overlay Contained topic for a step by step example of how that is done with just a few mouse clicks.
It is easy to take for granted the meaning of such common words but all the same there are a few technical nuances 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 and intersecting but it is not adjacent. |
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 both touching and intersecting that other object but it is not adjacent to that other object. |
Overlay Intersecting |
Intersection means that both objects have at least one interior location 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 also intersecting. |
Overlay Touching |
Touching means that both objects have any location in common.
One object that is touching another object is intersecting, but 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, square and circle shapes mark the location of point objects. The line objects and purple square are placed directly upon or incident to the boundary of the yellow area..
The geometric relationships seen above:
The purple objects are adjacent to the yellow area.
The blue objects are intersecting the yellow area.
The green objects are contained by the yellow area.
The black line is touching the yellow area.
All objects are touching the yellow area.
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 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 are intersecting the yellow area. All of the green objects except for the green L-shaped line are intersecting 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 clearly cover part of the interior of the yellow area, so all of the blue objects are intersecting the yellow area.
The black line clearly is obviously 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.
Multiple records - Illustrations of tables might show more than one record for various Provinces. Why is that? GIS data will often use multiple records for each area that makes up a particular region. For example, the region of Bretagne (known in England as Brittany) includes many islands, each of which is a separate area object in this data.
Old Data - The illustrations in this topic use data from the US military, which show the regions of France as they were before 1 January 2016, when a law passed in 2014 took effect that reduced the number of regions in France from 22 to 13.
Provinces vs. Regions - The drawing is called Provinces and not Regions because it was clipped out of a larger data set showing provincial boundaries for the entire world. Around the world sub-national divisions such as US states or French regions are called many different things, but the word provinces seems to have become a reasonably generic word that militaries and others engaged in mapping often use. State is rarely used because in many cultures it is a synonym for country and thus does not capture the notion of the administrative sub-units of a given country.
Transform Templates - Drawings
Example: Two Drawings from the Same Table - Take a table with a geom field that is visualized by a drawing. Add a second geom field to the table and create an rtree index on that field so it can be visualized by a drawing. Copy the first drawing, paste it and adjust the pasted copy so it uses the second geom field. Demonstrate how to use the Transform dialog to show "live" modifications in the second drawing compared to the first drawing.
Example: Copy one Column into Another Column with Transform - How to use the Transform dialog to copy the contents of one column in a table into another column, but only for selected records. Uses the Products table from the Nwind example data set.
Example: Transform Field Values using an Expression in the Transform Dialog - How the Expressions tab of the Transform Dialog may be used to change the values of fields. We include an example of changing the price of selected products and using two different Transform dialogs open at the same time for two different table windows.
Example: Overlay Contained - A frequent use of overlays is to sum the values of many points that fall within an area and to transfer that sum to a new field for an area. In this example we take a drawing that has cities in the US with a population value for each city. We use Overlay Contained to sum the population of each city within a state and to transfer that sum to a total population for the state.
Example: Overlay Containing - One of the most common uses of overlays is to transfer fields from areas to points that are contained in those areas. Tasks such as transferring a census block group number or zip code number from a drawing of areas to points that fall within each area are extremely common. In this example we transfer the name of a French region to the points that represent cities which fall within each region.
Example: Overlay Topology Intersect - In this example we use the Overlay Topology, Intersect template in the Transform dialog to trim a drawing of points so that all points which do not fall within areas in a second drawing are deleted. The drawing of points we trim will become the US cities drawing that is used in the Example: Overlay Contained topic.
Example: Construct JSON String using Select and Transform - Use the Select and Transform dialogs to manually construct a JSON string using values from other fields in a table. Shows how we can manipulate text to build desired contents in a field.
Example: Edit a Drawing with Transform Dialog Templates - In this example we open a drawing and edit objects in the drawing using the Transform dialog Template tab. Includes examples of using the Add Component button and also the Edit Query button.
Example: Use a Transform Dialog Expression to Create Buffers in a Drawing - Use the Expression tab of the Transform Dialog to create three different sizes of buffers for different lines in a drawing and then automatically create a query which does the same thing. Includes examples of using the Add Component button and also the Edit Query button.
Example: Clip Areas with a Transform Dialog Expression - Use the Expression tab of the Transform dialog to clip areas in a drawing to fit within horizontal bounds. Includes examples of using the Add Component button and also the Edit Query button.
Example: Smooth Lines with a Transform Dialog Expression - Use the Expression tab of the Transform dialog to make lines smoother in a drawing so that longer lines are smoothed more. Includes examples of using the Edit Query button to show how different queries are created automatically depending on if we want to update a field or to add a new component.
Example: Transfer Options and Merge Areas - Using the Merge Areas Transform dialog template, an exploration of the difference between using Copy and Sum for transfer options.