Skip to content

Main content

Map Grid Cell Origin Sign Tool

Cell center from an upper/lower boundary origin with explicit row-axis direction.

Loading tool…

Description

Offset the origin by column plus one half horizontally and signed row plus one half vertically.

A geographic grid uses indexes, tile sizes, origins, and cell spacing. Row direction and floor-division policy determine where cells fall, especially for negative indexes or origins defined at an outer corner.

Offset the origin by column plus one half horizontally and signed row plus one half vertically.

When to use this tool

Use Map Grid Cell Origin Sign when you need an explicit grid-index or angular-resolution calculation.

How to use the tool and how it works

  1. Enter column, row, xOrigin, yOrigin, cellWidth, cellHeight, rowDirection. 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 centerX, centerY. Use the output convention below.

Require nonnegative integer row and column, positive cell dimensions, and rowDirection up or down. Offset the origin by column plus one half horizontally and signed row plus one half vertically.1

Input fieldMeaning and unitsAccepted input
columnColumnRequired. Safe integer; minimum 0.
rowRowRequired. Safe integer; minimum 0.
xOriginX OriginRequired. Finite number.
yOriginOuter-corner y coordinate in a positive-up coordinate frame.Required. Finite number.
cellWidthCell WidthRequired. Finite number; strictly above 0.
cellHeightCell HeightRequired. Finite number; strictly above 0.
rowDirectionDown decreases y; up increases y.Required. Text; one of "up", "down"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
centerXCenter XRequired. Finite number.
centerYCenter YRequired. Finite number.
json
{
  "input": {
    "column": 0,
    "row": 1,
    "xOrigin": 100,
    "yOrigin": 200,
    "cellWidth": 10,
    "cellHeight": 20,
    "rowDirection": "down"
  },
  "output": {
    "centerX": 105,
    "centerY": 170
  }
}

Limitations and assumptions

  • The coordinate y axis is positive upward, so down rows decrease y. The supplied origin is an outer cell corner, not the first center; no map projection or raster extent is inferred.
  • 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

Use the raster's actual georeferencing transform for geographic placement. Verify corner versus center origin, axis direction, tile dimensions, and bounds before combining index calculations.

References

  1. Calculation and input contract: geography/map-grid-cell-origin-sign — tool.io

Similar or alternative tools