Example: Overlay Containing

To explore the use of Overlay templates in the Transform panel we consider a quick tutorial example, using 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.    

 

Overlay templates alter fields in the drawings upon which they work, in contrast to Overlay Topology templates which alter objects in the drawings upon which they work.

 

In this example we will transfer the name of a French region, called a Province in this example, to the points that represent cities which fall within each province.   If we've always wondered whether the city of Nevers was located in Bourgogne or in Centre, assigning a province to each city will let us know.

 

il_spatial_overlay01_01.png

 

We begin with a map that has two drawing layers, a drawing called Provinces that shows the regions of France as area objects, and a drawing called Cities that shows some of the larger cities in France as point objects.  In the above illustration we have double-clicked the Cities tab to hide that layer.

 

il_spatial_overlay01_02.png

 

When we open the Provinces Table we see it has two fields, a Province field of type nvarchar that gives the name of the region, and a Geom field of type geom that stores the geometry of the area.

 

il_spatial_overlay01_03.png

 

If we double-click the Provinces layer tab to hide that drawing and then double-click the Cities layer tab to show that layer, we see the points in the Cities drawing.

 

il_spatial_overlay01_04.png

 

Opening the Cities Table we see it also has two fields, a City field of type nvarchar that gives the name of the city, and a Geom field of type geom that stores the geometry of the point.   The data set came from the US military, so some of the city names such as Alencon also have the name of the airport appended, Valframbert airport in the case of Alencon.

 

Our task is to modify the Cities Table so it gains an additional field, Provinces, which will provide the name of the region which contains each city.

 

il_spatial_overlay01_05.png

 

We double-click the Provinces layer to turn it back on (not required, but it helps to see what we are doing), and then we click on the Cities layer tab to make the Cities drawing the active drawing.

 

We click the Contents pane and then click on the Transform panel.  The panel automatically configures itself to work with the active layer as the target drawing and the Geom field as the target field.

 

il_spatial_overlay01_05a.png

 

We enter the letters over into the filter box, to reduce the very long list of templates to those which contain that text, such as the Overlay Containing template we will use.  We choose the Overlay Containing template, choose the Geom field as the target, and we leave the default choice of the Provinces drawing as the Overlay.  

 

il_spatial_overlay01_05e.png

 

In the map window Manifold helpfully renders the Cities points in blue preview color to show us the Cities layer is the target of the transform.  Back in the Transform panel we click on the Options button.

 

il_spatial_overlay01_05b.png

The Transform Options dialog allows us to specify the name for the resulting modified components and also allows us to specify which fields we want to transfer.

 

We do not need the mfd_id or Geom fields from the overlay drawing so we will click on each of those fields in turn to highlight them and then to change the Transfer action from copy to ignore.

 

il_spatial_overlay01_05c.png

 

We want to copy the name of the Province so that we leave as is.   We press OK to apply the changes made to the transform options.

 

il_spatial_overlay01_05d.png

 

Back in the Transform panel we press the Add Component button to create new components in the Project pane, which will incorporate the modifications we want to make to the target drawing.

 

Two new components are created in the project: a Cities Table Overlay Containing table and a drawing to show the contents of that table called Cities Table Overlay Containing Drawing.

 

il_spatial_overlay01_06.png

 

Opening the table we see it contains a new field with the region for each city.  The new field is called O_Province to indicate it came from a field originally called Province and is the result of an Overlay.

 

il_spatial_overlay01_07.png

 

Dragging an dropping the new overlay drawing into our map, and turning off the Cities layer for clarity, we see the new overlay drawing of city points is the same (except that as a new drawing it uses default formatting) since the overlay only transfers fields and makes no changes to the geometry of the objects.

 

So in which region is Nevers located?    We click on the Cities Table Overlay Containing table and then choose Edit - Find to launch the Find dialog.

il_spatial_overlay01_08.png

 

Enter Nevers, and press Next.

il_spatial_overlay01_09.png

We can see from the table that Nevers is in Bourgogne.    We can Ctrl-click on that record to select it, showing it in the table in red selection color.

 

il_spatial_overlay01_09a.png

tech_tina_sm.png

 

The corresponding point in the drawing will also be displayed in red selection color, showing us where Nevers is located.

 

 

Tech Tip:  The Home key is particularly useful in tables because it will always move the cursor to the first field and also will scroll the table so that the current cell is in view.   For example, if we use Edit - Find to find a record to scroll to that record we press the Home key to quickly bring it into view.

Notes

Multiple records - Some of the illustrations of tables show more than one record for various regions.   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.

 

Never say Nevers - The final "s" in Nevers is silent.  The name of the city is pronounced "neh-VAIR" with the stress on the second syllable.

 

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.  Centre is the same it was with just a change of name.   Nevers is still in what was Bourgogne, which expanded in 2016 to join with Franche-Comté to become Bourgogne-Franche-Comté.

 

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.

 

Centre vs. Centre-Val de Loire  - The region referred to as Centre in this topic was called Centre until 2015, when the new name of Centre-Val de Loire took effect, perhaps in an effort to boost tourism to the genuinely wonderful valley of the Loire river, home to what is perhaps the largest concentration of classic chateaux anywhere in the world.  To this day everyone still calls the region Centre.  

 

Bourgogne / Burgundy -  Bourgogne is the French name for the region Brits and other English speakers call Burgundy.   It is justifiably famous for its wines, as also are the other big wine-exporting appellations such as Bordeaux.   But the locals in France will often choose Chinon from the valley of the Loire or some other local wine that is not so widely exported or well-known outside of France.

 

See Also

Contents Pane

 

Transform

 

Contents - Transform

 

Transform Options

 

Transform Templates

 

Transform Templates - Drawings

 

Transform Templates - Geom

 

Transform: Overlay

 

Transform: Overlay Topology

 

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 Topology Intersect - In this example we use the Overlay Topology, Intersect template in the Transform panel 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: Transfer Options and Merge Areas - Using the Merge Areas Transform panel  template, an exploration of the difference between using Copy and Sum for transfer options.