Skip to content

Main content

Longitude Sector Membership Tool

Test a supplied eastward longitude sector; equal normalized endpoints denote a single meridian, not a full globe.

Loading tool…

Description

Require longitudes and sector endpoints within [-180, 180], normalize 180 to -180, and test the direct or seam-crossing interval with independent endpoint-inclusion flags.

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.

Require longitudes and sector endpoints within [-180, 180], normalize 180 to -180, and test the direct or seam-crossing interval with independent endpoint-inclusion flags.

When to use this tool

Use Longitude Sector Membership when you need a longitude normalization, interval, or seam-policy calculation.

How to use the tool and how it works

  1. Enter longitudeDegrees, startDegrees, endDegrees, includeStart, includeEnd. 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 inside, crossesDateline. Inspect inside, crossesDateline before interpreting the associated values.

Require longitudes and sector endpoints within [-180, 180], normalize 180 to -180, and test the direct or seam-crossing interval with independent endpoint-inclusion flags.1

Input fieldMeaning and unitsAccepted input
longitudeDegreesLongitude DegreesRequired. Finite number.
startDegreesStart DegreesRequired. Finite number.
endDegreesEnd DegreesRequired. Finite number.
includeStartInclude StartRequired. Boolean.
includeEndInclude EndRequired. Boolean.
Output fieldInterpretationReturned shape
insideInsideRequired. Boolean.
crossesDatelineCrosses DatelineRequired. Boolean.
json
{
  "input": {
    "longitudeDegrees": 175,
    "startDegrees": 170,
    "endDegrees": -170,
    "includeStart": true,
    "includeEnd": false
  },
  "output": {
    "inside": true,
    "crossesDateline": true
  }
}

Limitations and assumptions

  • Equal normalized endpoints represent only a singleton when both boundaries are included, otherwise an empty sector; they never mean the whole world. The result checks angular membership rather than actual geographic regions.
  • 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-sector-membership — tool.io

Similar or alternative tools

  • Longitude Cell Half Open Membership

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

  • Longitude Arc Complement

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