Why do Coordinate Systems matter

Coordinates without a CRS are meaningless numbers. So if we consider a CRS or SRS as a tech stack it has been in development for some time; and its starts with :globe_with_meridians:

Size of the world

I’m going to cover Coordinate Systems as thoroughly as possible and this is going to involve some history.

As a species we’ve known the earth is round for quite some time, nearly 2500 years. A philosopher named Eratosthenes successfully measured the globe in 300bc arriving at a global circumference of 40,000 km only 75km shy of the actual number 40,075 km

Early navigation

During the age of discovery navigators started by hugging the coastline. Some of the early pioneers such as Vasco de Gama used this method exclusively to map the coast of Africa and ultimately cross into the Indian Ocean (1497–1499)

These navigators knew the earth was round and had charts depicting latitude and longitude. Using the total circumference we were able to create accurate charts.

  • The problem of determining your latitude was solved using the angle of the sun to determine your position to the equator.  
  • The problem of longitude on the other hand was solved by “dead reckoning”, a good name because it killed a lot of people. This process used an approximation of wind and tidal speeds to determine distance travelled.

As an interesting side note this also led to the foundations being laid to the modern financial system to account for the risk of sea voyages.

Longitudinal awards

In 1714 there was a push from the British government to improve navigation at sea. Ultimately this led to the insight by a watch maker named John Harrison that to master longitudinal navigation we need first to master time. This is why you see reference to Degrees, Minutes, Seconds and their conversion to decimal degrees when dealing with a Geographic Coordinate System. 

One degree is equal to 60 minutes and equal to 3600 seconds:

1° = 60′ = 3600″

One minute is equal to 1/60 degrees:

1′ = (1/60)° = 0.01666667°

One second is equal to 1/3600 degrees:

1″ = (1/3600)° = 2.77778e-4° = 0.000277778°

From this point forwards sea navigation becomes a lot more predictable as you could accurately determine your location.

Geographic Coordinate Systems

The geographical coordinate system we use mostly is an ellipsoid called WGS84. Which has it’s 0° prime meridian longitude in Greenwich London. There was a time where there were many different models being actively used with different 0° locations, notably Paris, New York and Amsterdam. However due to the sheer amount of trade happening in London at the time, the standard moved towards London as the zero location. This standard was once again reinforced with the Glonass and NavStar systems using the WGS84 Coordinate System. (these are the two pioneering GPS systems from the USA and Russia)

EPSG

Above I used the term epsg which is a reference to the licencing authority for coordinate systems. This stands for the European Petroleum Survey Group EPSG who maintain the known and recognised coordinate systems. EPSG just refers to the group who hold the recognised database for the number of the system. Which is why you might occasionally see ESRI referring to themselves as the authority in the EPSG part of a reference system.

The Geoid

The WGS84 system uses an Ellipsoid rather than a Geoid. This is a generalised model of the earth, rather than a model of how the earth actually is. This is an important thing to understand when working with Z elevation values in WGS84 because it’s only a representation of the world, not an actual model.

In reality the earth’s geoid looks a lot more like a deflated football that’s been kicked in India. 

Just to reiterate, we work in WGS84, everything we do uses the Geographic Coordinate System which means by default that we use the Z elevation values based on the Earth Gravitational Model 2008; the current default for WGS84. This is an improvement on the 1996 EGM96, which in turn was an improvement on EGM84. 

To introduce some more complexity the generalized geoid does not fit very well in some countries. Many countries mantin their own ellipsoid/geoids because they fit their country better. Often data needs to be in the country system for government contracts. So if you have a request to change the coordinate system to for example https://epsg.io/2056 that’s probably because the Swiss government mandates it. In some more extreme cases the government both mandates the reference system and the system itself is kept proprietary, such as is the case in Germany.

Projected Coordinate Systems

To continue our story of Cartography a little, one of the revolutions after the Marine Chronometer was the invention of the Mercator Projection in 1569. This allowed sailors to plot a bearing on a map and sail along a single bearing to their destination. Prior to this it was necessary for a ship to constantly recalculate their bearing as they travelled along a great circle.

Here’s how to see the real size of countries

The Mercator projection does not preserve area, but does preserve angle, which is why the northern countries look larger than they are but the roads look like they should.

To get back to theory, converting a circle to a flat surface is an impossible mathematical challenge. That’s why there are so many different flavours of Projected Coordinate systems.

This is essentially the process of taking something spherical and “projecting” it to a flat 2D surface.

While the maths is complicated, it essentially breaks down to the preservation of angle or distance. Different models are better in different areas in the same way that different Geographic systems work better in different areas. I personally think of it more simply as this:

Transformations

One of the reasons for moving from a degree based system to a cartesian space is the ability to perform operations on real numbers. This is a challenge we will need to face when moving from our model space into real Geographical space as the measurement feature will no longer work. Luckily there are API’s for us to call upon from the Luciad team, but it’s still nice to know why we need those api’s rather than just doing the math ourselves. Essentially maths on a circle is hard while maths on a flat surface is, if not simple, certainly easier.

So just to reiterate a geographic system is measured in degrees whilst a Projected System is measured in real numbers.

Vertical Coordinate System

In addition to Geographic and Projected coordinates, knowing your Z value is very important. This has become a lot more important since the advent of affordable drones. You have a choice when recording your Z elevation. You can use the distance relative to the geoid, which is computationally heavier. An ellipsoid, less accurate but simpler or to the take off location

VERTCS[“WGS_1984”,DATUM[“D_WGS_1984”,SPHEROID[“WGS_1984”,6378137.0,298.257223563]],PARAMETER[“Vertical_Shift”,0.0],PARAMETER[“Direction”,1.0],UNIT[“Meter”,1.0]]

You often see errors in photogrammetry projects because the EXIF information on the camera is incorrect.

This leads to the possibility for compound coordinate systems which is putting a vertical, geographic and projected coordinate system details into one WKT.

This is the information necessary to truly understand the details of the projection. 

For further reading checkout I hate coordinates systems blog and remember, degrees for geographic systems, xy for projected systems and when it comes to the Z value, ask relative to what?

P.s this is what the planet looks like really….

WKID & WKT

Another necessary acronym to be aware of is the WKID or Well known ID. This is a reference to the number of the coordinate system. For example I can refer to WGS84 by saying, EPSG:3857. This would in turn lead you to the well known text WKT, which contains the exact details of this code. 

PROJCS[“WGS 84 / Pseudo-Mercator”,

    GEOGCS[“WGS 84”,

        DATUM[“WGS_1984”,

            SPHEROID[“WGS 84”,6378137,298.257223563,

                AUTHORITY[“EPSG”,”7030″]],

            AUTHORITY[“EPSG”,”6326″]],

        PRIMEM[“Greenwich”,0,

            AUTHORITY[“EPSG”,”8901″]],

        UNIT[“degree”,0.0174532925199433,

            AUTHORITY[“EPSG”,”9122″]],

        AUTHORITY[“EPSG”,”4326″]],

    PROJECTION[“Mercator_1SP”],

    PARAMETER[“central_meridian”,0],

    PARAMETER[“scale_factor”,1],

    PARAMETER[“false_easting”,0],

    PARAMETER[“false_northing”,0],

    UNIT[“metre”,1,

        AUTHORITY[“EPSG”,”9001″]],

    AXIS[“X”,EAST],

    AXIS[“Y”,NORTH],

    EXTENSION[“PROJ4″,”+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs”],

    AUTHORITY[“EPSG”,”3857″]]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: