Transform - Geometry: Clip

The Clip template appears in the template list when a geometry field, of type geom, geommfd, or geomwkb, has been picked in the Transform pane.   It clips intersecting areas of one layer by another.  The Clip transform template is a different command than the interactive Clip editing command.

 

See the Clip (Transform) topic for examples.

 

Clip

Clip objects in the source drawing using area objects in the Clip with drawing.  The Keep inner part option regulates what is left after the clip.   Checking the Keep inner part option leaves only those portions of objects in the target drawing that are inside of the Clip with areas.   Unchecking the Keep inner part option leaves only those portions of objects that are outside of the Clip with areas.   The transform allows operating only on the selection in the target drawing, and also allows clipping only with selected areas in the Clip with drawing.

 

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

 

 

See the Clip (Transform) topic for details and illustrated examples.

 

 

We have added a drawing layer, called Clipper to our example drawing.   The Clipper drawing contains four rectangular areas that overlap objects in the Objects Drawing.   The Clipper layer appears above using 30% opacity in the Layers pane, so the regions of overlap with objects in the lower layer are clear.

 

With the focus on the Objects Drawing, in the Transform pane we choose the Geom field and then the Clip template.

 

 

We choose the Clipper layer for the Clip with drawing, and we check the Keep inner part box.  We choose the Tgeom field (a geometry field we have in the table to use for temporary results) as the Result destination.    Press Transform.

 

 

Our Temp Objects Drawing shows the contents of the Tgeom geometry field.   We show it as a layer to illustrate how the Clip template using the Keep inner part option creates clipped objects where they overlap within the inside of the objects in the Clipper layer.  

 

 

We turn off the other layers to show more clearly the new objects created by Clip.

 

 

We repeat the Clip operation, but this time we uncheck the Keep inner part box.    Press Transform.

 

 

The result shows how the Clip template with the Keep inner part option unchecked creates clipped objects that fall outside the objects in the Clipper layer.  

 

 

We turn off the other layers to show more clearly the new objects created by Clip.

 

 

Notes

Works with all objects at once - If a drawing has a mix of areas, lines and points, the Clip template will clip all three types of objects at once.

 

Automatically removes NULL geometry records - The Clip transform automatically removes records with NULL geometry when producing a new table.

 

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.

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Geometry

 

Clip (Transform)

 

Example: Flooded Roads - We consider a hypothetical case of a 10 meter rise in sea level in the San Francisco Bay area, and we find what highways and major roads would be flooded by such a rise.   The example uses both raster and vector data sets, combines a number of techniques and uses the Contour, Buffer, Merge, and Clip transform templates.