Transform: Clip

The Clip and Clip Individual drawing templates in the Transform panel and GeomClip function in SQL cut objects using areas.  

Clip

The Clip template cuts all objects in the target drawing using areas in the Clip with drawing.   The Keep inner part checkbox regulates what is left after the clip.   Checking the Keep inner part checkbox leaves only those portions of objects in the target drawing that are inside of the Clip with areas.   Unchecking the Keep inner part checkbox leaves only those portions of objects that are outside of the Clip with areas.

 

ico_nb_arrow_blue.png Previews are slow with many complex objects.  Even if we do not wait for the preview to appear, the Clip will still be done correctly.  The actual Clip operation is also slow with many objects or complex objects, even though it is fully parallel.  Upcoming builds will increase Clip performance.

 

Example: Clip an Area with Other Areas

Consider a map that has two drawing layers:  a drawing that shows Texas as an area, and a drawing called Objects that has a circular area and a star-shaped area.   The map uses 50% opacity for layers to better show overlaps.

 

il_trans_drawing_clip.png

 

With the focus on the Texas layer we choose the Clip template to clip the state of Texas with the circle and star objects.   

 

il_trans_drawing_clip01_dlg.png

 

We choose the Objects layer in the Clip with box and we leave Tolerance at 0 meters for automatic tolerance.    We leave the Keep inner part  box unchecked, the default.

 

Preview:

il_trans_drawing_clip01_pre.png

 

The preview shows that all of Texas within the Clip with layer's areas will be clipped.  

 

il_trans_drawing_clip01_result.png

 

Pressing the Add Component button creates a new drawing as seen above.   The state of Texas started off as one area, so what is created by the Clip is still only one area object, a multi-branched area

 

Keeping the inner part

 

il_trans_drawing_clip02_dlg.png

To clip Texas with the circle and star and leave the inner part, we check the Keep inner part  box.

 

Preview:

il_trans_drawing_clip02_pre.png

 

The preview shows that all of Texas within the Clip with layer's areas will be retained, with all of Texas outside of the circle and star removed.

 

il_trans_drawing_clip02_result.png

 

Pressing the Add Component button creates a new drawing as seen above.   The state of Texas started off as one area, so what is created by the Clip is still only one area object, a multi-branched area

 

il_trans_drawing_clip03_result.pngil_trans_drawing_clip04_result.png

 

We can show both results layers, and also turn on the Objects layer with styling to showing just the borders of the circle and star as faint yellow lines, to see how the different areas created by the Clip and the Clip using the Keep inner part  box relate to each other, and to the objects that were used as the Clip with objects.

 

Example: Clip Lines with an Area

Consider a map that has two drawing layers:  a drawing that shows the French region of Centre as an area, and a drawing called Roads that shows Roman roads in Europe as lines.   We will clip the Roads lines using the Centre area.

 

il_trans_drawing_clip05.png

 

With the focus on the Roads layer we choose the Clip template to clip the roads with the region of Centre.  

 

il_trans_drawing_clip06_dlg.png

 

We choose the Centre layer in the Clip with box and we leave Tolerance at 0 meters for automatic tolerance.    We leave the Keep inner part  box unchecked, the default.

 

Preview:

il_trans_drawing_clip06_pre.png

 

The preview shows that all Roman roads within the Clip with layer's area will be clipped.  

 

il_trans_drawing_clip06_result.png

 

Pressing the Add Component button creates a new drawing as seen above.  We show the outline of the Centre area using a style that shows the area's border in faint yellow, to better show how the roads were cut out by the Centre area.

 

Keeping the inner part

 

il_trans_drawing_clip07_dlg.png

To clip the roads layer with Centre and leave the inner part, we check the Keep inner part  box.

 

Preview:

il_trans_drawing_clip07_pre.png

 

The preview shows that all roads within the Clip with layer's area will be retained, with all roads outside of Centre removed.

 

il_trans_drawing_clip07_result.png

 

Pressing the Add Component button creates a new drawing as seen above.  We show the outline of the Centre area using a style that shows the area's border in faint yellow, to better show how the roads were cut by the Centre area.

 

il_trans_drawing_clip08_result.pngil_trans_drawing_clip09_result.png

 

We can show both results layers, and show the results layers with the Centre layer as a faint outline.   This illustrates how the different sets of clipped roads created by the Clip and the Clip using the Keep inner part  box related to each other.

 

Clip Individual

The Clip template works using areas in one drawing to clip objects in a different drawing.   The Clip Individual template works within a single drawing that has two different geom fields for each record in the drawing's table.   For each record, one geom is used to clip the other geom.    Clip Individual works only within each record: geoms within a given record cannot clip geoms in other records.

 

See Also

Contents Pane

 

Transform

 

Contents - Transform

 

Transform Templates - Drawings

 

SQL Functions

 

Example: Clip Areas with a Transform Expression - Use the Expression tab of the Transform panel 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.