Transform Templates - Drawings

This topic discusses application of the Transform panel with Drawings on a geom field for the drawing.  That is equivalent to applying the Transform panel to a table for an drawing and using the geom field in the table.  See the Transform panel and Transform Templates topics for use and for links to lists of templates for other data types for tables and use of the Transform panel with other components, such as Tables and Images.

 

Since transform templates applied to either drawings or to geoms in tables are equivalent, the illustrations in the transform template topics for drawings and for geoms in tables are often identical.

 

In the examples that follow we use a table called Objects that has two geom fields, one called Geom and the other called Tgeom.   

il_trans_drawing_objects.png

 

In most illustrations we can show what a template does with a screenshot of the blue preview of the template applied to the same Geom field "in place."  

 

However, in some cases we will use two drawings that use two different geom fields to illustrate the effects of templates that copy between or compare two geom fields.    When using two drawings created from the same table, the drawing that shows geometry in Geom will be called Objects Drawing, and the other drawing which shows geometry in Tgeom will be called Temp Objects Drawing.

 

For such illustrations we will start with Tgeom being a copy of Geom so that both geometry columns have the same objects.   We can then change the Tgeom versions with many different templates to see what each template does while still having the originals available in the Geom column.

 

In most cases we can just use blue previews.  

 

il_trans_drawing_objects.png

 

We open the Objects Drawing and then we click on the Contents pane and choose the Transform panel.  Clicking a desired template then shows a preview in blue color.

 

il_trans_drawing_transform_dialog_bounds.png

 

A typical setting is seen above with the target field being Geom and the source field also being Geom, with the template chosen being the Bounds template.   Choosing the Bounds template causes the result to be previewed in blue preview color.

 

il_trans_drawing_bounds_blue.png

 

Most examples in the listings below are simply previews in blue preview color as seen above.  Some may use two fields or may show what happens after we press the Update Field button, showing the table so we can see how the data was changed in the table as well as the Temp Objects Drawing so we can see the visual result of changes to the geometry made by a template.

 

eg_transform_geoms_xxx01_01.png

 

Examples for Geoms Adjacent, Geoms Contained, Geoms Containing, Geoms Intersecting, and Geoms Touching templates use the map shown above, discussed in greater detail in the Select Templates topic.   Each example shows the results of the new component created that includes those objects within the Source Green drawing that are adjacent, contained by, containing, intersecting or touching any objects in the Overlay Brown drawing.

 

Drawings, Geometry types

Bounds

For line and area objects in the source geom field extract the coordinates that give the extents of the object, the two end coordinates in the case of lines and the border lines in the case of areas, and place in the target geom field.  Ignore points in the source field.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_bounds_pre.png

 

The points in the source field are ignored and do not appear in the result.   Their geom values in the table are set to NULL.

Branch

Choose the branch indicated of a multibranched object and discard other branches.  Branches are numbered starting with 0 in the order in which they occur within the object's geometry.   The starting drawing below shows one area object that is made of up three branches and one line object that is made up of three branches.  Labels have been added to the illustration to show the number of each branch, with labels for the multibranched area in magenta and labels for the multibranched line in light blue color.

il_trans_drawing_branches.png

 

Preview:  Branch using a value of 0

il_trans_drawing_branch0_pre.png

 

Preview:  Branch using a value of 1

il_trans_drawing_branch1_pre.png

 

Preview:  Branch using a value of 2

il_trans_drawing_branch2_pre.png

 

Buffer

Create an area object around each object in the source field at the given Distance and put into the target field.  Using a value of 0 for Tolerance (the default) means to use automatic tolerance.

il_trans_drawing_objects.png

 

Preview: Buffer with a Distance of 5 of objects specified in Geom.

il_trans_drawing_buffer_pre1.png

The dark "tips" of objects are a summary of rounded edges in the buffer areas as seen in the zoomed-in view below.

il_trans_drawing_buffer_pre2.png

Example: Set the size of a buffer with a computation

 

eg_buffer_radius_expression01_01.png

 

We have a drawing that shows springs as points.  

 

eg_buffer_radius_expression01_02.png

 

For each spring our table gives the name of the spring plus a field called CFS that gives the flow of water for that spring.  We wish to draw a buffer around each spring where the radius of the buffer for each spring is set by the formula

 

(3.6 * CFS)/(2 * pi)

 

With the focus on the Springs drawing layer, in the Contents Pane we click on the Transform panel.

eg_buffer_radius_expression01_03.png

We choose the Buffer template.   The target is Geom, which gives the geometry, that is, the location of each point, and for the Distance box instead of entering a field name or value we enter the expression

 

(3.6 * CFS)/(2 * pi)

 

Manifold reserves pi as the name of a constant, 3.141592..., so we can use that instead of writing out pi as a number.   We can enter the name of the field CFS either using square brackets as [CFS] or simply as CFS as written above.  When field names do not include spaces or otherwise would be ambiguous, the use of square brackets is optional.

 

eg_buffer_radius_expression01_04.png

 

As soon as we write out enough of the expression that it can be parsed as a valid expression, Manifold helpfully previews what the Buffer template will do.

 

To create a new drawing with circular buffers, we simply click the Add Component button.  

 

eg_buffer_radius_expression01_05.png

To create the image above we renamed the resulting drawing to Buffers, dragged and dropped it into the map, and then we changed the color of buffers to a light green and set layer opacity of the buffers layer to 30%, to provide a nice, see-through effect.

Center

Create a point at the center of the minimum circle that encloses each line or area object in the source field and put in the target field.  Copy points from source field to target field.  See the Transform: Center and Centroids  topic.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_center_pre.png

Center, Inner

Create a point at the "center" of each area object in the source field, adjusting the location of the point so that it always falls within the area, and put in the target field.  Discard lines and points.   See the Transform: Center and Centroids  topic.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_center_inner_pre.png

Geom values for lines and points in the table are set to NULL.

Center, Weight

Create a point at the balance point of each area object in the source field and put in the target field. Discard lines and points.  See the Transform: Center and Centroids  topic.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_center_weight_pre.png

Geom values for lines and points in the table are set to NULL.

Compose Circle

Most frequently used as a transform template for tables, where the operation is clearer: For each record in the table, Given an X value, a Y value and a Radius value, create in the target geom field a circular area object of specified radius centered on the specified X,Y location.

 

In the case of drawings, each record in the drawing's table specifies an object in the drawing.  When we utilize this transform template from a drawing the intent is for each object in the drawing to create a circle, with the circle usually intended to be related to the location of the object it replaces.   For example, we might create a circle of a given radius at each point, at the center of an area and so on.   To do that instead of using simple numbers or fields for the X and Y values we will probably use expressions in the X and Y combo boxes.

 

Consider a starting drawing that has four point objects, located at coordinates as follows (just the diagonal corner coordinates being labeled):

il_trans_drawing_compose_start.png

 

We can use the Compose Circle template to replace each point object with a circular area object centered upon the location of the point.   We will use an expression in the X and Y combo boxes that extracts the X or the Y value for the point.

 

 

il_trans_drawing_compose_circle_dlg.png

 

The expressions used to get the X and the Y values can be read as follows:

 

GeomCoordXY([Geom], 0)

 

The GeomCoordXY function returns the (X,Y) value for the specified coordinate of a geom.  We ask for the 0 coordinate, that is, the first coordinate that defines the object.   In this case because we are working points there is only one coordinate in the geom that defines each point object, but had we been working with lines where many coordinates might define the line asking for coordinate number 0 of the geom would return the (X,Y) value of the first coordinate, that is, the beginning of the line.

 

In the X box we want only a single number, the X part of the (X,Y) coordinate vector returned by GeomCoordXY so we will use the VectorValue function to get only that part.

 

The VectorValue( ) function takes two arguments: the first is a vector and the second argument, a number such as 0, 1, 2, 3... asks for that specified value in the vector.   In the case of a vector that has only two numbers in it such as an (X,Y) vector using a second argument of 0 asks for the first number, the X value, and using a second argument of 1 asks for the Y value.  If the vector we were working with was an (X,Y,Z) vector with three values in it then using a second argument of 2 would get the Z value.

 

The expression...

 

VectorValue(GeomCoordXY([Geom], 0), 0)

 

... means get the (X,Y) vector value of the first coordinate in the object in Geom, and then use VectorValue to extract from that the X value.     We use that expression in the X combo box and it will be automatically computed for each object in the drawing to produce the X value to be used for creating the circle for that object.

 

The expression...

 

VectorValue(GeomCoordXY([Geom], 0),1)

 

... means get the (X,Y) vector value of the first coordinate in the object in Geom, and then use VectorValue to extract from that the Y value.  We use that expression in the Y combo box and it will be automatically computed for each object in the drawing to produce the Y value to be used for creating the circle for that object.

 

For this example we use the number 5 for the Radius.   That will create all four circles with a radius of 5 units.

 

Preview:

il_trans_drawing_compose_circle_pre.png

 

In the above preview we see that each of the four points will be replaced by a circle centered on the X,Y location of the point with a Radius of 5 units.  Previews show an approximation for fast rendering: although the circles appear to be polygons if the command is given to apply the template smooth circles will result.

 

We are not required to use a fixed radius for all objects, of course.   We could choose a field to control the value of the Radius.  

il_trans_drawing_compose_circle2_dlg.png

To choose a purely artificial example, suppose we chose the mfd_id field as the value to control the Radius.  In the sample drawing the four points were created in order in a new, blank drawing so their mfd_id values are 1, 2, 3 and 4, respectively.   Using mfd_id to control the Radius therefore says to use those numbers as values for Radius for the four circles that are created.

 

Preview:

il_trans_drawing_compose_circle2_pre.png

How might we use this template in real life?   

 

Suppose we have a drawing that shows the locations of radio station antennas as points, and for each point we also have an attribute field that gives the transmission power for that station.  Creating a circle at each point using the transmission power to provide the radius can create a drawing of circles that show the coverage of the many radio stations.  

 

The template might also be used for classic military purposes such as targeting.   Each point could be the target coordinates for a particular warhead and the radius might be taken from a field that gave the effective range of destruction for that warhead.

Compose Point

Most frequently used as a transform template for tables, where the operation is clearer: For each record in the table, Given an X value, a Y value and a Radius value, create in the target geom field a point object at the specified X,Y location. See the Example: Create a Drawing from a Geocoded Table topic for an example of use with a table.

 

In the case of drawings, each record in the drawing's table specifies an object in the drawing.  When we utilize this transform template from a drawing the intent is for each object in the drawing to create a point, with the point usually intended to be placed at some meaningful spot related to the location of the object it replaces.  For example, we might want to create a point at the first coordinate of each object in the case of a drawing that contains lines.

 

Consider a starting drawing that has two point objects, two lines and three areas:

il_trans_drawing_objects.png

 

Following a procedure similar to the Compose Circle example above, we will first preview a replacement of the objects with a single point located at the position of the first coordinate that defines the object, and then we will preview a replacement  of the objects with a single point located at the position of the second coordinate that defines the object.  See the Compose Circle discussion for an explanation of the functions used.

 

il_trans_drawing_compose_point_dlg.png

 

As in the Compose Circle example above again to get the X and Y values we use expressions:

 

VectorValue(GeomCoordXY([Geom], 0), 0)

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1)

 

The 0 argument in ([Geom], 0) picks out the first coordinate defining the object, counting from zero.

 

Preview:

 

il_trans_drawing_compose_point_pre.png

 

To see where those points come from we can overlay with slight transparency the original drawing:

 

il_trans_drawing_compose_point_compare_pre.png

 

We can adjust the expressions used to get X and Y values for the second coordinate of each object:

 

il_trans_drawing_compose_point2_dlg.png

In the above we use the expressions:

 

VectorValue(GeomCoordXY([Geom], 1), 0)

 

and

 

VectorValue(GeomCoordXY([Geom], 1), 1)

 

In this case the 1 argument in ([Geom], 0) picks out the second coordinate defining the object, counting from zero.

 

Preview:

 

il_trans_drawing_compose_point2_pre.png

To see where those points come from we can overlay with slight transparency the original drawing:

 

il_trans_drawing_compose_point2_compare_pre.png

 

The two original points will disappear since they are not multipoints but are regular points that consist of one coordinate each.  Our expressions get the X and Y values of the second coordinates which the two original points do not have, so they will have a NULL value as a result of the transform.

Compose Point with Z

Exactly the same as Compose Point with the addition that we can specify a Z value for the point.  We might take that from a field for each object that specifies an altitude.

Compose Rectangle

Similar to Compose Circle but instead for each object creates a rectangular area object that is vertically aligned using the specified  coordinates for the X 0, Y 0 corner and diagonally opposite X 1, Y 1 corner.

 

Consider a starting drawing that has four point objects, located at coordinates as follows (just the diagonal corner coordinates being labeled):

il_trans_drawing_compose_start.png

 

We can use the Compose Rectangle template to replace each point object with a rectangular area object centered upon the location of the point.   We will use expressions that extract the X and the Y locations of each point and then add to them or subtract from them to create the desired offset locations of the lower left corner and the upper right corner of the rectangles to be created. See the Compose Circle discussion for an explanation of the functions used.

 

il_trans_drawing_compose_rect_dlg.png

 

The expressions for the lower left corner are

 

VectorValue(GeomCoordXY([Geom], 0), 0) - 4

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1) - 2

 

These expressions place the lower left corner of the new rectangle four units to the left and two units below the location of the point.  We take advantage of Manifold's ability to handle mathematics within expressions that are placed inside combo boxes.  The expressions for the upper right corner are

 

VectorValue(GeomCoordXY([Geom], 0), 0) + 4

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1) + 2

 

These expressions place the upper right corner of the new rectangle four units to the right and two units above the location of the point.   The net effect is to create a rectangle that is eight units wide and four units high that is centered on the location of the point that it replaces.

 

Preview:

il_trans_drawing_compose_rect_pre.png

Compose Segment

Similar to Compose Rectangle but instead of creating a rectangular area object the Compose Segment template creates a straight line segment between the specified  coordinates for the X 0, Y 0 beginning and X 1, Y 1 end of the line.

 

Consider a starting drawing that has four point objects, located at coordinates as follows (just the diagonal corner coordinates being labeled):

il_trans_drawing_compose_start.png

 

We can use the Compose Segment template to replace each point object with a straight line segment centered upon the location of the point.   We will use expressions that extract the X and the Y locations of each point and then add to them or subtract from them to create the desired offset locations of the lower left corner and the upper right corner of the line segments to be created.  See the Compose Circle discussion for an explanation of the functions used.

 

il_trans_drawing_compose_segment_dlg.png

 

The expressions for the lower left corner are

 

VectorValue(GeomCoordXY([Geom], 0), 0) - 4

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1) - 2

 

These expressions place the lower left beginning of the new line four units to the left and two units below the location of the point.  The expressions for the upper right corner are

 

VectorValue(GeomCoordXY([Geom], 0), 0) + 4

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1) + 2

 

These expressions place the upper right end of the line four units to the right and two units above the location of the point.   The net effect is to create a line that is centered on the location of the point that it replaces.

 

Preview:

 

il_trans_drawing_compose_segment_pre.png

Compose Triangle

Similar to Compose Rectangle but instead of creating a rectangular area object the Compose Triangle template creates a triangular area object using as corners of the triangle the specified  coordinates for the  X 0, Y 0 corner,  X 1, Y 1 corner and X 2, Y 2 corner,

 

Consider a starting drawing that has four point objects, located at coordinates as follows (just the diagonal corner coordinates being labeled):

il_trans_drawing_compose_start.png

 

We can use the Compose Triangle template to replace each point object with a triangular area with one corner placed at the location of the point.   We will use expressions that extract the X and the Y locations of each point and then add to them or subtract from them to create the desired offset locations of the corners of the triangles to be created.   See the Compose Circle discussion for an explanation of the functions used.

 

il_trans_drawing_compose_triangle_dlg.png

 

The expressions for the first corner are

 

VectorValue(GeomCoordXY([Geom], 0), 0)

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1)

 

These expressions place the first corner of the triangle at the location of the original point. The expressions for the next corner are

 

VectorValue(GeomCoordXY([Geom], 0), 0) + 4

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1) + 2

 

These expressions place the second corner of the triangle four units to the right and two units above the location of the point.  The expressions for the third corner are

 

VectorValue(GeomCoordXY([Geom], 0), 0) + 4

 

and

 

VectorValue(GeomCoordXY([Geom], 0), 1) - 4

 

These expressions place the final corner of the triangle four units to the right and four units below the location of the point.   The net effect is to create a triangle with one corner at the location of the point to be replaced and the rest of the triangle to the right of that location.

 

Preview:

 

il_trans_drawing_compose_triangle_pre.png

To see the relationship of the new triangles to the original points we can overlay with slight transparency the original drawing:

 

il_trans_drawing_compose_triangle_compare_pre.png

Convert to Area

For each object in the source field, take the sequence of defining coordinates and create an area to put into the target field.

il_trans_drawing_objectlines.png

 

Preview:

 

il_trans_drawing_convert_to_area_pre.png

When creating areas from lines this template is normally used with lines that form closed figures since an area object will be constructed from an unclosed line by connecting a final segment from the last coordinate of the line to the first coordinate, as seen above.   Points are discarded.

Convert to Line

For each line or area object in the source field, take the sequence of defining coordinates and create a line to put into the target field. Points are discarded.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_convert_to_line_pre.png

Convert to Point

For each object in the source field, take the defining coordinates and create a point at each such coordinate to put into the target field.

il_trans_drawing_objects.png

 Preview:

il_trans_drawing_convert_to_point_pre.png

Important: The Convert to Point template creates multipoints, that is a single geom object that can have more than one point in it.   That is so that each source record is matched by exactly one target record.  If an area is defined by a few hundred points the resulting geom will still be a single record, but it will be a multipoint with a few hundred points in it.

 

The many points which appear in the center occur because that portion of the line was a curved segment, translated into many points as an approximation.

 

See the Notes to  the Transform Panel topic for a discussion and illustration of how the points created by Convert to Point are multipoints but the points created by Decompose to Coordinates are all separate points in separate records.

Convex Hull

For each line or area in the source field create the polygonal area with least boundary length that encloses the object and put into the target field. Ignore points.  The mathematical definition of convex hull is usually explained by the more intuitive notion of the shape a rubber band would take when stretched around the outside of pins placed at all the coordinates that define the object.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_convex_hull_pre.png

Points have no extent so there is no convex hull area for a single point.   The convex hull area with an apparently curved corner in the center of the drawing above is the result of computing a convex hull for the line in the middle of the original drawing, which has a curved segment.  The line appears to consist of straight line segments only due to rendering approximation at the zoom level used.

Copy

Copy the source field into the target field, including copying and automatic conversion between different geom types.  Normally used with tables, but can also be used with drawings when copying values, such as geom fields, in tables where there is more than one geom field.

 

il_trans_drawing_objects.png

 

Example: Put into Tgeom a Copy of objects specified in Geom.

 

il_trans_copy_drawing.png

Geom is visualized in the drawing above and Tgeom is visualized in the drawing below, shown using green color to emphasize it is a different drawing.

 

il_trans_drawing_copy.png

Sometimes we may want to have two geom fields in a table so we can make a copy of objects to which we intend apply intricate transformations, just in case the results are not what we want.

 

Suppose, for example, in our original table we select two of the areas:

 

il_trans_drawing_copy1.png

We then apply a transformation restricted to the selection, that uses a complex expression.  

il_trans_drawing_copy2.png

But we click too quickly without looking at the preview first and the result is we put NULL values into the geometry for the areas.  That makes them disappear.    We can get them back by using Copy to copy Tgeom into Geom.

il_trans_drawing_copy3.png

The preview above shows the areas that would be copied from Tgeom back into Geom, including the two areas we inadvertently NULLed.

 

The following examples of conversions launch the transform template from an opened table, not from the drawing.  It is easier to see what a conversion does by looking at previews in the table.

 

Example: Copy from Geom into the WKB geometry field TgeomWKB.  We create a new field in the table called TgeomWKB of type geomwkb.

il_trans_copy_geom.png

We then use the Copy template to copy from Geom into TgeomWKB.   The copy automatically converts Manifold geom types into WKB geom types.

 

We can use a similar procedure to convert a Manifold geom type into WKT text type.   We create a field in the table called Text_WKT of type varchar.  

 

il_trans_table_copy_wkt_dlg.png

 

Copy into Text_WKT the result of GeomWkt([Geom]) entered into the source Value box, showing the preview:

il_trans_copy_geom_text.png

 

Manifold evaluates the SQL expression in the Value box on the fly, using whatever is the value of Geom for that record within the GeomWkt function that converts a geom into a WKT string.

Decompose to Branches

For each branch of every object in the source geom field create a new record for that branch in the target geom field in a new component created by the Add Component button.

 

Consider a drawing that has one area object that consists of four branches, the classic way of building an area object that has islands.   See the Example: Create an Area with Holes and Islands topic for an example.

il_trans_drawing_decompose_branches.png

Even though the drawing appears to show four separate objects we can tell they are all the same area by Ctrl-clicking on any one of them to select it.

il_trans_drawing_decompose_branches_sel1.png

A Ctrl-click on any of the areas automatically selects all of them, showing they are all branches of a single area object.

 

We can also open the drawing's table to see there is only one record, a single area.

il_trans_decompose_branches1_drawing.png

Suppose we now utilize the Decompose to Branches template to put into the Geom field in a new component the result of a Decompose to Branches for all objects specified in Geom.

 

The one area object record now becomes four area object records.

il_trans_decompose_branches2_drawing.png

If we open the newly created drawing it appears the same, since the areas drawn will have the same appearance if they are four branches that are all part of the same area object or if they are four different areas created by decomposing the branches into separate area objects.

il_trans_drawing_decompose_branches2.png

Besides seeing the four records in the new table we can tell what we now see are separate objects by Ctrl-clicking on one of them to select it.

il_trans_drawing_decompose_branches2_sel1.png

That we can select only one with a Ctrl-click indicates it is a separate object.

il_trans_drawing_decompose_branches2_sel2.png

 

In the table only one record is selected, the record for the selected area.

 

There is no option to Update Field because the Decompose to Branches template must create new records, requiring a new table.   Only the Add Component option therefore can be used.

 

See the Notes to  the Transform Panel topic for a discussion and illustration of how the points created by Convert to Point are multipoints but the points created by Decompose to Coordinates are all separate points in separate records, a similar effect to how the Decompose to Branches template creates additional records to handle the decomposition of branches into additional records.

Decompose to Convex Parts

Split each area in the source field into smaller area objects such that each smaller area is a convex hull for the locations it encloses and create a new record for each such smaller area in the target geom field in a new component created by the Add Component button.  There are many possible such decompositions of a larger area into smaller areas.  The algorithm used generates one such decomposition.

 

il_trans_drawing_decomp_convex01.png

 

Consider an area object shaped like the above illustration.

 

il_trans_drawing_decomp_convex02.png

 

A preview of the Decompose to Convex Parts template shows how the area could be split into smaller areas that each is a convex hull for any locations within.   The mathematical definition of convex hull is usually explained by the more intuitive notion of the shape a rubber band would take when stretched around the outside of pins placed at all the coordinates that define the object.

 

Using Decompose to Convex Parts

 

This template is often used to split area objects into smaller areas to allow computations or to create centroids that fall within areas.

 

il_trans_drawing_decomp_convex03.png

 

With some areas, as seen above, a centroid may occur outside of the area. If centroids are created to allow transfer of values from areas to points via Overlay operations for analytic or other purposes, the centroid point might not fall within the desired area. One approach to solving this problem is to split each area into smaller areas and to then create centroids for those smaller areas.

 

Consider an example:

 

il_trans_drawing_decomp_convex04.png

 

We use Decompose to Convex Parts to create the above set of smaller areas from the original area.  All of the smaller areas are a convex hull for all locations within, so a centroid created for any of the smaller areas will fall within the smaller area.

 

il_trans_drawing_decomp_convex05.png

We can show the result of a Center, Weight template overlaid on the drawing above to see that each centroid does fall within the smaller area.

 

There is no option to Update Field because the Decompose to Branches template must create new records, requiring a new table.   Only the Add Component option therefore can be used.

Decompose to Coordinates

For each coordinate of every object in the source geom field create a single point record in the target geom field in a new component created by the Add Component button.

il_trans_drawing_objects.png

 

Example: Put into Geom in a new component the result of a Decompose to Coordinates for all objects specified in Geom.

il_trans_decompose_coords1_drawing.png

The table above with seven records (three areas, two lines, and two points) in the new component becomes a table with 26 records, all of which have a single point in their geom.

 

il_trans_decompose_coords2_drawing.png

 

The drawing for the new component shows the points.

il_trans_drawing_decompose_coordinates.png

We can see the relationship between the newly-created coordinate points and the originating objects by showing the two together.

il_trans_drawing_decompose_coordinates02.png

 

The newly-created coordinates points are symbolized above as small rings (using a symbol in the FontAwesome font) , to better show the locations of the vertices of objects at which they were created.

 

There is no option to Update Field because the Decompose to Coordinates template must create new records, requiring a new table.   Only the Add Component option therefore can be used.

 

See the Notes to  the Transform Panel topic for a discussion and illustration of how the points created by Convert to Point are multipoints but the points created by Decompose to Coordinates are all separate points in separate records.

Decompose to Segments

For each segment of every object in the source geom field create a new record for that segment in the target geom field in a new component created by the Add Component button.  This necessarily converts areas into their boundary line segments and also deletes points, which have no segments.

 

See the Editing Drawings topic for an example of how line objects are created from segments.

 

We start with an example drawing with three areas, two lines and two points.

il_trans_drawing_objects.png

We can see the line objects, although composed of segments like all lines, are each a single object by Ctrl-clicking on any part of a line: that selects the entire line.

 

il_trans_drawing_decompose_segments_sel1.png

Opening the drawing's table we can see records for the various areas, lines and points, including the selected record for the selected line.

il_trans_decompose_segments_drawing.png

 

Suppose we now utilize the Decompose to Segments template to put into the Geom field in a new component the result of a Decompose to Segements for all objects specified in Geom.

 

Opening the newly created table we see that the table now contains only line objects.

il_trans_decompose_segments2_drawing.png

Opening the newly created drawing we see that the line objects are arranged in the shape of the areas and lines from which they were created.  The points are gone since points have no segments into which they can be decomposed.  Only areas and lines have segments.

il_trans_drawing_decompose_segments.png

If we use Ctrl-click to click on different parts of lines to select them we see that what appear to be single line objects instead consist of multiple line objects that are arranged end-to-end, and which thus appear to be a single line.

il_trans_drawing_decompose_segments2_sel1.png

For example, what appears to be a single wide "w" shaped line in the lower left is composed of four separate line objects, one at the exact position of each of the four straight segments of which the line was made in the original drawing.   We can Ctrl-click one of those lines to select it to show that it can be selected without also selecting the other four lines.

 

il_trans_drawing_decompose_segments3_sel1.png

The drawing's table shows the various records that are selected, corresponding to the individual lines selected in the drawing as illustrated above.

 

There is no option to Update Field because the Decompose to Segments template must create new records, requiring a new table.   Only the Add Component option therefore can be used.

 

See the Notes to the Transform Panel topic for a discussion and illustration of how the points created by Convert to Point are multipoints but the points created by Decompose to Coordinates are all separate points in separate records, a similar effect to how the Decompose to Segments template creates additional records to handle the decomposition of segments into additional records.

Decompose to Shapes

A shape is a branch of an area that forms an island.  It is also referred to as an individual polygon within a multipolygon object.  For each shape of every object in the source geom field create a new record for that segment in the target geom field in a new component created by the Add Component button.  Points and lines are unchanged except that any curved segments in lines are replaced by straight segments.   

 

We start with an example drawing that contains a single area.   Two of the branches form "holes" in the area while two of the branches form islands.

il_trans_drawing_decompose_shapes_01.png

If we Ctrl-click on the middle island seen above to select it...

 

il_trans_drawing_decompose_shapes_02.png

... we see that the entire area is selected.

 

We can also verify there is only one object by opening the drawing's table, to see a single, selected record, corresponding to the single, selected multibranched area in the drawing.

il_trans_drawing_decompose_shapes_03.png

We now use the Decompose to Shapes template to create a new component based on the above drawing.  Opening the newly created drawing there appears to be no change.

 

il_trans_drawing_decompose_shapes_04.png

Opening the newly created table we see that the table now contains three area objects.  

 

il_trans_drawing_decompose_shapes_05.png

 

The original multipolygon has been decomposed into its constituent shapes, which consist of one larger polygon that has two holes and the two smaller polygons that were "islands."

il_trans_drawing_decompose_shapes_06.png

 

If we  Ctrl-click on the middle area to select it we can select just that area and not the others, because it is now no longer part of a single, branched area.

 

il_trans_drawing_decompose_shapes_07.png

The table shows that one, and only one, of the records has been selected, corresponding to the area that was selected in the drawing.

 

There is no option to Update Field because the Decompose to Shapes template must create new records, requiring a new table.   Only the Add Component option therefore can be used.

 

The Decompose to Shapes template decomposes areas to shapes using OGC rules with the GeomToShapes SQL function.   To decompose areas to shapes using ESRI rules, in the Transform panel click the Edit Query button and edit the generated query to replace the GeomToShapes function in the query text with the GeomToShapesEsri function and then run the query.

Enclosing Circle

For each line and area object in the source field create the smallest size, circular area that encloses the object and put into the target field.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_enclosing_circle.png

Enclosing Rect

For each line and area object in the source field create the smallest size, vertically oriented rectangular area that encloses the object and put into the target field.  For points, create a pseudo-rectangle that has all coordinates at the same location.

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_enclosing_rect.png

The preview shows rectangles which will be created.  However, the preview will not show pseudo-rectangles created for points since those are dimensionless.

il_trans_drawing_enclosing_rect2.png

If we update the field to see the new, modified drawing and not just a preview, we will see small square symbols at the locations of the pseudo-rectangles.  The small square symbols indicate an area object that consists of coordinates that are all at the same location.

 

Enclosing Rect, Rotation Allowed

For each line and area object in the source field create the smallest size rectangular area that encloses the object and put into the target field.  The smallest size rectangular area is that which covers the area in any rotation and not just vertically oriented.  

il_trans_drawing_objects.png

 

Preview:

il_trans_drawing_enclosing_rect_rotated.png

Geoms Adjacent

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Add a new component, using the specified Transform options, that includes all objects in the source drawing that are adjacent to any object in the overlay drawing.   Mnemonic:  Source objects adjacent to Overlay objects.

 

eg_transform_geoms_xxx01_01.png

 

Starting with the above map, with the focus on the Source Green layer, we apply the transform:

 

eg_transform_geoms_xxx01_02.png

 

The resulting new component, added as a layer to the map using blue color, which includes objects from the Source Green drawing that are adjacent to an object in the Overlay Brown drawing:

 

eg_transform_geoms_xxx01_03.png

There are two objects in the source drawing that are adjacent to objects in the overlay drawing.   One of the areas in the source drawing is adjacent to an area in the overlay drawing.  One of the lines in the source drawing is adjacent to two of the lines in the overlay drawing.

 

Geoms Contained

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Add a new component, using the specified Transform options, that includes all objects in the source drawing that are contained by any object in the overlay drawing.   Mnemonic:  Source objects contained by Overlay objects.

 

eg_transform_geoms_xxx01_01.png

 

Starting with the above map, with the focus on the Source Green layer, we apply the transform:

 

eg_transform_geoms_xxx01_04.png

 

The resulting new component, added as a layer to the map using blue color, which includes objects from the Source Green drawing that are contained by an object in the Overlay Brown drawing:

 

eg_transform_geoms_xxx01_05.png

 

Four of the points within the source drawing are contained by area objects in the overlay drawing.

 

Geoms Containing

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Add a new component, using the specified Transform options, that includes all objects in the source drawing containing any object in the overlay drawing.  Mnemonic:  Source objects containing Overlay objects.

 

eg_transform_geoms_xxx01_01.png

 

Starting with the above map, with the focus on the Source Green layer, we apply the transform:

 

eg_transform_geoms_xxx01_06.png

 

The resulting new component, added as a layer to the map using blue color, which includes objects from the Source Green drawing that are containing an object in the Overlay Brown drawing:

 

eg_transform_geoms_xxx01_07.png

Three of the areas in the source drawing are containing objects in the overlay drawing.   The illustration above uses 50% opacity in the Layers panel for the Containing drawing to show the Overlay Brown objects which the Source Green areas are containing.

 

Geoms Intersecting

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Add a new component, using the specified Transform options, that includes all objects in the source drawing intersecting any object in the overlay drawing.   Mnemonic:  Source objects intersecting Overlay objects.

 

eg_transform_geoms_xxx01_01.png

 

Starting with the above map, with the focus on the Source Green layer, we apply the transform:

 

eg_transform_geoms_xxx01_08.png

 

The resulting new component, added as a layer to the map using blue color, which includes objects from the Source Green drawing that are intersecting an object in the Overlay Brown drawing:

 

eg_transform_geoms_xxx01_09.png

Three of the areas in the source drawing intersect objects in the overlay drawing.   The three areas intersect lines in the overlay drawing.  The illustration above uses 50% opacity in the Layers panel for the Intersecting drawing to show the Overlay Brown objects which the Source Green areas are intersecting.  Note that an object which is entirely within an area in the source drawing is said to be contained by that area, and is not intersected.   Objects in the source drawing intersect an object in the overlay only if that object in the overlay is partially within and partially outside the source drawing object.

 

Geoms Touching

Available for maps that contain at least two drawing layers when one of the drawing layers is the active layer.  Add a new component, using the specified Transform options, that includes all objects in the source drawing touching any object in the overlay drawing.   Mnemonic:  Source objects touching Overlay objects.

 

eg_transform_geoms_xxx01_01.png

 

Starting with the above map, with the focus on the Source Green layer, we apply the transform:

 

eg_transform_geoms_xxx01_10.png

 

The resulting new component, added as a layer to the map using blue color, which includes objects from the Source Green drawing that are touching an object in the Overlay Brown drawing:

 

eg_transform_geoms_xxx01_11.png

Any object in the source drawing which is adjacent, contained by, containing or intersecting any object in the overlay is also touching an object in the overlay.  The illustration above uses 50% opacity in the Layers panel for the Touching drawing to show the Overlay Brown objects which the Source Green areas are touching. 

 

Linearize

Replace all curved segments of line and area objects in the source field with linear, that is, straight, segments using the number of straight segments specified in Curved Limit to replace each curved segment and put the result into the target field.  Copy point objects from source to target.    As discussed in the Editing Drawings topic, curved segments are a poor choice in GIS and should regularly be replaced with linear segments.  The Linearize template makes that easy.

 

il_trans_drawing_linearize_start.png

We zoom into our objects example to a line, seen above, containing a curved segment between two linear segments.   

 

il_trans_linearize_geom.png

 

The curved segment is the arc extending approximately half-way around a circle.  It appears to be made up of straight line segments because rendering of curved segments in drawings depends greatly upon zoom level, coordinate system and other factors so that curved segments are normally rendered using polyline approximations.  

 

We can apply the Linearize transform template using a Tolerance of 0, for automatic epsilon approximations of straight segments to curve locations, and various values for Curve limit to see what those do.   In the illustrations below we have used Add Component to create new, linearized components and then have added them as layers to the original drawing, coloring each layer differently, to allow direct comparison of results at the same scale.

 

il_trans_drawing_linearize_100.png

Using a Curve limit of 100 results in a smooth-looking line, even smoother than the original curved segment as approximated in the initial rendering.   A Curve limit of 100 causes Manifold to replace the curved segment with 101 straight line segments (zero based counting is used).

 

il_trans_drawing_linearize_5.png

A Curve limit of 5 results in six segments being used.

 

il_trans_drawing_linearize_3.png

A Curve limit of 3 results in four segments being used.

 

il_trans_drawing_linearize_2.png

A Curve limit of 2 results in three segments being used.   

 

Important:  Visual display windows approximate curved segments with a limited number of linear segments when the view is zoomed out and the curved segment is small.   That can result in an unsmooth appearance of small, curved segments  when drawings are zoomed out.

Maximum Value

Compare two fields, choose the maximum value of the two and put that value into the target field.

il_trans_drawing_maxval01.png

 

Suppose we have a table with two geom fields, one named Geom and the other named Tgeom.   The objects are the same in both geom fields except for the first two records where Geom has areas in it and Tgeom has points.

 

il_trans_drawing_objects.png

 

The Objects Drawing shows objects taken from the Geom field.

 

il_trans_drawing_maxval02.png

The Temp Objects Drawing shows objects taken from the Tgeom field.   The two objects that are points in this field but areas in the Geom field have been selected and are shown in red selection color.

 

With the focus on the Temp Objects Drawing we click on the Transform panel and choose the Tgeom field as the Target and Maximum Value as the template.

 

il_drawing_maxval_dlg.png

 

We choose Tgeom as the Value and Geom as the Compare to value (the order which we choose is irrelevant as either way we are simply comparing the two fields).   We check the Restrict to selection box so that the preview shows only what happens when we compare the two objects that are different in the two geometry fields.

 

il_trans_drawing_maxval03.png

The preview shows that for those two records the two points in Tgeom would be replaced by the areas from Geom.   The Maximum Value template reckons that the areas in Geom are "bigger" (they have more coordinates defining them) than the points in Tgeom, so it chooses the areas to put into the target Tgeom field.

Minimum Value

The Minimum Value template works the same as Maximum Value but chooses the smaller of the two values.   If in the Transform panel shown above we had selected the Minimum Value template the preview would be as seen below.   Since the points in Tgeom are "smaller" than the areas in Geom the Minimum Value template would choose the points to put into the target Tgeom field.

 

il_trans_drawing_maxval04.png

Merge Areas

Take all areas in the source geom field and merge them into a single area with branches for each of what originally were separate areas and place the result, a single record, into a new component when the Add Component button is pressed.   Discard lines and points.  

 

There is no option to Update Field because the Merge Areas template normally must reduce the number of records, requiring a new table.   Only the Add Component option therefore can be used.

 

We start with an example drawing with three areas, two lines and two points.

il_trans_drawing_objects.png

Opening the drawing's table we can see records for the various areas, lines and points.

il_trans_merge_areas1_drawing.png

 

With the focus on the Objects Drawing we choose Edit - Transform and then apply the Merge Areas template, choosing Geom as the target field and Geom as the source, value field.   We press Add Component.

 

That creates two new components in the project, an Objects Merge Areas table and an Objects Merge Areas Drawing.

il_trans_merge_areas2_drawing.png

Opening the new  Objects Merge Areas  table we see it has one record.  We select that record with a Ctrl-click.

il_trans_drawing_merge_areas.png

Opening the new Objects Merge Areas Drawing we see that it appears to have three areas.  However, we know from what we saw in the table that there is only one record with one area.   What appear to be three areas are really a single area object that has three branches.   The single record for the area in the table has been selected, so the single, multibranched area that appears in the drawing is also shown in red selection color for all three of that single area's branches.

 

See the Example: Create an Area with Holes and Islands topic for an example of how a single area that has multiple branches can appear to be more than one area.

 

See also the extensive example using Merge Areas in the Example: Transfer Options and Merge Areas topic.

Merge Lines

Take all lines in the source geom field and merge them into a single line with branches for each of what originally were separate lines and place the result, a single record, into a new component when the Add Component button is pressed.   Discard areas and points.  

 

There is no option to Update Field because the Merge Lines template normally must reduce the number of records, requiring a new table.   Only the Add Component option therefore can be used.

 

We start with an example drawing with three areas, two lines and two points.

il_trans_drawing_objects.png

Opening the drawing's table we can see records for the various areas, lines and points.

il_trans_merge_lines1_drawing.png

 

With the focus on the Objects Drawing we choose Edit - Transform and then apply the Merge Lines template, choosing Geom as the target field and Geom as the source, value field.   We press Add Component.

 

That creates two new components in the project, an Objects Merge Lines table and an Objects Merge Lines Drawing.

il_trans_merge_lines2_drawing.png

Opening the new  Objects Merge Lines  table we see it has one record.  We select that record with a Ctrl-click.

 

il_trans_drawing_merge_lines.png

Opening the new Objects Merge Lines Drawing we see that it appears to have two lines.  However, we know from what we saw in the table that there is only one record with one line.   What appear to be two lines are really a single line object that has two branches.    The single record for the line in the table has been selected, so the single, multibranched line that appears in the drawing is also shown in red selection color for both of that single line's branches.

 

Note that the upper branch looks slightly different from the original line.  The original line contained a curved segment.  Curved segments are replaced by straight line segments by the Merge Lines template so the resulting branch has a straight line segment and is rendered differently.

 

See the Example: Create an Area with Holes and Islands topic for an example of how a single area that has multiple branches can appear to be more than one area.  Lines with multiple branches are similar.

 

See also the extensive example using Merge Areas in the Example: Transfer Options and Merge Areas topic for a discussion of how transfer options are used to transfer fields for templates such as Merge Areas and Merge Lines.

Merge Points

Take all points in the source geom field and merge them into a single point with branches for each of what originally were separate points and place the result, a single record, into a new component when the Add Component button is pressed.   Discard areas and liness.  

 

There is no option to Update Field because the Merge Points template normally must reduce the number of records, requiring a new table.   Only the Add Component option therefore can be used.

 

We start with an example drawing with three areas, two lines and two points.

il_trans_drawing_objects.png

Opening the drawing's table we can see records for the various areas, lines and points.  The record for the second point is scrolled out of sight in the illustration.

il_trans_merge_points1_drawing.png

 

With the focus on the Objects Drawing we choose Edit - Transform and then apply the Merge Points template, choosing Geom as the target field and Geom as the source, value field.   We press Add Component.

 

That creates two new components in the project, an Objects Merge Points table and an Objects Merge Points Drawing.

il_trans_merge_points2_drawing.png

Opening the new  Objects Merge Points  table we see it has one record.    We select that record with a Ctrl-click.

il_trans_drawing_merge_points.png

Opening the new Objects Merge Points Drawing we see that it appears to have two points.  However, we know from what we saw in the table that there is only one record with one point.   What appear to be two lines are really a single point object that has two branches, that is, a multipoint.    The single record for the multipoint in the table has been selected, so the single, multibranched point that appears in the drawing is also shown in red selection color for both of that single point's branches.

 

See the Example: Create an Area with Holes and Islands topic for an example of how a single area that has multiple branches can appear to be more than one area.  Points with multiple branches are similar.

 

See also the extensive example using Merge Areas in the Example: Transfer Options and Merge Areas topic for a discussion of how transfer options are used to transfer fields for templates such as Merge Areas and Merge Points.

Minimum Value

See the discussion in the Maximum Value template above.

Normalize

Normalize object metrics by removing redundant coordinates in objects in the source field and putting the result into the target field.   See the Coordinates topic.

il_trans_drawing_normstart.png

We start with the drawing above showing objects in the Tgeom field.   One of the objects, the triangular area on the left, has been edited by hand to insert two redundant coordinates.

 

il_trans_normalize_geom.png

 

Zooming in we see that two extra coordinates have been inserted, so the area boundary goes from the first vertex that defines the area out to a coordinate location above and to the left and then immediately back to the coordinate location of the first vertex.  That creates a dimensionless, spurious, out-and-back jump in coordinates that is redundant to defining the area.

il_trans_drawing_normalize.png

 

Choosing the Normalize template we see in the preview above that the dimensionless redundancy has been eliminated.  We also see a change in the line in the center because the curved segment has been replaced with straight segments as part of the normalization process.

Normalize Topology

 

Parse Base64 String

Convert base64-encoded geometry into a Manifold geom: Given a base64-encoded string extract the geometry specified in the string and write a geom containing that object into the target field.  

Parse GeoJSON

Convert GeoJSON geometry into a Manifold geom: Given a GeoJSON string extract the geometry specified in the string and write a geom containing that object into the target field.  

Parse GML

Convert GML geometry into a Manifold geom: Given a GML string extract the geometry specified in the string and write a geom containing that object into the target field.

Parse Hex String

Convert hexadecimal-encoded geometry into a Manifold geom: Given a hexadecimal-encoded string extract the geometry specified in the string and write a geom containing that object into the target field.  

Parse WKB

Convert WKB geometry into a Manifold geom: Given a WKB binary value extract the geometry specified in the WKB binary value and write a geom containing that object into the target field.  

Parse WKT

Convert WKT geometry into a Manifold geom: Given a WKT string extract the geometry specified in the string and write a geom containing that object into the target field.  

Remove Curves

Replace each curved segment in lines or areas in the source field with a single straight segment and put the result into the target field.

 

il_trans_remove_curves_geom.png

The sample drawing has only one object with a curved segment, the line object in the center.  

il_trans_drawing_remove_curves.png

The preview for Remove Curves shows how it would be replaced with straight line segments to approximate the curve.

Remove Z

Remove all Z values from objects in the source field and save to the target field.

Rotate

Rotate objects in the source field about their centers to the specified angle and put the result into the target field.

il_trans_drawing_more_objects.png

 

We begin with the sample drawing.

il_trans_rotate45_geom.png

 Rotate with an Angle value of 10 is shown in preview above.

il_trans_drawing_rotate45.png

Rotate with an Angle value of 45 is shown in preview above.

 

All of the areas and line objects are rotated 45 degrees about their centers.  We can see from the relative positions and relative rotations of the objects that it is not the drawing itself which is rotated but that each individual object is rotated about its center.  The positions of the centers of object relative to the centers of other objects are not changed.

Scale

Multiply coordinate values in the source by the given scale factor for both X and Y coordinates and put the result into the target field.

il_trans_drawing_more_objects.png

The sample drawing uses Orthographic projection so the effect of multiplying coordinate values will depend on the details of where objects are located relative to the projection center.

il_trans_scale_geom.png

Applying Scale with a Scale X value of 1.2 and a Scale Y value of 1 replaces all X coordinate values with values that are 1.2 times larger while leaving Y values unchanged.  That has the effect of moving the drawing in X dimension and also widening the X extent of objects.

il_trans_drawing_scale_x1y2.png

Applying Scale with a Scale X value of 1 and a Scale Y value of 1.2 replaces all Y coordinate values with values that are 1.2 times larger while leaving X values unchanged.  That has the effect of moving the drawing in Y dimension and also stretching vertically the Y extent of objects.

 

Because Scale is a simple multiply of coordinates by the given factors the effects of applying Scale are highly dependent upon which projection / coordinate system is in use.  The Scale template is very different from the way "scale" commands work in a graphics editor like PhotoShop or in a CAD program, where a "scale" means to change the size of an individual object while keeping it centered at the same position.

Segmentize

Convert each single segment in line and area objects in the source field into multiple segments as needed with each multiple segment no longer than the given Distance.

Set Z

Specify a Z value for each object in the source field and save the resulting Z-valued objects into the target field.

Shift

Add to or subtract from coordinate values in the source by the given values for a shift in the X direction and in the Y direction and put the result into the target field.

il_trans_drawing_shift1.png

We select two objects in the sample drawing and then we apply Shift with a Shift X of 100 and a Shift Y of 0, with the Restrict to selection box checked.

il_trans_drawing_shift2.png

The preview shows how the two selected objects would be moved 100 meters to the right.   We know they would move 100 meters because the sample drawing is in Orthographic projection, which uses meters as a unit of measure.

Smooth

Replaces coordinates in lines and areas the source field to smooth out apparent curves based on the specified Distance factor and save the result to the target field.  A better name might be a simplify function as many coordinates used to provide convoluted lines are reduced into fewer coordinates that provide simpler lines.

il_trans_drawing_rivers_start.png

 

The Rivers Drawing is in Pseudo Mercator, so the units of measure are meters.  The values in the Distance parameter will therefore be meters.

 

il_trans_smooth_geom.png

The preview shows the result of Smooth applied to objects in Geom using a Distance of 50.  The river lines are less smooth curves.

 

il_trans_drawing_smooth002.png

The preview shows the result using a Distance of 100. River lines are even more obviously composed of straight segments.

 

il_trans_drawing_smooth004.png

The bigger the distance, the more simple the lines.  Using a Distance of 200 the lines have become too simplified to connect in some cases.

Snap to Grid

Move all coordinates in the source field to orthogonally distributed grid locations with the specified Step X and Step Y distances between them and place the results in the target field..

 

il_trans_drawing_rivers_start.png

 

We start with a drawing of rivers in Pseudo Mercator projection and we apply Snap to Grid to Geom using a Step X of 200 and a Step Y of 200.

 

il_trans_orthogonalize_geom.png

The projection is meter-based so using steps of 200 means snapping vertices to a 200 meter by 200 meter grid.  The preview shows how vertices of the lines are moved to grid locations, so line segments become straight lines between locations on an orthogonal grid.

 

il_trans_drawing_orthogonalize.png

The illustration above shows a preview using steps of 500, for grid locations one-half kilometer apart.

 

To understand how Snap to Grid works we can work with a drawing that shows the province of Durango in Mexico using Orthographic projection, which is true to scale and uses meters as the unit of measure.

il_orthogonalize_01.png

Suppose we overlay a grid of points with a point located every 50000 meters in X and Y directions.

 

il_orthogonalize_02.png

 

Applying Snap to Grid to the area tells Manifold to move the coordinates that make up the area to the nearest point location.  

 

 

il_orthogonalize_03.png

 

The result is to move defining coordinates to locations where the lines between them are all vertically or horizontally straight lines or straight diagonal lines between grid locations.

il_orthogonalize_04.png

Most redundant coordinates will be eliminated.  It is possible, however, that some redundant coordinates will be left, in which case a quick Normalize operation will remove them.

Triangulate

Triangulates objects.  Given lines, areas or multipoints, performs a Delaunay triangulation of the geom coordinates of an object to create triangles as area objects.   Point objects that are not multipoints are ignored.

 

il_trans_drawing_triangulate01.png

 

We start with a zoomed in view of our example drawing.

 

il_trans_drawing_triangulate02.png

A preview of the Triangulate template shows how the borders of the triangles will be constrained by geom segments, that is, they will not cross segments within the geom.  The complex triangulation for the central line is a result of the curved segment in the line first being approximated into straight line segments, upon which the triangulation then operates.

Triangulate, Lines

Triangulates objects.  Given lines, areas or multipoints, performs a Delaunay triangulation of the geom coordinates of an object to create triangles as line objects.   

 

il_trans_drawing_triangulate01.png

 

We start with a zoomed in view of our example drawing.

 

il_trans_drawing_triangulate_lines.png

 

A preview of the Triangulate, Lines template shows it creates lines and not areas.  As with the Triangulate template, the borders of the triangles will be constrained by geom segments, that is, they will not cross segments within the geom.  The complex triangulation for the central line is a result of the curved segment in the line first being approximated into straight line segments, upon which the triangulation then operates.

Triangulate All

Ignoring area and line objects, performs a Delaunay triangulation of points and multipoints in the drawing, creating triangles as area objects.

 

il_trans_drawing_triangulate_all01.png

 

We start with an example drawing containing points.  These are separate point objects and are not branches of a single multipoint object.

 

il_trans_drawing_triangulate_all02.png

Triangulate All triangulates all points with areas regardless if they are unbranched, individual point objects or if they are branched points within a single multipoint object.    In contrast, the Triangulate template builds triangulations only within each object, so Triangulate will create a triangulation only within a multipoint that has two or more points within it.

Triangulate All, Lines

Ignoring area and line objects, performs a Delaunay triangulation of points and multipoints in the drawing, creating triangles as line objects.

 

il_trans_drawing_triangulate_all01.png

We start with an example drawing containing points.  These are separate point objects and are not branches of a single multipoint object.

 

il_trans_drawing_triangulate_all03.png

 

Triangulate All, Lines triangulates all points with lines regardless if they are unbranched, individual point objects or if they are branched points within a single multipoint object.    In contrast, the Triangulate, Lines template builds triangulations only within each object, so Triangulate, Lines will create a triangulation only within a multipoint that has two or more points within it.

Union Areas

Take all areas in the source geom field and merge them into a single area, either using branches for areas that do not touch or combining any touching or overlapping area objects into a single branch.  Discard lines and points.  Place the result, a single record, into a new component.   

 

There is no option to Update Field because the Union Areas template normally must reduce the number of records, requiring a new table.   Only the Add Component option therefore can be used.

 

We start with an example drawing with four areas.   Three of the areas are smaller areas.  One larger area overlaps the other three areas.

il_trans_drawing_union_areas1.png

Opening the drawing's table we can see four records for the four areas in the drawing.

il_trans_union_areas1_drawing.png

With the focus on the Misc Areas Drawing we apply the Union Areas template, choosing Geom as the target field and Geom as the source, value field.

 

il_trans_drawing_union_areas1a.png

 

The preview shows what will be the result.   We press Add Component.    That creates two new components in the project, a Misc Areas Union Areas table and a Misc Areas Union Areas Drawing.

 

il_trans_drawing_union_areas2.png

 

Opening the new Misc Areas Union Areas Drawing we see that it one area that is the union of the four previous area.  All regions of intersection have been blended into the single area object.

 

il_trans_union_areas2_drawing.png

Opening the new  Misc Areas Union Areas  table we see it has one record.

 

il_trans_drawing_union_areas3.png

 

Suppose we first select two areas and then run the Union Areas template as before, but this time we check the Restrict to selection box.

 

il_trans_drawing_union_areas3a.png

The preview shows that checking the Restrict to selection box will apply Union Areas to only the two selected areas.    The result as before is two new components being created in the project, a Misc Areas Union Areas table and a Misc Areas Union Areas Drawing.

il_trans_drawing_union_areas4.png

The Misc Areas Union Areas Drawing, as before, has a single area object.  That single area object is now the union of the big area and the smaller area in the lower right that was overlapped by the big area.

 

il_trans_union_areas3_drawing.png

 

As before, the Misc Areas Union Areas table has a single record for a single area object.  The new area is a topological union of the two former areas.   The other areas, which were not selected, did not participate in the transform and have not been copied over to the new table.

 

See also the extensive example using Merge Areas in the Example: Transfer Options and Merge Areas topic for a discussion how fields are combined using transfer options when multiple objects are combined into a single object.

 

The Union Areas template is different from the use of topology overlay to union areas together because it always operates on all areas in the target set (either all areas in the table or all selected areas).

 

Union Rects

Create a single enclosing rectangular area that encloses all objects in the source field and put it into the target field.

 

There is no option to Update Field because the Union Rects template normally must reduce the number of records, requiring a new table.   Only the Add Component option therefore can be used.

 

We start with an example drawing with three areas, two lines and two points.

il_trans_drawing_objects.png

Opening the drawing's table we can see records for the various areas, lines and points.

il_trans_merge_lines1_drawing.png

 

With the focus on the Objects Drawing we apply the Union Rects template, choosing Geom as the target field and Geom as the source, value field.   

 

il_trans_drawing_union_boxes.png

 

The preview shows the rectangle that will be created.   We press Add Component.

 

That creates two new components in the project, an Objects Union Rects table and an Objects Union Rects Drawing.

il_trans_union_boxes_drawing.png

Opening the new Objects Union Rects table we see it has one object, an area.  The drawing contains a single rectangle, as was shown in the preview.

 

il_trans_drawing_union_boxes2.png

 

If we create an illustration overlaying the source objects and the enclosing box we see how the rectangle is created.

 

Voronoi Diagram

Given a drawing of points, create a drawing of area objects such that the areas create a Voronoi diagram for the positions of the original points.   A Voronoi diagram divides the drawing into regions around each point that are shaped so that the borders of the regions are equidistant from the two nearest points.  Because the result may create a different number of areas from the original number of points this transform is used only with the Add Component option.

il_trans_drawing_voronoi_start.png

Preview:

il_trans_drawing_voronoi_diagram.png

 

The preview shows how the system will try to clip the generated areas to prevent infinite areas from being generated.   See the Transform: Voronoi Diagrams topic for a discussion of options.

 

Voronoi Diagram, Lines

Given a drawing of points, create a drawing of line objects such that the lines create a Voronoi diagram for the positions of the original points.   A Voronoi diagram divides the drawing into regions around each point that are shaped so that the borders of the regions are equidistant from the two nearest points.  Because the result creates a different number of lines from the original number of points this transform is used only with the Add Component option.

 

il_trans_drawing_voronoi_start.png

Preview:

il_trans_drawing_voronoi_lines.png

 

The preview shows how the system will try to clip the generated lines to prevent infinite lines from being generated.  To see the relationship of the new lines to the original points we can overlay with slight transparency the original drawing of points:

il_trans_drawing_voronoi_lines_compare_pre.png

 

See the Transform: Voronoi Diagrams topic for a discussion of options.

 

Voronoi Diagram, Points

Given a drawing of points, create a new drawing of point objects located at the intersections of the borders of a Voronoi diagram of lines or areas based on the positions of the original points.  A rarely used template since the difference between the new set of Voronoi points and the original points from which the Voronoi diagram is constructed tends to be confusing.

 

A Voronoi diagram divides the drawing into regions around each point that are shaped so that the borders of the regions are equidistant from the two nearest points.  Because the result creates a different number of points from the original number of points this transform is used only with the Add Component option.

 

il_trans_drawing_voronoi_start.png

 

Preview:

il_trans_drawing_voronoi_points.png

 

To see the relationship of the Voronoi points to the Voronoi regions, we can overlay with slight transparency a drawing of Voronoi lines:

il_trans_drawing_voronoi_points_compare.png

 

See the Transform: Voronoi Diagrams topic for a discussion of options.

 

 

Drawings in a Map (Multiple Drawings),  Geometry

In addition to the above templates, the following templates will be available for drawings that are layers in a map.   

Overlays

Overlay templates transfer the contents of fields in records between two drawings based on the geometric relationships of the objects in those two drawings.  For example, the contents of the State field for an area in one drawing might be transferred to the State field for all points that are contained within that area.

 

il_overlay_process.png

 

 

For example, the Country field value of France in an overlay drawing might be transferred to all objects in the target drawing that intersect France.   Those objects in the modified target drawing will have a new Country field added to their tables that shows they are part of France.

 

The GIS jargon word overlay can obscure what is going on.   Replace that word with the phrase Transfer field values to and what is going on becomes clearer.

 

 

Overlay Adjacent

Transfer field values from adjacent objects in the overlay to objects in the target.

il_overlay_adjacent_fr.png

Above: Take fields from the adjacent area in the blue overlay drawing and transfer them into areas in the yellow target drawing.

 

Real life example:  A country requires special permits for any construction on real estate parcels that are next to (that is, adjacent) to a wetlands area.   The overlay is a drawing of wetlands areas with a Wetlands field that has a value of Yes for each wetlands area.   The target is a drawing of real estate parcels.   

 

The Overlay Adjacent template creates a modified target drawing where each parcel adjacent to a wetlands area also has a new Wetlands field with a value of Yes, in addition to all the other fields that parcel had in the original target.

 

When the government receives a request for a construction permit for a particular parcel it can quickly check to see if the Wetlands field for that parcel contains Yes, and if so apply the special permit process.

Overlay Contained

Transfer field values from contained objects in the overlay to objects in the target.  

il_overlay_contained_fr.png

Above: Take fields from contained points in the blue overlay drawing, sum the field values and transfer the result into the area in the yellow target drawing.

 

Real life example:  A target drawing shows provinces in France as areas with information in fields for each province such as the name of the province.  However, the drawing does not have a Population field giving the total population of the province.  The overlay drawing contains points for each populated place in France and includes information fields for each point giving its name, Population and other information.

 

The Overlay Contained template creates a modified target drawing with a new Population field with the sum of the Population values for populated place points contained by each area.  We can specify that the sum of the values is to be used in the Options for the template.

 

See the Example: Overlay Contained topic.

Overlay Containing

Transfer field values from containing objects in the overlay to objects in the target.

il_overlay_containing_fr.png

Above: Take fields from the containing area in the blue overlay drawing and transfer them into the points in the yellow target drawing.

 

Real life example:  A target drawing shows points in the US where each point has a street address.   The overlay drawing shows Census Block Group area with each area having a Block Group number.   We want to add the correct Census Block Group number to each point in our target drawing.

 

The Overlay Containing template creates a modified target drawing where each point within a particular Census Block Group automatically receives the containing area's Census Block Group number.

 

See the Example: Overlay Containing topic.

Overlay Intersecting

Transfer field values from intersecting objects in the overlay to objects in the target.

il_overlay_intersecting_fr.png

Above: Take fields from the intersecting area in the blue overlay drawing and transfer them into the lines in the yellow target drawing.  Ignore adjacent areas and non-intersecting lines in the target.

 

Real life example:  We will take a truck on a transcontinental journey and we would like to minimize the amount of total road tax we will pay on the journey.  We have several possible routes from which to choose.

 

A target drawing shows lines that represent different routes through the road network from our start location to the destination   The overlay drawing shows states as area objects.  Each state has a Road Tax which is charged to any truck passing on a road through that state.   We would like to add a field to each route line that gives the sum of all of the Road Tax values for every state through which the route line passes.  That will tell us the total tax that will have to be paid for each route.

 

The Overlay Intersecting template creates a modified target drawing where each route line acquires a new Road Tax field with the sum of the Road Tax values for each of the intersecting state areas through which the route line passes.  We can specify that the sum of the values is to be used in the Options for the template.

 

Overlay Touching

Transfer field values from touching  objects in the overlay to objects in the target.

il_overlay_touching_fr.png

Above: Take fields from the touching area in the blue overlay drawing and transfer them into the points and areas in the yellow target drawing.  Anything that is containing or adjacent is also touching.

 

Real life example:  We are studying the proposed path of a crude oil pipeline and we would like to know what water features may be affected.   A target drawing shows wells, rivers and lakes as points, lines and area objects.   The overlay drawing shows the proposed route of the pipeline as a line object, with a field called Pipeline giving the name of the proposed route.    We would like to know each water feature that the route of the pipeline touches.

 

The Overlay Touching template creates a modified target drawing where each well, river or lake which the pipeline touches acquires a new Pipeline field that includes the name of the proposed pipeline route.   The default Options setting of copy will transfer the name of the proposed pipeline route.

 

Rules:

 

 

Overlay Topology

Overlay Topology templates operate on the target drawing to produce a modified target result based upon patterns in the overlay drawing.  Overlay Topology templates change the geometry, that is, the number and shapes of objects, in the result.    See the Transform: Overlay Topology topic for an illustrated, conceptual guide to easy understanding of topology overlays.

 

il_topology_overlay_process1.png

 

Rules:

 

 

Overlay Topology templates are different from Overlay templates:

 

  

Also:

 

 

 

Overlay Topology examples below utilize two sample drawings,  Target Yellow and Overlay Blue, and show the result of overlays between them.

 

eg_topovr01_yellow.pngeg_topovr01_blue.png

 

Drawing Target Yellow consists of two areas and drawing Overlay Blue contains three areas.

 

eg_topovr01_datayel_ovrblue.png

 

If we show Target Yellow and Overlay Blue together in a map we can see how areas in the two drawings intersect.

 

Overlay Topology, Identity

Use the boundaries of areas in the overlay drawing to split all areas, lines and points in the target drawing and place each resulting part of the original object from the target drawing into the result drawing.  

 

eg_topovr01_datayel_ovrblue.pngeg_topovr01_datayel_ovrblue_identity.png

This operation is like using the boundaries of areas in the overlay drawing as a "cookie cutter" to slice through objects in the target drawing.

 

See the Transform: Overlay Topology topic.

Overlay Topology, Intersect

Intersect all objects in the target drawing with areas in the overlay drawing and place each resulting part of the original object from the target drawing that falls within an area in the overlay drawing into the result drawing.  

eg_topovr01_datayel_ovrblue.pngeg_topovr01_datayel_ovrblue_intersect.png

 

Intersect is like Identity but discarding all of the cut pieces in the target that do not fall within the overlay.

 

See the Transform: Overlay Topology topic as well as the Example: Overlay Topology Intersect topic.

Overlay Topology, Union

Slice all objects in the target using areas in the overlay.  Next, slice all areas in the overlay using areas in the target.  Put all pieces together in the result, discarding duplicates.

eg_topovr01_datayel_ovrblue.pngeg_topovr01_datayel_ovrblue_union.png

Union is like a double cookie cut operation, first doing an Identity onto yellow using blue as an overlay, and then doing an Identity onto blue using yellow as an overlay.   Discarding duplicates, put all pieces into the result.

 

See the Transform: Overlay Topology topic.

Overlay Topology, Update

Intersect all areas, lines and points in the target drawing with areas in the overlay drawing.  Remove the Intersect objects from the target and place the remaining target object pieces together with all of the overlay areas into the result.  

eg_topovr01_datayel_ovrblue.pngeg_topovr01_datayel_ovrblue_update.png

This is like pushing the overlay drawing down into the target drawing, flattening into nothing any parts of the target beneath any overlay area.

 

See the Transform: Overlay Topology topic.

 

 

Notes

Distances - Some templates use combo boxes within which we can specify a distance.  The distance units used in such boxes are the units of measure specified for the coordinate system (projection) utilized by the source geom field.    The quickest way to see that is normally to right-click on the table involved in the Project pane and to choose Properties.  The FieldCoordSystem.Geom property will show the coordinate system used for the Geom field.   Right-clicking onto the value cell of that property and choosing Edit will show the entire contents of the value, including the unit of measure used.  If the projection in use uses meters as the unit of measure than whatever we enter into Distance for, say, creating a buffer will be a number in meters.  

 

We must, of course, pay attention to what we are doing given that many data sets use Latitude/Longitude coordinate systems which use geographical degrees as a unit of measure.  If we give a Distance of 1 in such cases we are telling Manifold to use a distance of 1 degree, which is about 111 km or 69 miles at the Equator and a different value elsewhere.

 

It is inefficient to use Latitude/Longitude when we need to do anything involving distances, so it makes sense to quickly re-project any such data into a coordinate system that does not use degrees.

 

Two meanings of "intersect" - There are two notions of what "intersect" should mean, both of which are used by Manifold.   Topology overlays use the classic set-theoretic meaning of "intersect," in which objects that are entirely contained by other objects are said to intersect as well.   A different meaning is used in Select panel templates and spatial overlays, where an object that is entirely contained within another object does not "intersect" that object but is contained by that object.  In Select panel templates and spatial overlays, an object only intersects another object if some part of the object is outside the other object and some part is within the other object.   This allows the use of contained and containing to provide different selection criteria instead of simply duplicating what intersect does in a selection.

 

See Also

Editing Drawings

 

Contents Pane

 

Transform

 

Contents - Transform

 

Command Window

 

Queries

 

Transform Templates

 

Transform Templates - Images

 

Transform Templates - Binary

 

Transform Templates - Boolean

 

Transform Templates - Datetime

 

Transform Templates - Geom

 

Transform Templates - Numeric

 

Transform Templates - Text

 

Transform Templates - Tile

 

Transform: Center and Centroids

 

Transform: Escape Templates

 

Transform: Overlay

 

Transform: Overlay Topology

 

Transform: Voronoi Diagrams