This topic discusses application of the Transform Dialog with Drawings on a geom field for the drawing. That is equivalent to applying the Transform dialog to a table for an drawing and using the geom field in the table. See the Transform Dialog and Transform Templates topics for use and for links to lists of templates for other data types for tables and use of the Transform Dialog with other components, such as Tables and Images.
In the examples that follow we use a table called Objects that has two geom fields, one called Geom and the other called Tgeom.
We show two drawings created from the same table, one of which is called Objects Drawing that shows geometry in Geom and the other, called Temp Objects Drawing, which shows geometry in Tgeom.
We 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.
We create the illustration of effects within the Temp Objects Drawing by opening the Temp Objects Drawing and then choosing Edit - Transform to launch the Transform dialog.
A typical setting is seen above with the Target field being Tgeom the source Geom field being Geom and the template chosen being the Bounds template. Choosing the Bounds template causes the result to be previewed in blue preview color.
When we press the Update Field button the blue preview changes to normal default formatting as the Bounds template is applied.
The listings below show two types of examples:
A simple preview, or
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.
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.
Preview:
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.
Preview: Branch using a value of 0
Preview: Branch using a value of 1
Preview: Branch using a value of 2
|
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.
Preview: Buffer with a Distance of 5 of objects specified in Geom. The dark "tips" of objects are a summary of rounded edges in the buffer areas as seen in the zoomed-in view below. |
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.
Preview: |
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.
Preview: 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.
Preview: 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):
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.
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:
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.
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. 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: 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:
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.
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:
To see where those points come from we can overlay with slight transparency the original drawing:
We can adjust the expressions used to get X and Y values for the second coordinate of each object:
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:
To see where those points come from we can overlay with slight transparency the original drawing:
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):
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.
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:
|
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):
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.
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:
|
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):
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.
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:
To see the relationship of the new triangles to the original points we can overlay with slight transparency the original drawing:
|
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.
Preview:
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 object in the source field, take the sequence of defining coordinates and create a line to put into the target field.
Preview: Points are discarded. |
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. Preview: 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.
See the Notes to the Transform Dialog 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.
Preview: 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.
Example: Put into Tgeom a Copy of objects specified in Geom.
Geom is visualized in the drawing above and Tgeom is visualized in the drawing below.
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:
We then apply a transformation restricted to the selection, that uses a complex expression. 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. 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 dialog 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 Temp_geomwkb. The above automatically converts Manifold geom types into WKB geom types.
When the target is a text field, Copy is also used for conversions such as converting geom types to WKT text type.
Open the table and then launch the Transform dialog:
Copy into Temp_text the result of GeomWkt([Geom]) entered into the source Value box, showing the preview:
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. 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. 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. Suppose we now utilize the Decompose to Coordinates template to put into the Geom field in a new component the result of a Decompose to Coordinates for all objects specified in Geom.
The one area object record now becomes four area object records. 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. 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. That we can select only one with a Ctrl-click indicates it is a separate object.
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 Dialog 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.
Consider an area object shaped like the above illustration.
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.
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:
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.
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.
Example: Put into Geom in a new component the result of a Decompose to Coordinates for all objects specified in Geom. The table above with seven records (two ares, two lines and two points) in the new component becomes a table with 23 records, all of which have a single point in their geom.
The drawing for the new component shows the points. 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 Dialog 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 New Object Dialog 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. 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.
Opening the drawing's table we can see records for the various areas, lines and points.
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. 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. However, 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 to appear to be a single line. 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.
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 Dialog 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. If we Ctrl-click on the middle island seen above to select it...
... we see that the entire area is selected.
We can also verify there is only one object by opening the drawing's table. The drawing's table shows there is only a single row with a single geom and just one area object in the drawing.
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.
Opening the newly created table we see that the table now contains three area objects.
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."
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.
We can use the Select dialog to transfer the selection from the drawing to the table to see that one, and only one, of the rows has been selected.
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 dialog 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. Copy points from the source to the target.
Preview: |
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. Copy points from the source to the target.
Preview: |
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. Copy points from the source to the target.
Preview: |
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 New Object Dialog topic, curved segments are a poor choice in GIS and should regularly be replaced with linear segments. The Linearize template makes that easy. We begin with a line, seen above, containing a curved segment between two linear segments. This drawing has only one object, a line.
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. The illustration has been reduced in size to allow a zoom level that shows more of the curved segment.
Example: Put into Tgeom the Linearize result using a Curve limit of 100 for objects specified in Geom. Geom is visualized in the drawing above and Tgeom is visualized in the drawings below. 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).
A Curve limit of 5 results in six segments being used. A Curve limit of 3 results in four segments being used.
A Curve limit of 2 results in three segments being used. In this case we have replaced the single curved segment with three straight segments; however, we can see a similar effect in the typically unsmooth approximations of small, curved segments that drawing windows may show 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.
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.
The Objects Drawing shows objects taken from the Geom field.
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 launch the Transform dialog and choose the Tgeom field as the Target and Maximum Value as the template.
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.
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 ValueThe Minimum Value template works the same as Maximum Value but chooses the smaller of the two values. If in the Transform dialog 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.
|
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. Opening the drawing's table we can see records for the various areas, lines and points.
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. Opening the new Objects Merge Areas table we see it has one record. 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.
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. Opening the drawing's table we can see records for the various areas, lines and points.
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. Opening the new Objects Merge Lines table we see it has one record.
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.
Note that the upper line looks slightly different from the original: that line contained a curved segment in the original. 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. 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.
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. Opening the new Objects Merge Points table we see it has one record. 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.
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. We start with the drawing above where the Convert to Area transform has been applied to create area objects in the Tgeom field.
Example: Put into Tgeom the result of Normalize applied to objects specified in Tgeom. Tgeom is visualized in the drawing above, before applying Normalize, as well as in the drawing below, after applying Normalize.
Both of the pointlike area objects disappear because they consisted entirely of redundant coordinates. The strange area in the middle becomes more rounded because the curved segment is replaced with straight segments. |
Normalize Topology |
|
Orthogonalize |
Move all coordinates in the source field to orthogonally distributed grid locations with the specified Step X and Step Y distances between them and save the result to the target field.
Example: Put into Tgeom the result of Orthogonalize applied to objects in Geom using a Step X of 0.01 and a Step Y of 0.01.
Geom is visualized in the drawing above and Tgeom is visualized in the drawing below.
The Rivers drawing is in Latitude/Longitude coordinate system using degrees as a unit of measure, sousing a Step X of 0.01 and a Step Y of 0.01 means using an orthogonal grid of about 1 km in x and y directions.
To understand how Orthogonalize 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. Suppose we overlay a grid of points with a point located every 50000 meters in X and Y directions.
Applying Orthogonalize to the area tells Manifold to move the coordinates that make up the area to the nearest point location.
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. 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. |
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.
Example: Put into Tgeom the result of Remove Curves applied to Geom. Geom is visualized in the drawing above and Tgeom is visualized in the drawing below. Only one object in the source, the line in the middle, has a curved segment (which appears to be made up of two lines due to a rendering approximation at the scale used). That is replaced with a single straight line segment. |
Remove Z |
Remove all Z values from objects in the source field and save to the target field. |
Rotate |
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.
Example: Put into Tgeom the result of Rotate applied to Geom with an angle of 45. Geom is visualized in the drawing above and Tgeom is visualized in the drawing below. All of the areas and line objects are rotated 45 degrees about their centers. Note from the sequence of points in the middle of the example drawing 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.
Example: Put into Tgeom the result of Scale applied to Geom with a Scale X of 1 and a Scale Y of 2. Geom is visualized in the drawing above and Tgeom is visualized in the drawing below. A Scale X of 1 leaves x coordinates unchanged while a Scale Y of 2 doubles the value of y coordinates. This has two effects: first, it moves all objects upwards in the Y direction by a factor of two and second, it stretches each object to be twice the height it previously was. Note that because Scale is a simple multiply of coordinates by the given factors it is 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. Example: Put into Tgeom the result of Shift applied to Tgeom with a Shift X of 100 and a Shift Y of 0, with the Restrict to selection box checked. |
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.
Example: Put into Tgeom the result of Smooth applied to objects in Geom using a Distance of 0.002.
Geom is visualized in the drawing above and Tgeom is visualized in the drawing below.
Example: Put into Tgeom the result of Smooth applied to objects in Geom using a Distance of 0.004.
The bigger the distance, the more simple the lines. |
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. The borders of the triangles will be constrained by geom segments, that is, they will not cross segments within the geom. |
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. The borders of the triangles will be constrained by geom segments, that is, they will not cross segments within the geom. |
Triangulate All |
Ignoring area and line objects, performs a Delaunay triangulation of points and multipoints in the drawing, creating triangles as area objects. Triangulate All triangulates all points 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. Triangulate All, Lines triangulates all points 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. 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 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 area. Three of the areas are smaller areas. One larger area overlaps the other three areas.
Opening the drawing's table we can see four records for the four areas in the drawing. With the focus on the Misc Areas Drawing we choose Edit - Transform and then apply the Union 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, a Misc Areas Union Areas table and a Misc Areas Union Areas Drawing. Opening the new Misc Areas Union Areas table we see it has one record.
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.
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.
Note that 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).
Note also that by checking the Restrict to selection box we will cause all areas not selected to be discarded.
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.
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.
As before, the Misc Areas Union Areas table has a single record for a single area object.
The Misc Areas Union Areas Drawing, as before, also 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. 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. |
Union Boxes |
Create a single enclosing box 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 Boxes 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. Opening the drawing's table we can see records for the various areas, lines and points.
With the focus on the Objects Drawing we choose Edit - Transform and then apply the Union Boxes 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 Union Boxes table and an Objects Union Boxes Drawing. Opening the new Objects Union Boxes table we see it has one object, an area.
Opening the new Objects Union Boxes Drawing we see it has one object, an area that is the enclosing box for all of the objects in the source table. If we create an illustration overlaying the source objects and the enclosing box we see how it 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. Preview:
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.
Preview:
To see the relationship of the new lines to the original points we can overlay with slight transparency the original drawing of points:
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.
Preview:
To see the relationship of the Voronoi points to the Voronoi regions, we can overlay with slight transparency a drawing of Voronoi lines:
See the Transform: Voronoi Diagrams topic for a discussion of options.
|
In addition to the above templates, the following templates will be available for drawings that are layers in a map.
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.
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. 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. 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. 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. 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. 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. |
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.
Overlay Topology templates are different from Overlay templates:
Overlay templates transfer fields into the target drawing based on the overlay. Overlay templates do not change objects.
Overlay Topology templates alter objects in the target drawing based on the overlay.
Also:
Overlay templates allow any mix of points, lines and areas in both the target drawing and the overlay drawing.
Overlay Topology templates allow only areas in the overlay drawing but allow any mix of points, lines and areas in the target drawing.
Overlay Topology examples below utilize two sample drawings, Target Yellow and Overlay Blue, and show the result of overlays between them.
Drawing Target Yellow consists of two areas and drawing Overlay Blue contains three areas.
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.
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.
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. 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. 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. |
Transform Templates - Datetime
Transform: Center and Centroids
Example: Two Drawings from the Same Table - Take a table with a geom field that is visualized by a drawing. Add a second geom field to the table and create an rtree index on that field so it can be visualized by a drawing. Copy the first drawing, paste it and adjust the pasted copy so it uses the second geom field. Demonstrate how to use the Transform dialog to show "live" modifications in the second drawing compared to the first drawing.
Example: Copy one Column into Another Column with Transform - How to use the Transform dialog to copy the contents of one column in a table into another column, but only for selected records. Uses the Products table from the Nwind example data set.
Example: Transform Field Values using an Expression in the Transform Dialog - How the Expressions tab of the Transform Dialog may be used to change the values of fields. We include an example of changing the price of selected products and using two different Transform dialogs open at the same time for two different table windows.
Example: Overlay Contained - A frequent use of overlays is to sum the values of many points that fall within an area and to transfer that sum to a new field for an area. In this example we take a drawing that has cities in the US with a population value for each city. We use Overlay Contained to sum the population of each city within a state and to transfer that sum to a total population for the state.
Example: Overlay Containing - One of the most common uses of overlays is to transfer fields from areas to points that are contained in those areas. Tasks such as transferring a census block group number or zip code number from a drawing of areas to points that fall within each area are extremely common. In this example we transfer the name of a French region to the points that represent cities which fall within each region.
Example: Overlay Topology Intersect - In this example we use the Overlay Topology, Intersect template in the Transform dialog to trim a drawing of points so that all points which do not fall within areas in a second drawing are deleted. The drawing of points we trim will become the US cities drawing that is used in the Example: Overlay Contained topic.
Example: Transfer Options and Merge Areas - Using the Merge Areas Transform dialog template, an exploration of the difference between using Copy and Sum for transfer options.
Example: Union Areas - Combine multiple area objects into a single area. A drawing of French regions shows some regions as more than one area. We would like each region to be one area so the table of regions has one record per region.
Example: Construct JSON String using Select and Transform - Use the Select and Transform dialogs to manually construct a JSON string using values from other fields in a table. Shows how we can manipulate text to build desired contents in a field.
Example: Edit a Drawing with Transform Dialog Templates - In this example we open a drawing and edit objects in the drawing using the Transform dialog Template tab. Includes examples of using the Add Component button and also the Edit Query button.
Example: Use a Transform Dialog Expression to Create Buffers in a Drawing - Use the Expression tab of the Transform Dialog to create three different sizes of buffers for different lines in a drawing and then automatically create a query which does the same thing. Includes examples of using the Add Component button and also the Edit Query button.
Example: Clip Areas with a Transform Dialog Expression - Use the Expression tab of the Transform dialog to clip areas in a drawing to fit within horizontal bounds. Includes examples of using the Add Component button and also the Edit Query button.
Example: Smooth Lines with a Transform Dialog Expression - Use the Expression tab of the Transform dialog to make lines smoother in a drawing so that longer lines are smoothed more. Includes examples of using the Edit Query button to show how different queries are created automatically depending on if we want to update a field or to add a new component.