Null Archipelago — Null Islands for All Coordinate Reference Systems

@mizmay Someone suggested & @schuyler tweeted (who? please remind me!) a few weeks ago that each coordinate reference system (CRS) has it’s own Null Island, and therefore there must be a Null Archipelago. This got me thinking — what does that look like?

Enter PostGIS. We’ll create a function, that given an EPSG code will return the 0,0 location for that reference system in the real world. It turns out, this is quite easy.

CREATE OR REPLACE FUNCTION where_in_the_null (crs integer) RETURNS
geometry AS $$

WITH null_island AS (
	SELECT ST_MakePoint(0,0) AS geom
null_island_crs AS (
	SELECT ST_SetSRID(geom, crs) AS geom FROM null_island
SELECT ST_Transform(geom, 4326) FROM null_island_crs

So, now we need some EPSG codes. To that end, we have one in any PostGIS database.

CREATE TABLE null_archipelago AS
SELECT srid, where_in_the_null(auth_srid) FROM spatial_ref_sys
	WHERE auth_srid > 2000 AND auth_srid < 4904;

Map showing the null archipelago overlayed on the Stamen Watercolor Map

Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA.

2 thoughts on “Null Archipelago — Null Islands for All Coordinate Reference Systems

Leave a Reply

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

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

Twitter picture

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

Facebook photo

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

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.