November 2022

Notes From PostGIS Day 2022

Thanks to the excessive length of this year’s PostGIS-Day schedule, I could catch a couple of hours on Friday morning. Here’s a quick summary of some of the talks I saw.

Ryan Lambert of Rust Proof Labs took a deep dive into some fantastic PostGIS wizardry for routing outside of roads, such as waterways, indoors or on access-restricted private roads. A considerable part of the solution to these complex problems comes down to deep knowledge of PostGIS’ functionality but doing basic things like understanding your data, cleaning data, understanding and documenting edge cases and making decisions on the problems you don’t want to solve. Ryan also recently published a book on PostGIS and OpenStreetMap.


Brian Timoney showed how to create goal-scoring heat maps for NHL games, inspired shot-efficiency maps Kirk Goldberry did for the NBA. He used the public NHL API as the data source data, downloaded data using pgsql-http, and created the visualisation all in PostGIS. Also, what a refreshing way to present; I had a great laugh watching Brian.


Martin Davis talked us through some new features introduced in PostGIS 3.3), such as

Martin also gave a sneak peek to features landing in future versions of PostGIS, such as validating polygon coverage, simplify boundaries on coverage polygons, and simplifying inner boundaries while keeping outer boundaries unchanged.


Brendan Farrell presented db2vector, which creates bespoke vector-tile APIs from data in PostGIS. Db2vector allows you to specify a specific SQL query for each API endpoint, so you can quickly create different web maps from a single data source with great flexibility. (Unfortunately, I couldn’t find any page to link to detailed information about the service.)


And finally, Paul Ramsey talked about Moving Objects, a proof of concept he has built to demonstrate how updates to records in a Postgres database can be propagated in near real-time to clients. It uses a mix of triggers, Postgres notifications, and pg_eventserv to push notifications to web clients via WebSockets.

Terra Draw, a Cross-Library Drawing API

James Milner released an alpha version of Terra Draw, a JavaScript library that implements adapters centralising drawing functions across different map libraries. Instead of building functionality to draw rectangles, lines, or points for each mapping API, you can now learn Terra Draw and be done with it.

Leaflet, MapboxGL and Google Maps are supported; of the major contemporary libraries, only OpenLayers and MapLibre are currently missing. Terra Draw supports creating and editing points, lines, polygons, and circles and even includes a freehand tool.

Most products are set on one mapping library, and Terra Draw will be less valuable. But there are a couple of scenarios where Terra Draw is useful. Terra Draw could be an option if you’re building a new product and haven’t decided (or don’t want to commit) to one mapping library or base map provider. It allows you to focus on the problem, not the technology. In consulting, when different projects often require a different provider, Terra Draw allows transferring solutions across various projects, potentially freeing up time to work on other things. And TerraDraw enables you to adhere to engineering best practices: The drawing implementation is abstracted away so you can switch libraries later; for example, when a vendor decides to change to a more restrictive proprietary license.

NACIS has published the sixth edition of the Atlas of Design, a hand-picked collection of 32 maps highlighting the importance of design in cartography.

You can preview some of the maps included in the edition, and they look gorgeous.

Iván Sánchez Ortega introduces Gleo, a WebGL mapping library he’s been working on for a couple of months now:

What’s Gleo? In a nutshell, it’s a Javascript, WebGL-first, web mapping display library. It’s kinda reinventing the wheel of Leaflet/Openlayers/MapLibre, if such reinvention involved a lot of OOP architectural thinking.

Why you ask, if we already have OpenLayers and MapLibre doing pretty much the same thing:

The point is being able to understand the architecture of a WebGL map library. Because, as I said several times during the conference [FOSS4G], I still don’t understand what a “bucket” is in Maplibre parlance.

Building something for the sake of understanding the fundamentals of some technology is a perfectly fine reason to reinvent the wheel.

You can view the code on GitLab or follow Iván on Mastodon or Twitter, where he posts regular updates about his work on Gleo.

Related to yesterday’s post: Lat × Long reader DoudouOSM pointed to an interview with OpenStreetMap founder Steve Coast on the Minds Behind Maps podcast. Steve talks about the future of maps anticipating they will disappear from our apps into the background and that we will interact with geographic information much less.

The whole interview is worth watching but beware, it’s three hours long! The relevant bits here start about 20 minutes in.

James Killick, over at Map Happenings, contemplates whether we’re witnessing the end of consumer maps:

It’s all part of a trend, a downward trend in my opinion, that will result demise of consumer maps. Contrary to Beck’s approach to distill reality into its essential essence we’re moving in the opposite direction.

We are instead on a path to the dreaded metaverse, a virtual world where we should all be thankful and glad to wander around as legless avatars with the aspirational goal of reaching social media nirvana. I don’t know about you, but, ugh.

Sure, Zuck wants us all to stay home and spend all our money inside his multi-player game instead of going on holidays and exploring places.

But no matter what, we’ll continue to go places, and navigating unfamiliar territory will always involve maps. These maps will look different from what we’re using today. More real-time information will be involved, more data capturing sentiments and our phone cameras will play a vital role.

Is it really that bad if future maps don’t resemble those made by Harry Beck or the Ordnance Survey in the olden days? I don’t think so; it’s called progress. I remember arriving in London almost ten years ago. Citymapper was a godsend. Even though you rarely ever looked at a map, it made this humongous city approachable to a boy from a small-ish town in East Germany.

Whether future solutions can be called maps as defined by the National Geographic Society doesn’t matter. Whether we old people like the look of digital way-finding tools doesn’t matter either. What matters is that they make cities easier to explore and navigate for the majority of people.

Lat × Long on Mapstodon

Because it seems like Twitter is on the cusp of extinction, I’ve set up a Mastodon account over at Mapstodon—like everyone else. I will primarily cross-post the same updates on Twitter and Mastodon. Follow along for the ride at @latlong@mapstodon.space.

The Map is a short documentary about a revolutionary redesign of New York City’s iconic subway map. Filmmaker Gary Hustwit documents the process as digital agency Work & Co works with the MTA to create a new “live map” — one that updates in real-time — to help New Yorkers and tourists better plan their journeys. The film examines the evolution of wayfinding and user interfaces, and shows how good design and the latest digital technology can simplify one of the world’s most complex transit systems.

TomTom announced a new map platform:

To create a standard base map that anyone can contribute to and benefit from, the TomTom Maps Platform is bringing together a pool of map content from map users around the world. The resulting geolocation database – the largest available today – feeds continuous improvements back to the map, helping it keep up with reality.

The pool is filled with an array of sources, including OpenStreetMap, sensor-derived observations (SDO) from millions of vehicles, probe data and shared points of interest (POI). It’s a dizzying amount of data that we quickly make sense of, validate and act on.

There’s a marketing page and a video featuring dramatic music and Steve Coast saying very little: “Maps are used way more than people think but it’s invisible to us. As things get quicker, we have to change the way we think about maps.”

Is this new product primarily OpenStreetMap data and some additional data sprinkled on top? Does it have an API? Map tiles? An SDK? It’s hard to tell as the material was written by marketing people for people in suits.

We will have to wait for further announcements to understand what TomTom’s new map platform can do.

There’s some real momentum right now surrounding MapLibre. AWS started sponsoring the project in August; there’s talk about joining the MapLibre and Maputnik communities, and now Stamen is getting involved to work on MapLibre’s native SDK. 

Stephanie May, Damon Burgett, Stamen:

We are happy to share that we have begun work on improving MapLibre Native with technical leadership by Wet Dog Weather and funding from AWS.

The announcement from the MapLibre organisation provides further detail:

A design proposal for the modularization of the map rendering architecture can be found at #547. This modularization will allow new rendering architectures to be implemented quickly and more easily, and we anticipate that the modularization will give us a concrete framework to better interrogate various migration strategies.

I love this approach, gathering feedback from the community before starting the work to make actual changes to the code and architecture.

The program from this year’s Pacific Geospatial Conference in Fiji has been released. The focus of the 2022 editing is less on technology but on applications to problems specific to the Pacific region. For a pleasant change, the list of presenters doesn’t include the usual suspects from the industry.