Swapped coordinates: latitude and longitude in the wrong order

In GeoJSON, every position is written longitude first, then latitude. Files assembled from spreadsheets or GPS exports often reverse the order, which can put a cocoa farm in the Indian Ocean or another country.

Version française

The rule

The EU GeoJSON File Description says a position is an array of numbers with at least two elements, and that the order must be longitude, latitude for coordinates in the EPSG:4326 system. That's the opposite of how most people say coordinates aloud ("5.3° N, 4.0° W") and how many spreadsheets store them (a latitude column, then a longitude column).

What swapped coordinates look like

A plot near Abidjan, Côte d'Ivoire is at about latitude 5.3, longitude -4.0. In GeoJSON that is [-4.0, 5.3]. If it's written [5.3, -4.0], the system reads longitude 5.3 and latitude -4.0: a point in the Atlantic south of Nigeria. Nothing in the file is "wrong" as numbers; it's in the wrong place.

Sometimes the swap is impossible to miss: Ethiopian coffee at latitude around 7 and longitude around 38 becomes latitude 38, which is in the Mediterranean region. Sometimes it's subtle: near the equator and the prime meridian, both orders can land on land. Ghana and Côte d'Ivoire, where many cocoa plots sit at latitudes 5 to 8 and longitudes -8 to 0, are the classic case.

How to check your own file

  1. Open the file on a map (QGIS, geojson.io or any GIS viewer) and look at where the plots are.
  2. Compare with the ProducerCountry property, if present. A plot labelled CI that appears in the sea or in another country is a red flag.
  3. Look at the numbers: a value above 90 or below -90 in the second position can't be a latitude.

How to fix it

If the whole file is swapped, export it again from the source with the columns mapped correctly: longitude to X, latitude to Y. Don't "fix" plots one by one unless you know which ones are wrong, because a file can mix correct and swapped plots when data came from several collectors.

What the Plot File Checker does

The checker uses rough country outlines to decide whether a plot is swapped. It swaps a plot automatically only in clear cases: the latitude is out of range in the given order only; the plot's ProducerCountry (or the country you pick) contains the swapped point but not the original; or, with no country given, the original point falls in no known producing region and the swapped point falls in the file's main producer country. When both orders are plausible, it marks the plot as "possibly swapped" and asks you to choose the country, then fixes it. It also warns about any plot that lies outside its stated ProducerCountry.

Prevent it next season

When you set up a data collection form or spreadsheet template, name the columns longitude and latitude explicitly, not "X/Y" or "coord1/coord2", and test one known plot end to end before the campaign starts.

Related

Sources

Sources opened and checked on October 11, 2026.

Not legal advice. These pages explain the technical file rules published by the EU Information System; they do not guarantee that a file or a due diligence statement will be accepted, and they say nothing about whether a plot is deforestation-free. Check the official documentation, which can change.