Skip to content

Main content

Geography: Longitude Seam Endpoint Policy Tool

Normalize longitude to a single-turn interval with explicitly chosen positive or negative 180-degree seam representative.

Loading tool…

Description

Normalize modulo 360, mapping the seam to +180 under positive policy or -180 otherwise.

Longitude is an angular coordinate with a seam and equivalent values separated by full turns. Interval direction, endpoint inclusion, and half-turn policy must be fixed before comparing or averaging longitudes.

Normalize modulo 360, mapping the seam to +180 under positive policy or -180 otherwise.

When to use this tool

Use Geography: Longitude Seam Endpoint Policy when you need a longitude normalization, interval, or seam-policy calculation.

How to use the tool and how it works

  1. Enter longitudeDegrees, seamPolicy. 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 result. Expand result to inspect the returned fields.

Require longitudeDegrees within ±one million and a positive or negative seam policy. Normalize modulo 360, mapping the seam to +180 under positive policy or -180 otherwise.1

Input fieldMeaning and unitsAccepted input
longitudeDegreesLongitude Degrees Unit: deg.Required. Finite number.
seamPolicySeam PolicyRequired. Text; one of "positive", "negative". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultObject containing the calculated members; expand to inspect the fields below.Required. Object.
result.longitudeDegreesLongitude DegreesCalculated result member: number.
json
{
  "input": {
    "longitudeDegrees": 180,
    "seamPolicy": "negative"
  },
  "output": {
    "result": {
      "longitudeDegrees": -180
    }
  }
}

Limitations and assumptions

  • The output interval is (-180, 180] or [-180, 180) according to policy. Normalization does not change a coordinate reference system or locate a point by itself.
  • Outputs are nested inside result. 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 a full spherical or ellipsoidal geometry method for routes and areas. Retain an explicit seam and endpoint policy when splitting, sorting, or averaging geographic data.

References

  1. Calculation and input contract: geography/longitude-seam-endpoint-policy — tool.io

Similar or alternative tools

  • Longitude Arc Complement

    Return the smaller of their absolute difference and its 360-degree complement as shortArcDegrees, and 360 minus that result as longArcDegrees.

  • Longitude Cell Half Open Membership

    Test membership in the west-inclusive, east-exclusive interval, using a union across the seam when west exceeds east.