Description
Test membership in the west-inclusive, east-exclusive interval, using a union across the seam when west exceeds east.
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.
Test membership in the west-inclusive, east-exclusive interval, using a union across the seam when west exceeds east.
When to use this tool
Use Longitude Cell Half Open Membership when you need a longitude normalization, interval, or seam-policy calculation.
How to use the tool and how it works
- Enter longitude, west, east. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read inside, crossesAntimeridian. Inspect inside, crossesAntimeridian before interpreting the associated values.
Require longitude, west, and east in [-180, 180). Test membership in the west-inclusive, east-exclusive interval, using a union across the seam when west exceeds east.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| longitude | Longitude | Required. Finite number; minimum -180; strictly below 180. |
| west | West | Required. Finite number; minimum -180; strictly below 180. |
| east | East | Required. Finite number; minimum -180; strictly below 180. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| inside | Inside | Required. Boolean. |
| crossesAntimeridian | Crosses Antimeridian | Required. Boolean. |
{
"input": {
"longitude": 179,
"west": 170,
"east": -170
},
"output": {
"inside": true,
"crossesAntimeridian": true
}
} Limitations and assumptions
- Equal endpoints define an empty interval, never a full turn. Positive 180 is rejected rather than silently normalized, and only longitude membership is tested.
- 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
Similar or alternative tools
- Longitude Sector Membership
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.
- Geography: Geographic Cell Angular Center
Compute the eastward wrapped longitude span, take its halfway point, and normalize into [-180, 180).