Erase

The Erase command uses an erasing area to delete portions of existing areas, lines, and points in a specified layer that are either inside or outside of the erasing area.   The erasing area can be either an existing area or a new area in the process of being created.  Erase is available in the right-click context menu for editing when creating a new area, or when an existing area is picked with an alt-click.   For example, begin drawing a new area that is to be used as an erasing area, and then right-click and chose Erase to erase portions of all objects the erasing area overlaps.

 

Options:

 

 

Clip vs. Erase

The Clip and Erase commands are similar but opposite:

 

 

With Clip, existing areas are the cutters that modify an object being edited.    With Erase, the area being edited is the cutter that modifies existing objects.

Example

Erase makes it easy to remove portions of areas, either by beginning to draw a new area freehand and then using Erase, or by picking an existing area and using that to Erase.   The area used to erase can be in a different layer from the areas being erased.

 

In the example below, we choose the Create Area tool and then we start by drawing a new area that overlaps existing area that represent countries in Southeast Asia.   We draw the new area as three island parts, two being triangles and the third a rectangle, using Shift-clicks to end a branch and to then commence drawing a new island branch.   

 

 

Right-clicking and choosing Erase by default removes all parts of existing areas on the inside of the erasing area in progress, leaving just those parts of the countries outside the area we drew.   It is as if the area we were drawing has taken bites out of any existing areas that intersected it.  If desired, the clipped geometry can be edited further before being applied.

 

Erase works both with areas and lines.   

 

 If we want to erase only some areas or lines, we can select those areas or lines, and then tell Erase to use only the selection for clipping.

Summary

Editing with Erase uses the same moves as editing drawings.  Review the Editing Drawings topic for a quick refresher.

 

Erase areas or lines with a new area:

 

  1. If desired, to erase portions of only selected objects, Ctrl-click to select the areas or lines that will participate in the erase operation.

  2. In the cursor mode button in the main toolbar, choose Create Area.  Keyboard shortcut: Shift-A

  3. Draw the area that will be used as a eraser, but do not save changes.   The area can be a complex, multibranched area with holes and islands, if desired.

  4. Right-click anywhere in the map and choose Erase.  

  5. In the Erase dialog that pops open, if there is more than one layer in the map, choose the layer containing objects to be erased.

  6. By default, all lines and areas intersected by the erasing area will participate in the erase.  Check the Use selection only box, if desired, to erase only within selected objects.

  7. By default, Erase removes everything inside the erasing area.  Check the Keep inner part box to keep those parts of intersecting objects that are inside of the erasing area, and to remove everything outside of the erasing area.

  8. Press OK to apply the erase.    Press Cancel to abandon the erase.    

 

 

Erase areas or lines with an existing area:

 

  1. If desired, to erase portions of only selected objects, Ctrl-click to select the areas or lines that will participate in the erase operation.

  2. Alt-click the area that will be used as an erasing area.

  3. Right-click anywhere in the map and choose Erase.  

  4. In the Erase dialog that pops open, if there is more than one layer in the map, choose the layer containing objects to be erased.

  5. By default, all lines and areas intersected by the erasing area will participate in the erase.  Check the Use selection only box, if desired, to erase only within selected objects.

  6. By default, Erase removes everything inside the erasing area.  Check the Keep inner part box to keep those parts of intersecting objects that are inside of the erasing area, and to remove everything outside of the erasing area.

  7. Press OK to apply the erase.    Press Cancel to abandon the erase.    

 

 

The choice of layer containing objects to be erased,  and the checked or unchecked choices in the Use selection only box and the Keep inner part box will persist for that same window until they are changed.  That facilitates repetitive edits using Erase.

Example: Use an Existing Area to Erase Part of an Existing Area

We will use an area object showing lakes to erase those portions of land areas that are covered by the lakes.   The area we use as an eraser is in a different layer from the areas being erased.   The different layers can be in different coordinate systems, as well.

 

 

We have a layer called Great Lakes that shows the Great Lakes as a single, multibranched, area object, styled in blue color as seen above.  

 

 

We have another layer called Countries that shows the land regions of countries in North America, styled as seen above.  With the view zoomed to the Great Lakes region we see the border between the US and Canada.  We will use the Great Lakes area to erase those portions of the Countries areas that are covered by the Great Lakes.  

 

 

The illustration above shows our map with both layers turned on.   With the focus on the Great Lakes layer, we Alt-click anywhere in the Great Lakes area to pick that area.

 

 

Right-click anywhere in the map to launch the context menu.

 

 

Choose Erase.

 

 

In the Erase dialog, choose Countries as the layer containing areas to participate in the erase operation.

 

 

By default, Erase will use the erasing area to eliminate those portions of all areas and lines that overlap the erasing area, and it will keep only those parts of any overlapping areas or lines that fall outside the erasing area.  If we like, we can check the option boxes to erase only within selected areas or lines, or to erase those parts of lines and areas falling outside the erasing area, keeping only those parts of areas and lines that fall within the erasing area.

 

We go with the default settings, and press OK.  

 

 

The result is that all portions of areas in the Countries layer that fall within the erasing Great Lakes area are removed.  

 

 

We can see that by double-clicking the Great Lakes area to turn it off.

Example: Use an Existing Area to Erase Parts of Existing Lines

We will use an area object showing the Centre region in France to erase portions of roads in France that are outside of Centre.  The area we use as an eraser is in a different layer from the lines being erased.   The different layers can be in different coordinate systems, as well.

 

We use a map that has a layer called Centre with an area showing the Centre region (pre-2016 boundaries), and a layer called Roads showing major roads in the area.

 

 

With the focus on the Centre layer, we Alt-click the area to pick it.

 

 

Right-click anywhere in the map to launch the editing context menu.

 

 

Choose Erase.

 

 

In the Erase dialog, choose the Roads layer as the subject of the erase operation.

 

 

Check the Keep inner part option, to erase all roads outside of the picked area.  

 

Press OK.

 

 

The geometry for all road objects completely outside the erasing area is deleted, and the geometry for road lines that were partly inside the erasing area and partly outside is modified to remove those portions outside of the erasing area.

 

 In the example above, roads which seem to be deleted by the Erase simply have their geometries set to NULL values.  The records are still there in the table, just not existing in the drawing because they have NULL geometry.   To get rid of such zombie records, use the procedure described in the Eliminating NULL Records section at the end of the Clip (Transform) topic.

Example: Use a New Area to Erase Part of an Existing Area

We use Manifold as a CAD system to design part of a new house.  

 

A section of interior wall bordering the kitchen is composed of firebrick, masonry that is resistant to high temperatures.   We would like to erase portions of areas in the Firebrick layer in places where vents will exhaust possibly high temperature smoke from indoor cooking or grilling.    We will use the outline of vents in the Vents layer as a guide to drawing a new area, which we will then use to Erase parts of an area in the Firebrick layer.

 

 

The map we use has a drawing layer called Vents that shows outlines where vents for fireplaces and exhaust vents are to be located.   The Firebrick layer shows regions where walls will be built of fire-resistant masonry.   This is a house in Europe, built using relatively thick masonry for interior walls.

 

 

Turning off the Firebrick layer, we can see the square shape indicating the desired position for a vent.  We would like to erase that portion of the Firebrick area.

 

 

With the focus on the Vents layer, choose the Create Area tool in the cursor mode button in the main toolbar.

 

 

Click as desired to mark the area to be created, using Snap to click exactly on the corners of the vent shape.  

 

 

When we are happy with the area we have drawn as an erasing area, Right-click to launch the context menu for editing.  

 

Choose Erase.

 

 

In the Erase dialog, choose the Firebrick layer as the layer containing areas that will be erased.   

 

Press OK.

 

 

The area in the Firebrick layer that is overlapped by the proposed new area has the region covered by that new area erased.   

 

Since we commanded an Erase and never saved changes, no area is drawn.   Instead, the path for the area that was being drawn (the boundary of the area) was used as an erasing area.  

 

The cursor is still in Create Area mode, ready to draw another area if we want to do some more erases.

 

 

We can turn off the Vents layer to see the square shaped hole created in the Firebrick area by Erase.

Notes

Blue color used in editing - Objects that are picked for editing, as well as paths drawn by the measurement tool and in editing, have their coordinate edit handles and boundaries shown using the same blue color used for previews and for provisional edits in other settings. If desired, we can change the preview and provisional color used by Manifold in the Tools - Options dialog.   This allows us to use a color different than blue color in cases where a visual display already uses very much blue color or to provide a more discernible color in case of color blindness.

 

Permissions - To use Erase, the drawing's table must support updating records.  That means, of course, we cannot use Erase on drawings stored in read-only data sources or in databases where our user role does not have the ability to update records in the drawing's table.

 

Curves and Z removed - Curvilinear segments and Z values are removed from results.

 

Progress and canceling - The Erase command shows a progress bar and allows canceling.  That allows using Erase with big data sets or with data sets on slow data sources.

 

Old Centre - The illustrations in this topic show Centre as it was before 1 January 2016, when a law passed in 2014 took effect that reduced the number of regions in France from 22 to 13.  

 

Videos

5 Minute Tutorial - Editing with Clip

 

Newsflash - Merge, Clip, and Split

 

See Also

Getting Started

 

User Interface Basics

 

Drawings

 

Snap Modes

 

Clip

 

Merge

 

Split

 

Measurements

 

Copy and Paste between Drawings or Tables

 

Layers Pane

 

Info Pane

 

Example: Draw Lines, Areas and Points - Simple example of using basic mouse moves to add points, lines and areas to a drawing.

 

Example: Trace an Area in a Map over an Image Background - In a map with a drawing layer above an image layer, create an area object in the drawing by tracing over the outlines of something seen in the image layer below.

 

Example: Edit Coordinates While Creating an Object - When creating an object in a map using a tool such as Create Area, right in the middle of the process we can edit coordinates in the Info pane Coordinates tab.   This example shows the step by step process.

 

Example: Change the Shape of Areas - Step-by-step editing of an existing area in a drawing: changing the shape by moving a vertex, by moving several vertices together, by moving the entire object, by deleting a vertex and by adding a vertex.

 

Example: Add Vertices in the Middle of a Line being Created - During the creation of a new object we can go back and make corrections, additions and deletions to coordinates already marked.  In this example we start creating a new line, and then notice we have skipped over some locations we wanted to click.  We go back to add those vertices (coordinates), and then we continue with creating the line.

 

Videos

Editing Drawings - Create Areas - How to create areas (polygons) in a drawing.  We digitize a lake by tracing over a background satellite image layer from a web server.  This quick video shows how editing tools in Manifold make it easy to digitize objects very quickly, correcting any errors with no stress or fear of getting it wrong.  Includes a quick demo of snapping.

 

Editing Drawings - Create Lines with Curves - A very short video showing how to create lines in drawings using straight segments and also circular arcs.  We create a line in a map of Paris showing our walk around circular ponds. Manifold can create polylines using straight line segments for classic polylines, or using curved segments that are circular arcs, ellipses, or splines for very smooth curves, a much faster and easier technique than clicking many points.  Super!