Transform - Numbers: Limit

The Limit template appears in the template list when a numeric field of type float32, float64, int8, int16, int32, int64uint8, uint16, uint32, or uint6, has been picked in the Transform pane. The template computes bounds to upper and lower limits of ranges of values of a specific channel in a tile.

 

Limit

Limit values within a numeric field:

 

  • limit both - Limit values to a range between the At least and At most values specified.  

  • limit maximum - Limit values to no greater than the At most value specified.

  • limit minimum - Limit values to no less than the At least value specified.

 

Launch the template by choosing a numeric field and then double-clicking the Limit template.   When the template launches we can specify options.

 

 

Limit : limit both

Limit values to a range between the At least and At most values specified and save to the specified Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Limit template.

 

 

In the Limit template, we choose limit both as the Operation.   

 

We enter 5000 in the At least box, and 15000 in the At most box.

 

For the Result destination, we choose New Field and then enter Limited Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Limited Numbers and populates it with values that are at least 5000 and at most 15000, and if the value in the Numbers field falls within that range, the number in the Numbers field.

 

In the above example we specified explicit numbers for the At least and the At most values, but we could choose fields from the pull down menus for those boxes, or we could use Expressions.   Consider the following example:

 

We start with a table with three fields of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.   The More field has values that are greater than those in the Less field.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Limit template.

 

 

In the Limit template, we choose limit both as the Operation.   

 

In the At least box we use the pull down menu to choose the Less field. In the At most box we use the pull down menu to choose the More field.

 

For the Result destination, we choose New Field and then enter Limited Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Limited Numbers and populates it with values that for each record are at least the value in the Less field and at most the value in the More field, and if the value in the Numbers field falls within that range, the number in the Numbers field.

 

See the Limit : limit minimum example below for use of an Expression.

 

Limit : limit maximum

Limit values to no greater than the At most value specified and save to the specified Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Limit template.

 

 

In the Limit template, we choose limit maximum as the Operation.   

 

We enter 15000 in the At most box.

 

For the Result destination, we choose New Field and then enter Limited Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Limited Numbers and populates it with the number in the Numbers field, except when that number is larger than 15000 in which case the value written to the new field is 15000.

 

In the above example we specified an explicit number for the At most values, but we could choose a field from the pull down menu for that box, or we could use an Expression.   Consider the following example:

 

We start with a table with two fields of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.   The Misc Numbers field has some values greater than those in the Numbers field and some values smaller.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Limit template.

 

 

In the Limit template, we choose limit maximum as the Operation.   

 

In the At most box we use the pull down menu to choose the Misc Numbers field.

 

For the Result destination, we choose New Field and then enter Limited Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Limited Numbers and populates it with the number in the Numbers field, except when that number is larger than the value in the Misc Numbers field for that record, in which case the value written to the new field will be the value in the Misc Numbers field.

 

See the Limit : limit minimum example below for use of an Expression.

 

Limit : limit minimum

Limit values to no less than the At least value specified and save to the specified Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Limit template.

 

 

In the Limit template, we choose limit minimum as the Operation.   

 

We enter 5000 in the At least box.

 

For the Result destination, we choose New Field and then enter Limited Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Limited Numbers and populates it with the number in the Numbers field, except when that number is less than 5000 in which case the value written to the new field is 5000.

 

In the above example we specified an explicit number for the At least values, but we could choose a field from the pull down menu for that box, or we could use an Expression.  Consider the following example:

 

We start with a table with two fields of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.   The Less field has some values greater than those in the Numbers field and some values smaller.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Limit template.

 

 

In the Limit template, we choose limit minimum as the Operation.   

 

In the At least box we use the pull down menu to choose Expression.  That launches the Expression dialog, which provides full query builder facilities to write SQL expressions.    We enter the simple expression:

 

[Less] * 2

 

Press OK to return to the Transform pane.   We have just set the minimum limit for the result to be whatever is in the Less field for each record multiplied by 2.

 

For the Result destination, we choose New Field and then enter Limited Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Limited Numbers and populates it with the number in the Numbers field, except when that number is smaller than the value in the Less field multiplied by 2, in which case the value written to the new field will be the value in the Less field multiplied by 2.

 

For example, in the first row of the table, the Numbers value of 1474 is less than 2818, which is the value of the Less field multiplied by 2, so the number 2818 is saved into the Limited Numbers result field.

 

In the row where 3668 is the Numbers value, that number is greater than the value of the Less field multiplied by 2, so the Numbers value of 3668 is saved into the Limited Numbers result field.

 

See the Limit : limit maximum example above for use of a field in the At most box.

 

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Numeric Vectors

 

Transform - Numbers

 

Transform - Numbers: Arithmetic

 

Transform - Numbers: Bit Logic

 

Transform - Numbers: Copy

 

Transform - Numbers: Expression

 

Transform - Numbers: Hyperbolic

 

Transform - Numbers: Round

 

Transform - Numbers: Special

 

Transform - Numbers: Trigonometric