﻿ Transform Templates - Geom

# Transform Templates - Geom

This topic discusses application of the Transform Dialog with Tables on a geom field in a table.  That is equivalent to applying the Transform dialog to a Drawing and using the geom field in the drawing.  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 Drawings and Images.

## Notes

Temp Objects Drawing - The illustrations in this topic were created using the dynamic updating and previewing capabilities of the Transform dialog.    For the step by step process see the Example: Two Drawings from the Same Table topic.

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.   Double-clicking into the value of that property so we can scroll through it sideways we can see what the units are.  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 the habit everyone has of importing data carelessly into Manifold from whatever Internet source we found first where we could get what we wanted for free.   Much such data is in Latitude/Longitude coordinate systems and so it uses 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 imprecise and usually really stupid to use Latitude/Longitude when we need to do anything involving distances, but even in this documentation we've done so in the case of the Orthogonalize template discussed above.   The example uses a drawing of rivers in Australia that is in Latitude/Longitude projection.  Using a Step X and Step Y distance of 0.01 means we are using a grid that is about 1 km by 1 km to orthogonalize the coordinate points.

New Object Dialog

Transform Dialog

Transform Options

Transform Templates

Transform Templates - Drawings

Transform Templates - Images

Transform Templates - Binary

Transform Templates - Boolean

Transform Templates - Datetime

Transform Templates - Numeric

Transform Templates - Text

Transform Templates - Tile

Transform: Center and Centroids

Transform: Escape Templates

Transform: Overlay Topology

Transform: Voronoi Diagrams

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: 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.

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.