Grid Reference Digit Padding Normalizer
Left-pad explicitly interpreted local coordinate integers; does not append precision digits or infer a full grid square.
Description
Left-pad local easting and northing digit strings to a chosen width.
Grid components sometimes need a consistent written width for storage or display. This normalizer left-pads separately supplied easting and northing digit strings with zeros.
When to use this tool
Left-pad local easting and northing digit strings to a chosen width. Use it when the input measurements and conventions below match the operation you need.
- Prepare eastingDigits, northingDigits, targetDigitsPerAxis, respecting the measurement basis and boundaries below.
- Compare the worked example with your intended operation before reusing its result.
How to use the tool and how it works
- Enter every field in the input table using the stated units and exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
targetDigitsPerAxis must be an integer from 1 to 5. Each component must contain digits and be no longer than that width; padStart adds leading zeros until the target width is reached.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| eastingDigits | Easting digits. | Text |
| northingDigits | Northing digits. | Text |
| targetDigitsPerAxis | Target digits per axis. | Integer; from 1 to 5 inclusive |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.normalizedEasting | Normalized easting; use the stated units and sign convention. |
| result.normalizedNorthing | Normalized northing; use the stated units and sign convention. |
{
"input": {
"eastingDigits": "12",
"northingDigits": "3",
"targetDigitsPerAxis": 3
},
"output": {
"result": {
"normalizedEasting": "012",
"normalizedNorthing": "003"
}
}
} Limitations and assumptions
- Padding is textual formatting, not a precision conversion or an accuracy improvement. It does not append trailing zeros, truncate longer coordinates or locate the referenced grid square.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
For a map-layout decision, inspect the rendered map at its intended size as well as its numerical dimensions. For classification or coordinate work, retain the chosen boundary and coordinate conventions with the result. Compare the scope of the nearby tools below before substituting one.
References
Similar or alternative tools
- Eight-Figure Grid Reference Precision Meter Checker
8-figure local grid precision: 10m square, not observed accuracy or validated coordinate.
- grid to magnetic converter
Magnetic azimuth from grid azimuth, signed grid convergence (true minus grid), and east-positive declination.