Edinburgh is West of Bristol and in line with Madrid.

Finding which cities share the same Latitude & Longitude

Using QGIS Geometry Generators

Simon Wrigley
4 min readOct 15, 2024

--

It’s always interesting to see which places around the world line up, sharing the same Latitude and Longitude. After seeing a web-app somone had created on LinkedIn, it inspired me to test some functionality in QGIS that I had not explored before: Geometry Generators. These let you style a layer by creating new geometries on-the-fly based on custom expressions.

To replicate the functionality of the web app, when a user clicks on the map, we want to draw a line of latitude and a line of longitude across the whole map so you can see which cities line up. We can achieve this in QGIS through the use of the Geometry Generator styling option. The basic workflow is as follows:

  • The user clicks to add a point on the map
  • A point marker is created
  • The latitude and longitude of that point are then automatically projected as a line across the entire map

Step 1: Add a new temporary scratch layer

Go to Layer > Create Layer > New Temporary Scratch Layer… and give the new layer a name. Choose geometry type = points and the CRS as EPSG:4326 WGS 84. Press OK to add the layer:

--

--

Simon Wrigley
Simon Wrigley

Written by Simon Wrigley

Geospatial Development, GIS & Cartography

No responses yet