Skip to content

Main content

Point Coordinate Dimension Agreement Tool

Calculate point coordinate dimension agreement from explicit caller-supplied inputs.

Loading tool…

Description

Return their lengths and sameDimension for equal length.

A GeoJSON position is an ordered coordinate tuple. Its dimension and individual ordinates are structural information; the presence of a third value alone does not establish a usable altitude or a valid coordinate reference.

Return their lengths and sameDimension for equal length.

When to use this tool

Use Point Coordinate Dimension Agreement when you need a coordinate-tuple shape check or explicit ordinate operation.

How to use the tool and how it works

  1. Enter first, second. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read sameDimension, firstDimension, secondDimension. Inspect sameDimension before interpreting the associated values.

Require both positions to have at least two entries. Return their lengths and sameDimension for equal length.1

Input fieldMeaning and unitsAccepted input
firstFirstRequired. Array of finite number; maximum items 256.
secondSecondRequired. Array of finite number; maximum items 256.
Output fieldInterpretationReturned shape
sameDimensionSame DimensionRequired. Boolean.
firstDimensionFirst DimensionRequired. Safe integer.
secondDimensionSecond DimensionRequired. Safe integer.
json
{
  "input": {
    "first": [
      1,
      2
    ],
    "second": [
      1,
      2,
      3
    ]
  },
  "output": {
    "sameDimension": false,
    "firstDimension": 2,
    "secondDimension": 3
  }
}

Limitations and assumptions

  • Dimension agreement does not establish longitude/latitude order, coordinate validity, altitude basis, or compatibility of coordinate reference systems.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Validate the complete coordinate convention and geometry before geospatial use. For actual coordinate conversion, use a transformation with the source and target reference systems explicitly specified.

References

  1. Calculation and input contract: geojson/point-coordinate-dimension-agreement — tool.io

Similar or alternative tools