--- title: "Remap (LMATH)" slug: "remap-lmath" updated: 2025-03-05T08:50:52Z published: 2025-03-05T08:50:52Z canonical: "docs.datajet.app/remap-lmath" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # Remap (LMATH) ## 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 | Property | Value | | --- | --- | | **FieldType** | LongInteger | | **FieldSize** | High | | **DataType** | Discrete | | **DataSize** | Short / Integer / LongInteger | ## Parameters | Parameter | JSON | Description | | --- | --- | --- | | **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 ```json { "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" } ``` ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1741029224635.png) ## Usage Notes See Also: - [LMath Overview](/v1/docs/lmath-overview) - [Engineering | Expression Field](/v1/docs/expression-field) ## Example | Example | Details | | --- | --- | | **Description** | Reduce 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** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1741164623338.png) |