Remap (LMATH)
  • 1 Minute to read
  • Dark
    Light
  • PDF

Remap (LMATH)

  • Dark
    Light
  • PDF

Article summary

LMath: Remap (A, B)

Available from v7.3.2.01

Map a continuous numeric field to a discrete numeric field

Purpose

Use this function to:
  • Turn a continuous field into a numeric field so that it can be used in functions requiring discrete fields.
  • Scale a field

Return Value

PropertyValue
FieldTypeLongInteger
FieldSizeHigh
DataTypeDiscrete
DataSizeShort / Integer / LongInteger

Parameters

ParameterJSONDescription
Table“targetTable”: “MyTableName”The target table on which the new field will be created
Filter“dataset”: {DataSet_JSON}Optional.   If a filter is applied, records not in the filter recordset will be returned as null.
LMath Function“p1”: “”"Remap"
A“p2”: “NumericFieldName”
Required.  Field to remap
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Integer, Double
B“p3”: “SizeOfRange”
“p3”: “#N*”
Required.  Size of the range to map the field to.
Supports:  
  • Fixed Value:  #N*    e.g. #201596,    #-87
  • Fixed Value: #N*.N* e.g. #201596.05,    #-87.98
Treat Null as Zero"nullIsZero": true
"nullIsZero": false

True/False.
Default = False
If true, then any null values in the input fields will be treated as if they have a value of 0.

JSON Sample

The following remaps the field "y_latitude" into field "REMAP y_latitude", where "REMAP y_latitude" has a potential range of 100,000 discrete values

{
  "method": "BuildBakedField",
  "project": "REGRESS_PackageInject",
  "targetTable": "DATA_SRC",
  "overwrite": true,
  "name": "REMAP y_latitude",
  "function": "lmath",
  "p1": "REMAP(A,B)",
  "p2": "y_latitude",
  "p3": "#100000"
}


Usage Notes

See Also:   

Example

ExampleDetails
DescriptionReduce discrete values of continuous double latitude field by scaling to fit a specified range
Input
  • Table: = [DATA_SRC]
  • Filter: = [No Filter]
  • Function: = LMath
  • Math Function = Remap(A,B)
  • A:= [DATA_SRC].[y_latitude]
  • B:= #100000
  • Name: = REMAP y_latitude
Sample





Was this article helpful?

What's Next