The Expression template appears in the template list when a geometry field, of type geom, geommfd, or geomwkb, has been picked in the Transform pane. The template computes the specified SQL expression that evaluates to a geom, geommfd, or geomwkb data type.
Save the result of the given expression into the specified Result destination using the specified geometry type.
Launch the template by choosing a geometry field and then double-clicking the Expression template. When the template launches we can specify options.
We begin with an example drawing that shows three areas, two lines and two points.
With the focus on the Objects Drawing window, we choose the Geom field and then the Expression template in the Transform pane.
In the Expression template, we press the Edit Expression button. In the Expression dialog that opens we enter the expression
and then we press OK.
Back in the Transform pane, for the Result destination we use the Same Field, writing the results back into the original geometry field in the source table. Press Transform.
Our example expression uses the GeomBounds function. For line and area objects in the source geom field, the GeomBounds function extracts coordinates for the extents of the objects, and then it represents those extents using points for lines and border lines for areas. Points in the source field are ignored and their geom values in the table are set to NULL.
Points in the source field do not appear in the result.
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.
Transform - Expression
Transform - Geometry