Transform Options

 

Transform Options

The Transform Options dialog becomes available in the Transform panel when the action button is set to Add Component, as some transform templates allow.  Templates which do not allow changing the action button from Update Field  to Add Component do not use Transform options.    Transform options control how fields from the target and overlay drawings are brought into the resulting modified target drawing.

 

il_overlay_process.png

 

Transform options allow specifying:

 

 

The Transform Options dialog appears when the Options button is pressed in the Transform panel.

 

eg_transfer_options_methods01_00.png

 

The most common use of the Transform Options dialog is with Overlay and Overlay Topology templates, to specify how fields from the overlay drawing will be transferred to the new, modified target drawing that is created by the template.

 

To use the Transform Options dialog:

 

  1. With the focus on the target drawing, in the Contents pane click on the Transform pane.

  2. Choose the desired template and the desired overlay or other accessory drawing.

  3. Change the action button to Add Component.

  4. Press the Options button.

  5. If desired, change the suggested names for the components to be created.

  6. Ctrl-click on one or more fields to select them or to deselect  them.

  7. Double-click into the transfer method column to choose the desired method. The choice will apply, if possible, to all selected fields.  ignore means to not transfer the field.

  8. Press OK.

  9. Back in the Transform panel press Add Component to create the new component using those Transfer options.

 

il_transfer_options.png

 

Table

The name to use for the new, modified target table that is created.   A default suggestion is offered.  Editing that default suggestion will cause the paired Component below to also alter in a similar manner.

Component

The name of the component, usually a drawing, which visualizes the new Table.  May be edited as desired.

(Fields pane)

Provides a list of all fields both in the target drawing and in the overlay drawing including the data type of each field and the transfer method to be used. A blank transfer method indicates the field will not be transferred into the resulting new table.   Icons next to each field provide a visual cue as to the source and aggregation status.

i_icon_transfer_options_target_field.png

A field in the target drawing.

i_icon_transfer_options_target_field_aggregate.png

A field in the target drawing that is aggregated from multiple values into one, for example, during a Union Areas template operation.

i_icon_transfer_options_overlay_field.png

A field in the overlay or other participating drawing.

i_icon_transfer_options_overlay_field_aggregate.png

A field in the overlay or other participating drawing that is aggregated from multiple values into one, for example, during an Overlay Contained template operation.

(Transfer method)

Double-click into a transfer method cell to choose a transfer method from the list of available methods.  The choice will apply to all selected fields.

(Selection)

Ctrl-click on a field row to select it or to de-select it.  Ctrl-click a row and then Shift-click another row to select all rows in between.

 

The method chosen in the Transfer box applies to all fields that are selected.   Depending upon the data type of the field, only some methods will be available.   For example, the boolean methods are available only for boolean data type fields.   

 

transfer

Transfer the field value as is with no aggregation.  

ignore

Do not transfer the field.  If ignore is chosen the transfer method displayed in the fields pane for that field will be blank.

average

Transfer into this field in the new table the average of values found in this field in aggregated records.

bit and

Numeric fields only.  Transfer into this field the result of a bitwise AND on values for that field for all aggregated records.

bit or

Numeric fields only.   Transfer into this field the result of a bitwise OR on values for that fieldfor all aggregated records.

bit xor

Numeric fields only.    Transfer into this field the result of a bitwise XOR on values for that field for all aggregated records.

boolean and

Boolean fields only.  Transfer into this field the result of a boolean AND on values for that field for all aggregated records.

boolean or

Boolean fields only.  Transfer into this field the result of a boolean OR on values for that field for all aggregated records.

boolean xor

Boolean fields only.  Transfer into this field the result of a boolean XOR on values for that field for all aggregated records.

center

Geom fields only.   Transfer into this field a point object placed at the center of the minimum enclosing circle for geometries in that field for all aggregated records.

convex hull

Geom fields only.   Transfer into this field an area object comprising the convex hull for geometries in that field for all aggregated records.

copy

Copy the value of the field into the new table.   If more than one record is being aggregated, copy the value of the field for the first record encountered.

count

Transfer into this field in the new table the total number of aggregated records.

join tokens

Text fields only.  Create a concatenated list of text values in the aggregated records, separated by comma characters.

max

Transfer into this field in the new table the maximum value found in this field in aggregated records.

median

Transfer into this field in the new table the median of values found in this field in aggregated records.

merge areas

Geom fields only.   Transfer into this field an area object that merges into a single, branched area object all areas in that field for all aggregated records, discarding lines and points.

merge lines

Geom fields only.   Transfer into this field a line object that merges into a single, branched line object all lines in that field for all aggregated records, discarding areas and points.

merge points

Geom fields only.   Transfer into this field a point object that merges into a single, branched point object all points in that field for all aggregated records, discarding areas and lines.

min

Transfer into this field in the new table the minimum value found in this field in aggregated records.

stdev

Transfer into this field in the new table the standard deviation of values found in this field in aggregated records.

stdevpop

Transfer into this field in the new table the standard deviation of values found in this field in the entire table.   The method name is a mnemonic for the standard deviation for an entire population.

sum

Transfer into this field in the new table the sum of values found in this field in aggregated records.

union areas

Geom fields only.  Transfer into this field an area object that unions into a single area object all areas in that field for all aggregated records, discarding lines and points.  A union merges areas 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.  

union rects

Geom fields only.  Transfer into this field an area object that is the enclosing rectangle for the geoms in all aggregated records.

var

Transfer into this field in the new table the variance of values found in this field in aggregated records.  

varpop

Transfer into this field in the new table the variance of values found in this field in the entire table.   The method name is a mnemonic for the variance for an entire population.

 

Transfer methods that aggregate geom fields are based on the analogous SQL functions, which are also used in the analogous transform templates.   See, for example, the Transform Templates - Drawings topic for illustrations.

Examples

Consider a map with two drawing layers, a Cities layer that shows cities as points and a Centre layer that shows the region of Centre in France as an area.

eg_transfer_options_methods01_01.png

In the Cities Table each record for a city has a name for the city as well as a Pop population value.

 

eg_transfer_options_methods01_02.png

The Centre Table has only the geometry field for the area and a Region field with the name of the region.

eg_transfer_options_methods01_03.png

 

We will use the Overlay Contained template to transfer the several population values from the Cities points records into a single population value for the Centre record.   We will repeat this process using all twelve of the transferring methods to illustrate how each method works.

 

We click on the Centre layer tab in the map to make Centre the active drawing and then in the Contents pane we click on the Transform pane.

 

eg_transfer_options_methods01_04.png

 

We set Geom as the target field and then we choose the Overlay Contained template, which takes field values from all objects Contained by Centre and choose Cities as the Overlay drawing.   

 

eg_transfer_options_methods01_04a.png

 

As soon as we choose the Overlay Contained template, the map window shows a preview of the Centre region in blue, indicating it will be the object affected by the template.   

 

eg_transfer_options_methods01_04b.png

 

In the Transform panel we press Options to open the Transform Options dialog.

 

Our first step is to specify a short name for the resulting component.  We'll use a name that includes "Copy" so that when we open the resulting table we will know at a glance from the name of the table what transfer method was used to transfer the population field.

 

eg_transfer_options_methods01_05a.png

 

Our plan is to copy the Pop field values and to ignore other fields in the Cities drawing.   We begin by setting the option to ignore  for those fields we want to ignore.   In the Transform options dialog we Ctrl-click onto the mfd_id, the City and the Geom field rows to select those rows.  Now, whatever change we make to any of the method cells will apply to all of the rows.   That is a quick way to change options for many fields at once.    We double-click into the copy cell for one of the selected rows.

 

eg_transfer_options_methods01_05b.png

 

In the context menu we choose ignore for the transfer method.   That means those fields will not be transferred.    The context menu contains various choices, such as merge areas, which will apply to only some data types.  There are many choices.

 

eg_transfer_options_methods01_05.png

 

Next, we Ctrl-click those three rows again to de-select them, and we Ctrl-click the Pop row to select that row.  We set the transfer rule to copy.  It should be copy by default, but just in case we show this step to remind that copy should be the Transfer method setting  for the Pop field.

 

We press OK and then back in the Transform panel we press Add Component to create a new table and a new drawing that include a Pop field brought over using the copy method.

 

In the illustrations that follow we will show the original Cities table along with the table created by the transform.

Copy

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_06.png

When multiple records are involved in an aggregate the copy method copies the value of the first record.   All of the points in the Cities table are contained by the one area in the Centre table (all are cities within the Centre region of France) so there are multiple records that are aggregated by the Overlay Contained template.   Copy takes the value of the first record, for the city of Avord with a population of 2100, and places that record into the new o_Pop field in the newly created record.  The new field is named by default by prefixing o_ to the name, Pop, of the field that was transferred.

Average

We continue the examples by once again clicking Options to change the Transfer Options dialog settings.  We will change the name of the components to be created to include the word Average.

 

eg_transfer_options_methods01_07.png

 

With the Pop field highlighted we change the Transfer method to average.  We press OK and then back in the Transfer panel we press Add Component to create a new table and drawing that include a Pop field brought over using the average method.

 

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_08.png

 

The average method finds the average value of the Pop values for the records that are contained within Centre and places that average value into the new o_Pop field.

 

With the remaining transfer methods in this example to save space we will not illustrate the Transfer Options dialog as we choose a transfer method for the Pop field and also change the name of the components to be created to reflect the name of the transfer method.

Count

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_10.png

The count method adds up the total number of records in the aggregate and places that sum into the new record.  There are nine records in the aggregate so the value 9 is placed into the resulting o_Pop field.   This is a case where the first thing we might do with the new table is to rename the field into some name meaning number of cities in the region.

Max

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_12.png

 

The maximum method scans all values in the field for records in the aggregate to find the maximum value and puts that into the new field.   Within the Pop values in the Cities Table the maximum population is for the city of Tours, at 129500, so the value of 129500 is placed in the new o_Pop field.

Median

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_14.png

 

The median method computes the median value for the nine values of population in the records that are aggregated and puts that value, 51000, into the o_Pop field.   The median of the nine values is 51000, the population of Chateauroux, because there are four records with populations lower than 51000 and four records with populations higher than 51000.

Min

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_16.png

The minimum method scans all values in the field for records in the aggregate to find the minimum value and puts that into the new field.   Within the Pop values in the Cities Table the minimum population is for the city of Avord, at 2100, so the value of 2100 is placed in the new o_Pop field.

Stdev

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_18.png

 

The stdev method computes the standard deviation for the nine values of population in the records that are aggregated, using n-1, that is 8, as the sample size and puts that value, 43770, into the o_Pop field.

Stdevpop

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_20.png

 

The stdevpop method computes the standard deviation for the nine values of population in the records that are aggregated, using n, that is 9, as the sample size and puts that value, 41267, into the o_Pop field.

Sum

The sum method computes the sum of the nine values of population in the records that are aggregated and puts that value, 495737, into the o_Pop field.

 

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_22.png

Var

The var method computes the variance for the nine values of population in the records that are aggregated, using n-1, that is 8, as the sample size and puts that value, 1702979757, into the o_Pop field.  and puts that value, 1915852227, into the o_Pop field.

 

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_24.png

Varpop

The varpop method computes the variance for the nine values of population in the records that are aggregated, using n, that is 9, as the sample size and puts that value, 1702979757, into the o_Pop field.

 

eg_transfer_options_methods01_02.pngeg_transfer_options_methods01_26.png

 

Join Tokens

The join tokens method treats the entire content of a text field as a "token," and combines the tokens from aggregated records into a list, separated by a comma , character.

 

eg_transfer_options_methods01_02.png

 

The Cities Table contains the text names of cities in the City field.

 

 

eg_transfer_options_methods01_27.png  

 

We ignore the mfd_id and Geom fields, we use copy for the Pop field and join tokens for the City field.

 

eg_transfer_options_methods01_28.png

 

The result is an o_City field which contains a concatenated list of the values in the City field of the aggregated records, separated by commas.  To use a different character, use the Edit Query button in the Transform panel, and change the character used in the query.

 

Merge Areas

The merge areas method merges into a single area object all areas in the geometry field of the aggregated records.   Point and line objects are ignored.

 

eg_transfer_options_methods01_29.png  eg_transfer_options_methods01_30.png

 

Suppose our Cities drawing contains a mix of points and areas.   Two of the cities are indicated by areas and not by points.

 

eg_transfer_options_methods01_31.png

 

The Cities Table shows how the geometry for Chartres and Orleans consists of areas and not points.

 

eg_transfer_options_methods01_32.png  

 

In the Transform Options dialog we ignore the mfd_id,  Geom, and Pop fields, and we use merge areas for the City field.

 

eg_transfer_options_methods01_33.png

 

The result is an o_Geom field which contains the two areas for Chartres and Orleans merged into a single area object.  

 

eg_transfer_options_methods01_34.png  eg_transfer_options_methods01_35.png

 

We can create a new drawing based on the o_Geom geometry, add it to the map and style it using blue color.  There are no points in the layer since the merge areas transfer method discards points and lines.  It only merges areas.     What appear to be two areas are really a single area object that has two branches.

 

eg_transfer_options_methods01_36.png  eg_transfer_options_methods01_37.png

 

We can see it is a single area object by Ctrl-clicking on either of the two branches.  Both are selected since they are both part of the same, single, area object.

 

Merge Compared to Union

Merge and Union operations are similar in that they combine objects.  The difference is that Merge simply combines coordinate lists as if each object combined is a new branch while Union utilizes the spatial implications of inside/outside the objects had before being merged.   This can be most clearly seen when areas are combined using Merge or Union.

 

eg_merge_vs_union01_01.png  eg_merge_vs_union01_02.png  eg_merge_vs_union01_03.png

 

Consider two overlapping area objects, as seen in the left-most illustration above.   A Merge operation simply combines the coordinate lists of the two objects as two branches.   The coordinate list of the second object treated as a branch results in a "hole" in the region of overlap with a touching "island" where the second branch does not overlap the first branch.   This is a consequence of how coordinate lists are used to define branched area objects.

 

A Union operation considers both original area objects in terms of the spatial definition of what is considered to be "inside" the original area boundary.  That "inside" is retained as if both areas were metal cutouts where the region of overlap between the metal cutouts is welded together in the region of overlap, to form a single "inside" within the new, combined cutout.  Branches are used in Union where area objects do not touch or overlap, so show such a combined, area object as having "islands."

 

Notes

 

 

Sample data - The illustrations in this topic use data from a US military site.  The selection of cities shown within the region of Centre were part of a military data set where important facilities such as military airports were located.  The selection of cities does not represent the most important or largest cities or other criteria, nor are population values up to date.   The cities serve in this example simply as a sample  of points with populations that can be transferred to show how different transfer methods work.

 

See Also

Contents Pane

 

Transform

 

Contents - Transform

 

Transform Templates

 

Transform Templates - Drawings

 

Transform Templates - Geom

 

Transform: Overlay

 

Transform: Overlay Topology

 

SQL Functions

 

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