Coordinately

Positive and Negative Coordinates: Signs and Hemisphere Letters

The two equivalent ways to encode hemisphere in coordinates: signed numbers (positive north / east, negative south / west) and hemisphere letters (N, S, E, W). Conversion rules, when each is used, the sign-loss bugs, and the antimeridian discontinuity.

By . Published . Last updated .

A delivery destined for Miami, Florida (25.7617, -80.1918), plotted instead in southern Saudi Arabia (25.7617, 80.1918), because a CSV export round-tripped through a spreadsheet that auto-corrected the leading minus into a comment. The two coordinate pairs differ by a single character — a minus sign — but the geographic distance between them is over 12,000 km. Sign-handling bugs are second only to order-swap bugs (covered in /learn/why-latitude-comes-first) in the catalogue of coordinate-integration failures.

This article covers the two equivalent sign conventions used in practice — signed decimal numbers and hemisphere letters — the rules for converting between them, and the four bug classes that turn a correct coordinate into the wrong one.

Signed numbers

The software convention. Each coordinate component is a single signed decimal value. The sign carries the hemisphere:

  • Latitude: positive is north of the equator, negative is south. Bounded to [-90, +90].
  • Longitude: positive is east of the prime meridian, negative is west. Bounded to [-180, +180].

Examples:

  • 40.7128, -74.006 — New York City (north of equator, west of prime meridian).
  • -33.8688, 151.2093 — Sydney (south, east).
  • -22.9068, -43.1729 — Rio de Janeiro (south, west).
  • 35.6762, 139.6503 — Tokyo (north, east).

The signed-number convention is the default in software, databases, JSON, CSV, and most modern APIs. ISO 6709 lists it as the primary representation. The reasoning: a single signed numeric value is trivially parseable, comparable, sortable, and indexable. Range queries (“all latitudes between 40 and 50”) are arithmetic on a single column.

Hemisphere letters

The paper / aviation / marine convention. The numeric component is unsigned (always positive) and the hemisphere is encoded as a letter suffix or prefix:

  • Latitude: N for north, S for south.
  • Longitude: E for east, W for west.

Examples:

  • 40.7128°N, 74.006°W — New York City.
  • 33.8688°S, 151.2093°E — Sydney.
  • 22.9068°S, 43.1729°W — Rio de Janeiro.
  • 35.6762°N, 139.6503°E — Tokyo.

Hemisphere-letter notation is the convention on paper topographic maps, in aeronautical charts, on marine GPS displays, and in search-and-rescue grid references. Most DMS strings also use letters: 40°44'54.24"N, 73°59'08.52"W. The reasoning: when a coordinate is written without context (on a paper chart, spoken over a radio), the letter removes ambiguity that a leading minus might lose.

Converting between them

Conversion is arithmetic, not approximation. The rules are:

Signed → Lettered (latitude)
    if dd >= 0:    "{|dd|}°N"
    else:          "{|dd|}°S"

Signed → Lettered (longitude)
    if dd >= 0:    "{|dd|}°E"
    else:          "{|dd|}°W"

Lettered → Signed (latitude)
    if letter == 'N':   dd = +|value|
    if letter == 'S':   dd = -|value|

Lettered → Signed (longitude)
    if letter == 'E':   dd = +|value|
    if letter == 'W':   dd = -|value|

The value that survives the round-trip is the magnitude plus hemisphere indicator. The sign and the letter are alternative encodings of the same indicator; only one is ever applied at a time.

The live DMS ↔ Decimal Degrees converter parses either input form and emits both.

When each convention appears

| Context | Convention | | ------------------------------------ | -------------------- | | Databases (PostGIS, SQL Server) | Signed numeric | | CSV / JSON / API payloads | Signed numeric | | GeoJSON | Signed numeric | | Paper topographic maps (USGS, OS) | Hemisphere letters | | Aeronautical charts (ICAO) | Hemisphere letters | | Marine GPS displays | Hemisphere letters | | Search-and-rescue / military | Hemisphere letters | | Smartphone share-location URLs | Signed numeric | | Smartphone GPS apps (display) | Often configurable; default varies by region |

The rule of thumb: machine-to-machine paths use signed numbers; human- to-human paths often use letters. Convert at the display layer; store in signed form.

The ±180° / ±90° rule

The bounds and the sign meet at the edges:

  • Latitude: -90 is the South Pole; +90 is the North Pole. A coordinate component of +91 or -91 is geometrically impossible.
  • Longitude: -180 and +180 describe the same meridian — the antimeridian, halfway around the world from the prime meridian. The range [-180, +180] is inclusive on both ends, but the two endpoints coincide as a single physical line.

Validators reject latitude outside [-90, +90] and longitude outside [-180, +180]. Either bound, breached, is a coordinate-error signal — typically a sign mistake, an order swap, or a unit confusion (degrees vs. radians).

The antimeridian

The antimeridian is the meridian at ±180° longitude — the line opposite the prime meridian, running through the Pacific Ocean. The sign convention has a discontinuity here: +179.9 and -179.9 are points 0.2° apart (about 22 km at the equator), while +180 and -180 are the same line.

This matters in two places:

Distance calculations across the antimeridian. Naive subtraction of longitudes — lon2 - lon1 — gives the wrong angular distance when the path crosses ±180°. From (0, +179.9) to (0, -179.9), the naive subtraction is 359.8°; the correct distance is 0.2° (the short way round). Vincenty's formula and other great-circle routines handle this automatically; ad-hoc Euclidean code does not. The /tools/distance-calculator uses Vincenty's formula with antimeridian unwrapping for the rendered path.

Time zones. UTC+12 and UTC-12 are both adjacent to the antimeridian. The International Date Line follows the antimeridian approximately, with deliberate detours to keep island nations on a single calendar day. The longitude–time-zone correspondence is loose; see /learn/what-is-longitude for the detailed treatment.

A short numerical illustration. Two airports near the antimeridian: Nadi (Fiji) at -17.7553, 177.4439, and Pago Pago (American Samoa) at -14.3309, -170.7106. Subtracting the longitudes naively gives 177.4439 - (-170.7106) = 348.1545. The actual angular separation the short way around is 360 - 348.1545 = 11.8455 degrees. A distance routine that doesn't apply the modular wrap reports the two airports as nearly halfway around the planet apart; the correct great-circle distance is roughly 1,300 km.

Negative zero

The signed-number convention allows -0 as a legal value. The equator is at latitude 0, and the prime meridian is at longitude 0; both points are also at -0. IEEE-754 floating-point — the representation used by JavaScript, Python, Go, and most modern languages — stores +0 and -0 as different bit patterns. They compare equal under standard equality (0 === -0 is true in JavaScript), but identity-aware checks distinguish them (Object.is(0, -0) is false).

The practical concern is display, not geometry. A formatter that applies a sign without checking for zero will emit -0.000000 for the negative-zero value, even though the point is identical to positive zero. The defensive pattern is to normalise -0 to +0 before formatting:

const normalised = (Object.is(value, -0) || value === 0) ? 0 : value;

The coordinate libraries in src/lib/coords/ apply this normalisation at the formatter boundary so the public face of every tool emits 0.0000 rather than -0.0000.

Common sign-handling bugs

Four bug classes account for most sign errors:

Sign dropped in a CSV round-trip. Excel, Google Sheets, and other spreadsheets sometimes interpret a leading minus as the start of a formula or as a text-formatting hint. A column of negative coordinates can return without its signs after a save-and-reopen cycle. Defensive practice: store coordinates as numbers in the spreadsheet (not formatted as text), or use a tool-friendly format like GeoJSON for transport.

Unicode minus vs. hyphen-minus. A spreadsheet may emit a true Unicode minus (U+2212) where a parser expects an ASCII hyphen-minus (U+002D). The two glyphs look identical in most fonts but are different Unicode codepoints; parseFloat on a U+2212-prefixed string returns NaN. Defensive practice: normalise common Unicode minus variants at the parser before number parsing.

Dual hemisphere indicators. A parser that sees both a sign and a hemisphere letter (e.g., -40.7128°N) faces conflicting hemisphere claims. ISO 6709 considers this malformed. Strict parsers reject the dual form; tolerant parsers usually let the letter win and discard the sign, but the behaviour is implementation-dependent. Defensive practice: emit one indicator, not both, at every serialisation step.

Antimeridian wraparound miscomputed. Code that subtracts longitudes without modular wrap produces wrong distances on transpacific routes. The fix: when |lon2 - lon1| > 180, the shorter path goes the other way around. Distance, bearing, and path-rendering routines all need the wrap.

Worked examples

Empire State Building at 40.7484°N, 73.9857°W:

Signed form (DD):           40.7484, -73.9857
Lettered form (DD):         40.7484°N, 73.9857°W
Signed form (DMS):          +40°44'54.24", -73°59'08.52"
Lettered form (DMS):        40°44'54.24"N, 73°59'08.52"W

All four are the same point. The sign-or-letter choice is per component and per format.

Sydney Opera House at 33.8568°S, 151.2153°E:

Signed form (DD):           -33.8568, 151.2153
Lettered form (DD):         33.8568°S, 151.2153°E
Signed form (DMS):          -33°51'24.5", +151°12'55.1"
Lettered form (DMS):        33°51'24.5"S, 151°12'55.1"E

Note the longitude is positive in both signed and lettered form (E = positive); only the latitude flips sign with the southern hemisphere.

Common misconceptions

“Negative coordinates are unusual or wrong.” They are just the southern and western signs. The southern hemisphere holds roughly 10 % of the world's population but 32 % of its land area including all of Australia, most of South America, southern Africa, and Antarctica. The western hemisphere holds the entire Americas. Half of Earth has at least one negative coordinate component; a quarter has both.

“Hemisphere letters are always required.” Not in signed-number form. The minus sign carries the hemisphere; adding the letter is either redundant or contradictory. Letters are required only when the number is unsigned.

“Negative zero latitude is below the equator.” Mathematically, +0 and −0 are the same point — both are exactly on the equator (or, for longitude, exactly on the prime meridian). IEEE-754 floating-point distinguishes the two as separate bit patterns, but they compare equal under === and represent the identical geographic point. JavaScript display routines may emit -0.000000 for the negative-zero value; defensive parsers and formatters normalise to +0.

“You can't cross the antimeridian.” You can; the longitude sign simply flips. A westbound transpacific flight from Tokyo to Los Angeles crosses the antimeridian and goes from positive- longitude to negative-longitude airspace. The flight path is continuous; only the numerical representation has the discontinuity.

“If a coordinate has no sign or letter, it's in the northern / eastern hemisphere by default.” Some systems assume this; it is a dangerous default. A coordinate without an explicit hemisphere indicator is ambiguous and should be rejected at the parser, not silently assigned to a default hemisphere. The /methodology page documents the default-rejection posture of every Coordinately tool.

“The hemisphere letter is case-sensitive.” In most parsers, the letters are case-insensitive (N and n are equivalent). ISO 6709 examples use uppercase, and uppercase is the near-universal convention in published material; lowercase is acceptable in informal contexts. Mixed-case is unconventional but parseable.

Frequently asked questions

Are positive and negative coordinates the same as hemisphere letters?

Yes — they encode identical information. Positive latitude is north and equivalent to the letter N; negative latitude is south and equivalent to S. Positive longitude is east (E); negative longitude is west (W). The notations are interchangeable: 40.7128, -74.006 is the same point as 40.7128°N, 74.006°W. Software and databases use signed numbers; paper charts, aviation, and marine work usually use hemisphere letters.

Can a coordinate have both a sign and a hemisphere letter?

No — that combination is ambiguous and considered malformed. -40.7128°N has two conflicting hemisphere claims (the minus sign says south; the N says north). Each coordinate component carries exactly one hemisphere indicator: either the sign on the numeric value or the letter suffix, not both. Parsers should reject the dual form.

What is the antimeridian and why does the sign flip there?

The antimeridian is the meridian at ±180° longitude, opposite the prime meridian. It is a single line, but the sign flips across it: 179.9°E (+179.9) and 179.9°W (-179.9) are different locations 0.2° apart, while +180° and −180° are the same line. This is a sign discontinuity, not a coordinate gap. Distance and routing code must handle the wraparound — subtracting longitudes naively across the antimeridian gives the wrong angular distance.

Why is "negative zero" a problem for coordinates?

IEEE-754 floating-point distinguishes +0 and -0. In coordinates, both represent the same point (the equator or the prime meridian), but JavaScript will format -0 with a leading minus, producing a string like "-0.000000". Defensive code normalises -0 to +0 before display. The points are geometrically identical; the negative zero is a representation artefact.

Should I store coordinates with a sign or with a hemisphere letter?

Almost always with a sign. A signed numeric column is queryable, indexable, and supports range scans directly. A hemisphere letter stored alongside an unsigned number requires a JOIN-style fix-up on every query and is more error-prone. Convert to hemisphere letters at the display layer if the consumer expects that format; store as signed decimal degrees in the database.

Sources

  1. ISOISO 6709 — Standard representation of geographic point location · https://www.iso.org/standard/39242.html · Accessed .
  2. NOAA NGSNCAT — Coordinate Conversion and Transformation Tool · https://www.ngs.noaa.gov/NCAT/ · Accessed .
  3. IERSInternational Earth Rotation and Reference Systems Service · https://www.iers.org/IERS/EN/Home/home_node.html · Accessed .
  4. IHOInternational Hydrographic Organization — Standards · https://iho.int/en/standards-and-specifications · Accessed .

Cite this article

APA format:

Steve K. (2026). Positive and Negative Coordinates: Signs and Hemisphere Letters. Coordinately. https://coordinately.org/learn/positive-and-negative-coordinates

BibTeX:

@misc{coordinately_positiveandnegative_2026,
  author = {K., Steve},
  title  = {Positive and Negative Coordinates: Signs and Hemisphere Letters},
  year   = {2026},
  publisher = {Coordinately},
  url    = {https://coordinately.org/learn/positive-and-negative-coordinates},
  note   = {Accessed: 2026-06-05}
}