dwcready

How to tell if your latitude and longitude are swapped

Darwin Core · decimalLatitude / decimalLongitude

What you are seeing PRESUMED_SWAPPED_COORDINATE COORDINATE_OUT_OF_RANGE

The short answer

There are two versions of this problem and they are not equally solvable.

The provable one. Latitude is bounded at ±90 and longitude at ±180. If your latitude column holds a value of 120, that is not a latitude, and if the pair becomes legal when exchanged then the swap is arithmetic rather than an opinion. We report that as FS_COORDINATES_PROVABLY_SWAPPED. Most European and North American data trips this immediately, because the longitudes are out of latitude range.

The one that cannot be proved from the file. If both numbers are under 90 — much of Africa, South America and southeast Asia — both readings are legal coordinates and the file contains nothing that distinguishes them. A header cannot settle it, because the header is exactly what is wrong. Here we can offer evidence and not proof: we can say that one reading puts your records where records of that kind exist and the other puts them in open ocean, and report it as suspect rather than as a fact.

The strongest check available is one you already have. If your survey has a site boundary, type it into the optional box on the front page. A declared boundary needs no reference data, cannot go stale, and is accurate to the scale of your site — so a swapped pair stops being a suspicion and becomes arithmetic. It is the one input that turns this from evidence into proof.

A related failure is worth naming because it looks nothing like a swap. A column of whole numbers between 1 and 31 is a day of the month, and if it has been mapped to latitude the resulting points are perfectly plausible — a day paired with a Canadian longitude lands in the Amazon. No map inspection catches that. Only the shape of the values does.

Check the values, not the headers

We confirm every coordinate column from what is in it, and we will tell you when we can prove a swap, when we can only see evidence of one, and when we cannot tell and refused to guess. Add your site boundary and the check gets sharper. Free until 1 September, no account, and your records are discarded after the check — we keep the column mapping, never the rows.

Check the file you have →

Why we can say that

5,064records already published to GBIF
0findings in GBIF's vocabulary
4,268findings from ours
31.7%came back clean

We audited a file GBIF had already accepted and served. Their validator answers will this load; these had loaded. Figures read from ops/data.json, not typed into this page. We do not issue a rating of any kind — every finding names the rule it applied and where that rule comes from.

Related