PyCon UK 2023

Geodesy for Pythonistas (or How I Learned to Stop Worrying and Love Coordinate Reference Systems)
09-23, 11:00–12:30 (Europe/London), Room D

The surface of the Earth is curved, so all flat maps of it contain distortions. Specific types of distortions can be eliminated, but other distortions remain. What are these mathematical tradeoffs and how are they made? And more importantly, how can we as Pythonistas make use of this cartographic wizardry?


Modern webmaps and GPS technologies allow representations of the Earth’s surface to a precision and accuracy beyond the dreams of the cartographers of old. But whether in a browser window or on sheets of parchment, a completely accurate representation of the curved surface of the Earth on a flat surface is fundamentally impossible. Certain narrowly defined kinds of accuracy, or accuracy in a particular small area are possible, but every map represents trade-offs and compromises.

In this lecture I will explain what coordinate reference systems are and how they work. I will describe the various classes of map projection and walk through a number of specific example coordinate reference systems, including the ones everyone working in GIS needs to know, as well as a few more esoteric examples and the kinds of scenarios where you might need to use them. And finally I will discuss how to convert between coordinate reference systems and the potential pitfalls to keep in mind when working with multiple coordinate systems.

Do you want to take your geospatial python skills beyond simply using the GoogleMaps API? Do you have clients in government or civil engineering that insist on the use of locally specialised datums or coordinate systems in their maps and databases? Have you ever wondered why Google Maps uses Mercator projection – haven’t they seen all those blog posts and YouTube videos about how misleading it is? Or are you just generally interested in maps?

If you answered yes to any of the above questions, this lecture is for you. I’ll be discussing mathematical concepts, but no equations - just Python code that implements them.

Content/Trigger Warning: Flat-Earthers may find this lecture confronting

A review of practice run-through of this lecture from a real geodesist:

"AMAZING and suberb presentation!! You are a wizard! I spent three years going to geodesy and cartography lectures and I'd like to know WHERE you were then Paul?! This was the BEST 'lecture' I have seen on this topic and a wonderful summary/introduction of this fascinating subject. So spot on (IMHO) and very cleverly delivered."


Is your proposal suitable for beginners? – yes

Paul majored in Physics at university and has been working as a software engineer since the mid 90s. For the last 7 years has been working on the Open Data Cube (ODC) – an open source Python library for managing and processing large archives of Earth-observation satellite imagery. He currently works for Geoscience Australia (the custodian of Australia’s EO archive) and is a member of the ODC Steering Council. In his spare time, he brews beer in his home brewery and writes and records his epic science-fiction rock-opera in his home studio.