Even though I have been working with GIS data for over two decades, I still have my moments when I go to assign the X and Y coordinate fields. When adding in data that requires me to designate if the X column is latitude or longitude, I am not ashamed to admit there have been a few times that I have inadvertently assigned it wrong.
As its minimum, all GIS data has to have geographic coordinates. Geographic coordinates are a set of values used to pinpoint any location on Earth’s surface. They are expressed as latitude and longitude values and are stored in two fields.
What are latitude and longitude?
Latitude is the location of how far north or south a point is from the equator. Latitude values range from 0° at the equator to 90° at the poles (90° N for the North Pole and 90° S for the South Pole). Latitude lines are also known as parallels as these lines run east-west around the globe and are equidistant from each other.
Latitude values are either positive or negative or designated as being north or south of the Equator. A positive latitude means the location is in the Northern Hemisphere. If the latitude is negative, it means the location is in the Southern Hemisphere.
Longitude is the location of how far east or west a point is from the Prime Meridian, an arbitrary line that runs from the North Pole to the South Pole and passes through the Prime Meridian ( 0°) located in Greenwich, England to 180° east and west. Lines of longitude called meridians. These lines converge at the poles and are widest at the equator.
As with latitude, longitudes values are either positive or negative or designated as being east or west of the Prime Meridian. A positive longitude has a location that is east of the Prime Meridian. A negative longitude means that the location is west of the Prime Meridian.
How geographic data is stored in GIS
The intersection of a line of latitude and a line of longitude is shown by a set of coordinates and is used to identify a location on Earth. Every geospatial dataset will contain two fields: one for longitude values and one for latitude. As mentioned earlier, these values are frequently designated as X and Y in GIS software programs. The X field stores longitude values and the Y field stories latitude values.
For example, this file of the highest point in each U.S. state has coordinates that are stored in latitude and longitude fields. The longitude values are negative which means that the longitude points are west of the Prime Meridian. The latitude values are positive which means that the latitude points are all north of the Equator.
Many GIS software programs identify coordinates as X and Y values. When loading in a CSV or text file so that the information can be displayed spatially, you often need to manually designated the longitude coordinate field that has the X values and the latitude field that contains the Y values.
Why is it confusing to remember that X is longitude and Y is latitude?
It can be understandable why some people, myself included, seem to have an issue at times with remembering whether X is longitude or latitude and vice versa.
Order of coordinates
The first is simply the order. When we reference coordinates, we always talk about them as lat/long (Y,X) but some GIS software programs like ArcGIS Pro and QGIS consistently note them as X,Y (long/lat). Other programs, like Google Maps, flip the coordinate order so that Y is first and X is second.
Confusion with the Cartesian Coordinate System
Everyone remembers learning about the Cartesian coordinate system in school, where the X-axis represents the horizontal component and the Y-axis the vertical. Since longitude lines run vertically on a globe (from pole to pole), it seems intuitive to associate them with the Y-axis, although they actually correspond to the X-axis in geographic coordinate systems.
How to remember X is longitude and Y is latitude
Here are suggestions about how to remember that X is longitude and Y is latitude.
The obvious first strategy is to simply memorize the fact that X is longitude and Y is latitude. However, if you still find you have a mental block when it comes to remembering which is which, here are some other strategies for remembering.
Sticky note method
Sometimes you just have to put it in writing. If you deal with a lot of data and frequently need a reminder, just put a sticky note off to the side of your screen for easy access. It’s a low-tech solution guaranteed to make sure you always remember that x is longitude and y is latitude.
The other way is to use a memory aid to help you remember that “x=long and y=lat.”
One clever way to remember was suggested by a Reddit user. The user pointed out that “X’ has four end points and “long” has four letters so they go together. Likewise, “Y”has three end points and “lat” has three letters.
Another way is the ladder analogy for recalling latitude versus longitude with a twist, as suggested by another Reddit user. In this analogy latitude is shown as the rungs of the ladder and longitude are the side rails. The added twist is the saying “Y climbs the la[t]
dder and X just runs along.“
By regularly applying one of the memory aids listed above, you can condition your mind to associate X with longitude and Y with latitude.
What is the difference between latitude/longitude and Easting/Northing?
Instead of latitude and longitude, you may see the terms Easting and Northing used. The latitude/longitude is a system is based on a spherical coordinate system. The Earth is approximated as a sphere or an ellipsoid, and coordinates are given in degrees. The Easting/Northing system is based on a Cartesian coordinate system, typically used in specific map projections like the Universal Transverse Mercator (UTM) or the British National Grid. Easting represents the distance (usually in meters or feet) eastward from a defined meridian (north-south line). Northing represents the distance northward from the equator (in the case of UTM) or from a defined baseline (in other grid systems). Y is designated as Northing and X is designated as Easting.
What to do if your GIS data points aren’t where you expect them to be on the map?
This happens to all of us. You designate what you think are the right fields for latitude and longitude. Yes when you zoom to the data points in your GIS software program, they aren’t mapped to region they are supposed to be.
The first thing to do is to switch the fields you designated. Most of the time it’s simply a mismatched latitude and longitude designation (or Northing and Easting designation). You should also check the convention of the country or geospatial data projection system that you are using. For example, Lantmäteriet, the Swedish Mapping, Cadastral and Land Registration Authority, explains that in Sweden and several other countries, data is typically oriented with the x-axis towards the north and the y-axis towards the east. (H/T @LaStranga)
If that doesn’t help, check whether your coordinates are supposed to be positive or negative. For example, if your data points are mapping closer to Indonesia instead of the expected California locations, your longitude values are positive instead of negative.