Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Null Archipelago — Null Islands for All Coordinate Reference Systems

Posted by smathermather on September 10, 2014

@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 Responses to “Null Archipelago — Null Islands for All Coordinate Reference Systems”

  1. […] But earlier this year, some geonerds such as @mizmay, @schuyler that there is no one Null Island, but one Null Island per datum / coordinate system (depending on who you ask). And @smathermather had the spare time to find out how the “Null Archipielago” looks like: […]

  2. […] we can try some alternatives. Smathermather had a great post about mapping Null Island/Archipelago, so we can re-use some code. To map our […]

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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: