Transfer Rules

This topic applies only to tables that are associated with a drawing. Transfer rules come into play when the transform toolbar for drawings is used to create new objects in a drawing or when commands such as Dissolve transfer fields between objects. A transfer rule may be set for each column (field) in the table that specifies how that field will be transferred to any new objects created by various transform operators . By default, all fields in a table are copied to the new record created for the new object.

 

To specify a transfer rule for a column:

 

1. Open the drawing's table.

2. Right click on the column and choose Transfer rules.

3. In the Transfer Rules dialog, specify the transfer method to be used for one to many (1 to N) operators. The Proportional methods available for numeric fields also require specification of a second numeric field.

4. Specify the transfer method to be used for many to one (N to 1) operators.

5. For text fields, choose any desired options to ignore case or whitespace.

6. Press OK.

 

Transfer rules may also be specified by opening a table using the Table - Design dialog and double-clicking into a transfer rule for a column.

 

The transfer rules specified for each field will be used whenever a transform operator creates a new object. There are two types of transform operators that create new objects:

 

·      One to Many (1 to N) Operators - For each original object these operators create one or more new objects. An example is the Points operator, which creates a new point at each coordinate location that defines the shape of a line or area. Each line or area will therefore be used to create many new points. Operators like Centroids that create one new object for each original object are considered to be the simplest case of a one to many operator. The task for transfer rules for such operators is to specify how one value from the original object should be apportioned to the possibly many new objects created.

 

·      Many to One (N to 1) Operators - These operators create a single new object from many original objects. The classic example is Convex Hull , which creates a single area object that covers a set of many points.

 

If a transfer rule is specified for both 1 to N and N to 1 for each column in a table Manifold will know how to transfer fields for objects created by any transform toolbar operator. By default, the Sample method is used for all fields. The Sample method is a reliable way of dealing with "many to one" (N to 1) operations so it is used by default.

 

Some Manifold users prefer to have the Copy method used by default for newly created fields. If the Copy method is desired, in Tools - Options - Miscellaneous check the box for the Set transfer rules for new columns to Copy / Copy.

 

Note: intrinsic fields, Active columns, rank columns and columns brought into a table via a relation do not participate in transfer rules since by definition they are computed for each object individually.

 

Transfer Methods

 

Transfer methods that may be specified in the Transfer Rules dialog include the following. Methods apply to all field types except as noted. Uncheck the Transfer column box to not transfer the field.

 

One to Many (1 to N)

 

Copy

Transfer a copy of this field's value to each new object created.

Equal Division

Divide equally the value by the number of new objects created and place equal shares into each new object. Numeric columns except latitude and longitude.

Sample

One of the newly created objects receives a copy of the field's value and the other objects receive no transfer. The default for all columns.

Proportional

The field's value is distributed to the newly created objects in proportion to some other numeric column, for example Area (I) or Length (I). This method is most often used with geographic fields such as Area (I) but could also be used to distribute values based on non-geographic numeric fields such as those that might code for budget or population.

Many to One (N to 1)

 

Average

Transfer the average value for this field in the origin objects into the new object. Numeric columns.

Copy

Pick one of the "many" objects at random and transfer a copy of this object's field's value to the new object created.

Count

Transfer a count of the number of objects used to create the new object. For example, if 10 points are used to create one convex hull area object the value 10 would be transferred. Numeric columns. Note: choosing Count will dominate the transfer even if it is a 1 to N transfer.

Maximum

Transfer the maximum value for this field in the origin objects into the new object. Numeric, date and text columns.

Minimum

Transfer the minimum value for this field in the origin objects into the new object. Numeric, date and text columns.

Median

Transfer the median value for this field in the origin objects into the new object. Numeric, date and text columns.

Sample

Arbitrarily choose a value from one of the originating objects and transfer it to the new object. The default for text columns.

Sum

Transfer the sum of values for this field in the origin objects into the new object. The default for numeric columns.

 

When working with text fields, the maximum, minimum and median values are chosen according to lexicographic ordering for the relevant text field. For ANSI text fields, lexicographic ordering depends on the code page. Using the maximum, minimum and median transfer rules with text fields is only recommended for experts wanting to exploit the effects of lexicographic ordering with a full understanding of how it works for the text fields at hand.

 

Options

 

Transfer column

Checked by default. Uncheck to prevent this field from being transferred.

(1 to N field argument box)

Enabled for numeric fields when the Proportional method is selected. Specify the field, such as Area (I), to be used to allocate the value.

Ignore case

Enabled for text fields. Treat upper and lower case the same when making lexicographic comparisons to determine the value to be transferred. If checked, "San Juan" would be considered the same as "san juan".

Ignore leading and trailing whitespace

Enabled for text fields. Ignore any whitespace characters at the beginning or end of a text string when making lexicographic comparisons to determine the value to be transferred. If checked, " San Juan" would be considered the same as "San Juan".

Ignore internal whitespace

Enabled for text fields. Ignore any whitespace characters that occur within a text string when making lexicographic comparisons to determine the value to be transferred. If checked, "San Juan" would be considered the same as "SanJuan".

 

Proportional

 

The Proportional methods transfer values using some other numeric field (usually the Area(I) or Length(I) intrinsic fields) as a guide. Active Columns may also be used to guide Proportional transfer. Suppose we will apportion the value 30 from one object into three objects that have guiding values of 2, 2 and 1. Using Proportional will transfer the value 12 into the first and second objects and 6 into the third object.

 

A typical use of Proportional is to allocate values when splitting up areas. Suppose we have a single country area that we wish to break into a group of provinces using the Split with transform and a set of boundary lines for the provinces. If we have a Population field for the country and we assume that population is evenly dispersed (not usually true in most countries, but we will assume so for this example) we would like each newly created province area to inherit a proportional share of the population of the country. To accomplish this, we would set the 1 to N transfer rule to be Proportional for the Population field and we would use Area (I) as the guiding field for proportionality.

 

When the country is split into smaller areas, the Area (I) for each will be computed and compared to the Area (I) of the original country. Each smaller areas will get a proportional share of the Population field from the country.

 

Example

 

In this example we use Convex Hull to create areas that cover a selection of points. We use transfer rules to sum the values of a field and place the sum into the newly created area.

 

images\eg_transfer_01.gif

 

We begin with a drawing that shows points. We have selected six points. We have also saved this selection to the selections pane so that we can call it up later.

 

images\eg_transfer_02.gif

 

The drawing's table shows that each object has a Population field. The records for the selected points are highlighted in red selection color in the table.

 

To specify the desired transfer rules, we right click onto the Population column head and choose Transfer Rules from the context menu. In the Transfer Rules dialog we choose Sum as the method for N to 1 and press OK. This tells Manifold that whenever a transform operator creates one object from many, Manifold is to sum up the values of the Population field for the many objects and to place that summed value into the Population field for the resultant object.

 

images\eg_transfer_01a.gif

 

The Convex Hull transform operator is an operator that creates one object from many. We can apply it to the [Selection] as seen in the transform toolbar above to create a convex hull for the selected points.

 

images\eg_transfer_03.gif

 

When we press Apply on the toolbar the convex hull area appears in the drawing.

 

images\eg_transfer_04.gif

 

A new record has appeared in the table as well. The new record has a Population value that is the sum of the Population values of the points that were used to create it.

 

images\eg_transfer_05.gif

 

We can see this is the case by clicking on the saved selection for the points used to create the convex hull and then pressing the Preview button in the selections pane. This highlights the saved selection in blue preview color. We can see that 275 is the sum of the population values highlighted in blue.

 

images\eg_transfer_06.gif

 

We can next select the other five points. We’ll also save this selection in the selections pane so we can later preview the records for these points.

 

images\eg_transfer_07.gif

 

Seen in the table the records associated with these points are highlighted in red selection color.

 

images\eg_transfer_08.gif

 

If once more we apply the Convex Hull operator to the [Selection] in the transform toolbar we create a convex hull area about these five points.

 

images\eg_transfer_09.gif

 

In the table window we can see that another object has been added, with a Population value of 201.

 

images\eg_transfer_10.gif

 

If we click the saved selection for the second set of points and press the Preview button in the selections pane we can see that 201 is the sum of the Population values for the points (highlighted in blue preview color) used to create the convex hull area.

 

For Advanced Users

 

The "1 to N" and "N to 1" categories of transfer methods may make it seem that either one or the other method is used in any given situation. In actuality, both methods are used all of the time in all cases. First the N to 1 method is applied to the source set and then the 1 to N method is applied to the destination set of values. Careful contemplation of the operators involved will show that results will always be the same as if only one or the other method were used, except in the case of the Count operator in "1 to 1" operations.

 

The simultaneous operation of 1 to N as well as N to 1 can be seen by considering a case of 1 to 1 transfer. Suppose we make a copy of a drawing of areas. The original we call drawing A and the copy we call drawing B. Suppose we delete all data attribute values from B. We make changes to values in A and then we want to transfer the new values to B. Because B was originally a copy of A we know that the areas in B are exactly coincident with the areas in A. This is a "1 to 1" transfer since the value of each area in A will be transferred to one, and only one, area in B.

 

Our question is which transfer methods operates… the 1 to N or the N to 1? The correct answer is "both" as we can see from the following examples, each of which consider what happens to a value from a single area A with a numeric value of 5 that is transferred to the corresponding area B:

 

Let's say our 1 to N rule is "copy" and the N to 1 rule is "maximum". When transferring values from A to B the system will first apply the N to 1 rule to the source set of values (consisting of a single value from area A) yielding a "maximum" of 5, and then second apply the 1 to N rule with a target set of values (consisting of the single value of area B) "copying" 5 from the previous step to each value. The value of B will be set to 5.

 

Let's now say our 1 to N rule is "equal division" and the N to 1 rule is "sum". When transferring values from A to B the system will first apply the N to 1 rule to the source set of values (consisting of a single value from area A) yielding a "sum" of 5, and then second apply the 1 to N rule with a target set of values (consisting of the single value of area B) distributing 5 from the previous step "equally" to each value. The value of B will be set to 5.

 

Let's now say our 1 to N rule is "sample" and the N to 1 rule is "count". When transferring values from A to B the system will first apply "count" to A to yield 1, and then second will "sample" 1 to B. The value of B will be set to 1.

 

Summarizing the above, a "1 to 1" transfer will almost always result in copying the value from source object to target object, unless the N to 1 rule is set to "count", in which case the result will be 1.

 

Note that in cases that are truly many to one the resultant value always appear as if only the N to 1 rule is consulted. That is because Copy, Equal Division, Sample and Proportional all have the same effect when applied to the target set of values if the target set only has one member. Likewise, in cases that are truly one to many the resultant value always appears as if only the 1 to N rule were consulted. That is because all of the possible N to 1 operators have the same effect when there is only one member in the source set.

 

A fine point: although both N to 1 and 1 to N rules should always be understood to be in force Manifold will optimize execution so that no N to 1 computations are performed if it is clear that only one item would be in the "N" set.

 

Tech Tips

 

Have a lot of columns in your table and want to see all the transfer rules at once? Open the table and then choose Table - Design to see a summary.

 

Transferring column values between objects in a linked drawing using Sample or Copy N-to-1 aggregates will choose blank strings over NULLs.

 

See Also

 

Selection for examples of selections and using the selections pane to save and preview selections.

 

Transform Toolbar - Drawings and Transform Operators - Drawings for information on using the transform toolbar in drawings.

 

Spatial Overlay - Spatial overlays are a different concept than the idea of using transfer rules to aggregate or to allot values when creating objects with transforms. However, it is a related concept in that aggregations or allotments are used to transfer field values between objects.

 

Transfer Contour Line Height to Points - A simple example using Spatial Overlay and transfer rules.

 

Color Areas by Counts - A simple example using Spatial Overlay and transfer rules to color areas by the number of points they contain.

 

Shortest Path over Land - A complex example that uses Spatial Overlay and transfer rules.

 

Intersection Overlays - A small, but sophisticated, example that uses Transfer Rules, Split with, Clip with (Intersect) and Spatial Overlay commands with areas.