Description
Return named coordinates and swappedPair [second, first].
Coordinate labels and tokens encode an axis order, sign convention, or formatting policy. Numeric compatibility and text formatting can diagnose ambiguity, but neither establishes the actual coordinate reference or location.
Return named coordinates and swappedPair [second, first].
When to use this tool
Use Geography: Geographic Latlon Axis Order Swap when you need a supplied geographic label or coordinate-convention diagnostic.
How to use the tool and how it works
- Enter first, second, inputOrder. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read result. Expand result to inspect the returned fields.
Require inputOrder lat-lon or lon-lat, interpret the first two values accordingly, and validate latitude in [-90, 90] and longitude in [-180, 180]. Return named coordinates and swappedPair [second, first].1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| first | First | Required. Finite number. |
| second | Second | Required. Finite number. |
| inputOrder | Explicit caller-supplied axis order; not inferred from numeric plausibility. | Required. Text; one of "lat-lon", "lon-lat". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the calculated members; expand to inspect the fields below. | Required. Object. |
| result.latitudeDegrees | Latitude Degrees | Calculated result member: number. |
| result.longitudeDegrees | Longitude Degrees | Calculated result member: number. |
| result.swappedPair | Always [second, first]; resulting order depends on inputOrder. | Calculated result member: array. |
{
"input": {
"first": 10,
"second": 20,
"inputOrder": "lat-lon"
},
"output": {
"result": {
"latitudeDegrees": 10,
"longitudeDegrees": 20,
"swappedPair": [
20,
10
]
}
}
} Limitations and assumptions
- The swappedPair always reverses the raw input, so its order depends on inputOrder. No coordinate-reference or datum conversion is performed.
- 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
Read authoritative coordinate metadata when the actual axis order or reference system matters. Keep original numeric precision and explicit sign conventions rather than inferring them from a plausible label.
References
Similar or alternative tools
- Coordinate Order Ambiguity Count
Test whether first and second satisfy longitude/latitude bounds in each possible order, count valid orders, and set ambiguous when both orders pass.
- Geographic Point Antimeridian Alias Pair
Return west [-180, latitude] and east [180, latitude] as longitude-first pairs.