<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>OCSE &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/tag/ocse/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 13 Mar 2026 20:11:32 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>OCSE &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[You can now buy my South Up, Aotearoa Centred, Equal-Earth Projection Map]]></title>
		<link>https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/</link>
					<comments>https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Fri, 01 Dec 2023 12:34:45 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[ForSale]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[OCSE]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=48533</guid>

					<description><![CDATA[I&#039;m delighted to announce that I&#039;ve actually finished a project!  Over the last few years, I&#039;ve been designing a custom map.  As per the credo of the &#34;Organization of Cartographers for Social Equality&#34;, this map uses the Equal Earth projection to ensure proportional land-mass size, the South is at the up, and - of course - the globe has been rotated to 150°.  I&#039;ve had it printed and I think it …]]></description>
										<content:encoded><![CDATA[<p>I'm delighted to announce that I've actually finished a project!</p>

<p>Over the last few years, <a href="https://shkspr.mobi/blog/tag/ocse/">I've been designing a custom map</a>.  As per the credo of the "Organization of Cartographers for Social Equality", this map uses the Equal Earth projection to ensure proportional land-mass size, the South is at the up, and - of course - the globe has been rotated to 150°.</p>

<p>I've had it printed and I think it looks glorious!</p>

<h2 id="hanging-on-the-wall"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#hanging-on-the-wall">Hanging on the wall</a></h2>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Poster-hung-on-the-wall.jpg" alt="The poster hung on the wall." width="1024" height="768" class="aligncenter size-full wp-image-48722">

<p>You can <a href="https://www.redbubble.com/people/terenceeden/shop">buy these maps from RedBubble</a>.</p>

<h2 id="details"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#details">Details</a></h2>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/12/Map-of-Europe-with-Emoji-flags.jpg" alt="Map of Europe with Emoji flags." width="1024" height="768" class="aligncenter size-full wp-image-48729">

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/12/Map-of-northen-Africa-with-country-labels-in-their-native-script.jpg" alt="Map of northern Africa with country labels in their native script." width="1024" height="768" class="aligncenter size-full wp-image-48727">

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/12/Map-of-southern-Africa-with-emoji-flags.jpg" alt="Map of southern Africa with emoji flags." width="1024" height="768" class="aligncenter size-full wp-image-48726">

<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/12/Map-of-Island-Nations-with-text-labels.jpg" alt="Map of Island Nations with text labels." width="1024" height="768" class="aligncenter size-full wp-image-48728">

<h2 id="buy"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#buy">Buy</a></h2>

<ul>
<li><a href="https://www.redbubble.com/shop/ap/154196690">Buy the Country Name Map</a></li>
<li><a href="https://www.redbubble.com/shop/ap/154196862">Buy the Emoji Flag Map</a></li>
</ul>

<p>This is a <em>large</em> poster - I recommend buying the 120cm by 60cm version. It needs to be that size in order to make the country names legible.  The cost per poster depends on your locale and whatever promotions RedBubble are doing.</p>

<p>These are <em>not</em> limited editions! I will print off as many as people order. Each one comes with a small inscription in the corner saying what the map is, and some other metadata.</p>

<p>As per below, you can <a href="https://github.com/edent/South-Up-Aotearoa-Centred-Equal-Earth-Projection-Map">download the assets</a> in vector or raster format if you'd like to try printing them yourself.</p>

<h2 id="disclaimer"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#disclaimer">Disclaimer</a></h2>

<p>Maps are contentious. Some countries don't recognise other countries. Some borders are disputed. Some people clamour for reunification, some for secession. Some countries have a name given to them by their colonial oppressors. Some have been renamed by mad tyrants. Some countries have multiple names in different languages. Some are still fighting bloody wars in order to be recognised. Flags also suffer from the same problem.</p>

<p>The good news is that this is <strong>not an official map</strong> - my choices have <em>no</em> geopolitical consequences. The even better news is that the code behind the map is open source - so you can redraw it to your heart's content.</p>

<p>I have used the <a href="https://www.naturalearthdata.com/">borders from Natural Earth</a>, the country names from <a href="https://wiki.openstreetmap.org/wiki/Nominatim/Country_Codes">OpenStreetMap</a>, and flags from <a href="https://github.com/twitter/twemoji">Twemoji</a>. If you dislike any of those, please direct your complaints to them.</p>

<h2 id="bugs"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#bugs">Bugs</a></h2>

<p>There are a few of things which have left me slightly dissatisfied.</p>

<p>By convention, most maps use <a href="https://en.wikipedia.org/wiki/Terrain_cartography#Shaded_relief">Shaded Relief with the light coming from North-West</a>. However, because this map is flipped, it cause an optical illusion which make mountains look like ravines and vice-versa. As noted:</p>

<blockquote><p>Viewing images that do not conform to this convention may show a form of convex–concave ambiguity. 
<a href="https://en.wikipedia.org/wiki/Top-left_lighting">Wikipedia page on "Top-Left" lighting</a></p></blockquote>

<p>If you know how to redrawing or recalculate the shade, please let me know.</p>

<p>Secondly, in their default placement, country names and flags overlap. For example:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2023/10/Overlap.jpg" alt="Map of the Caribbean. All the island names overlap." width="902" height="478" class="aligncenter size-full wp-image-48556"></p>

<p>I manually adjusted the placement to keep labels and flags <em>roughly</em> in the right place without overlapping. I think I was accurate, but if you spot any mistakes - or know how to automate this - please let me know.</p>

<p>Non-Contiguous countries aren't handled well. For example, Alaska is unlabelled because it physically separated from the rest of the USA. The same is true of overseas territories like the Canary Islands and French Guiana.</p>

<p>The various seas, oceans, and other bodies of water aren't labelled.</p>

<p>I'm sure you will spot a few other errors. Either leave a comment here or <a href="https://github.com/edent/South-Up-Aotearoa-Centred-Equal-Earth-Projection-Map">raise an issue on GitHub</a>.</p>

<h2 id="how"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#how">How</a></h2>

<p>This was a multi-stage process - mostly involving R.</p>

<h3 id="background"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#background">Background</a></h3>

<p>The background image comes from "<a href="https://equal-earth.com/physical/">Color terrain art without type halos</a>". It's a TIFF which has been rotated and converted to PNG.</p>

<pre><code class="language-_">mogrify -rotate 180 Equal-Earth-Physical-Relief-No-Halos-150E.tif 
convert Equal-Earth-Physical-Relief-No-Halos-150E.tif EE-SU.png
</code></pre>

<h3 id="country-names"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#country-names">Country Names</a></h3>

<p>Natural Earth only provides country names in English ☹ - but it also provides 2 character ISO codes. So I grabbed the country codes and names from <a href="https://wiki.openstreetmap.org/wiki/Nominatim/Country_Codes">OpenStreetMap</a> and merged them into the data set using R.</p>

<h3 id="the-code"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#the-code">The Code</a></h3>

<p>This produces the country borders and names onto an SVG.</p>

<h3 id="manual-placement"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#manual-placement">Manual placement</a></h3>

<p>I used <a href="https://boxy-svg.com/">Boxy</a> to edit the SVG and place all names in roughly the right place.</p>

<h3 id="conversion"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#conversion">Conversion</a></h3>

<p>Inkscape was used to open the resultant SVG at 72dpi. I then used Gimp to autocrop, canvas expanded to 16000x9000, and saved as an <em>uncompressed</em> PNG.</p>

<p>The Emoji wouldn't import to either Gimp or Inkscape. So I viewed the file in Firefox and then printed it to a PDF. That PDF was cropped using <a href="https://www.ctan.org/pkg/pdfcrop">pdfcrop</a> and then imported to Gimp.</p>

<p>Some print shops require CMYK colour spaces - <code>convert Export.png -colorspace cmyk Print-CMYK.tif</code></p>

<h2 id="copyright"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#copyright">Copyright</a></h2>

<p>All of the <a href="https://equal-earth.com">Equal Earth data has this copyright</a>:</p>

<blockquote><p>The Equal Earth Physical Wall Map is in the public domain. You may use the map any way you like, including modifying the content, reproducing it on any type of media, republishing it, and selling it for profit. Consider the map as yours.
By downloading and using this map you agree that the map author (Tom Patterson) is not legally responsible for any errors that the map may contain. You are solely responsible for all problems that may arise from reuse of the map and its redistribution to third parties. Tom Patterson does not endorse the individuals or organizations that may use the map, nor does he endorse their positions on various issues.</p></blockquote>

<p>It builds on Natural Earth, which is <a href="https://github.com/nvkelso/natural-earth-vector/blob/master/LICENSE.md">also public domain</a>.</p>

<p>The Emoji flags are either <a href="https://github.com/twitter/twemoji/blob/gh-pages/LICENSE-GRAPHICS">CC BY</a> or <a href="https://github.com/twitter/twemoji/blob/gh-pages/LICENSE">MIT</a> - depending on whether you think SVGs are images or code.</p>

<p>In a similar spirit, the code that I've used to create my variation of the map, and the resultant output, is also hereby placed in the public domain. You may treat it as <a href="https://creativecommons.org/publicdomain/zero/1.0/deed.en">CC0</a>.</p>

<p xmlns:cc="http://creativecommons.org/ns#" xmlns:dct="http://purl.org/dc/terms/"><a property="dct:title" rel="cc:attributionURL" href="https://shkspr.mobi/blog/">South Up, Aotearoa Centred, Equal Earth Projection Map</a> by <a rel="cc:attributionURL dct:creator" property="cc:attributionName" href="https://edent.tel/">Terence Eden</a> is marked with <a href="http://creativecommons.org/publicdomain/zero/1.0?ref=chooser-v1" target="_blank" rel="license noopener noreferrer" style="display:inline-block;">CC0 1.0 Universal<img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;display:inline;" src="https://mirrors.creativecommons.org/presskit/icons/cc.svg?ref=chooser-v1"><img style="height:22px!important;margin-left:3px;vertical-align:text-bottom;display:inline;" src="https://mirrors.creativecommons.org/presskit/icons/zero.svg?ref=chooser-v1"></a></p>

<h2 id="download"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#download">Download</a></h2>

<p>You can <a href="https://github.com/edent/South-Up-Aotearoa-Centred-Equal-Earth-Projection-Map">download all the code and assets from GitHub</a>.</p>

<h2 id="buy"><a href="https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/#buy">Buy</a></h2>

<ul>
<li><a href="https://www.redbubble.com/shop/ap/154196690">Buy the Country Name Map</a></li>
<li><a href="https://www.redbubble.com/shop/ap/154196862">Buy the Emoji Flag Map</a></li>
</ul>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=48533&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2023/12/you-can-now-buy-my-south-up-aotearoa-centred-equal-earth-projection-map/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Reprojecting Satellite Maps]]></title>
		<link>https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/</link>
					<comments>https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Mon, 02 Aug 2021 11:03:35 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[map]]></category>
		<category><![CDATA[OCSE]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=39737</guid>

					<description><![CDATA[Regular readers know, I&#039;m Creating an &#34;Organization of Cartographers for Social Equality&#34; map. I&#039;ve already had some success using an existing NZ Centric, Equal Earth Map.  And I&#039;ve programmatically created a correctly projected map with R.  But is it possible to do this with Satellite imagery? YES!  Install gdal  For this to work, you&#039;ll need GDAL - the Geospatial Data Abstraction Library.…]]></description>
										<content:encoded><![CDATA[<p>Regular readers know, I'm <a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/">Creating an "Organization of Cartographers for Social Equality" map</a>. I've already had some success using an existing <a href="https://shkspr.mobi/blog/2021/07/south-up-equal-earth-map/">NZ Centric, Equal Earth Map</a>.  And I've programmatically <a href="https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/">created a correctly projected map with R</a>.</p>

<p>But is it possible to do this with Satellite imagery? YES!</p>

<h2 id="install-gdal"><a href="https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/#install-gdal">Install <code>gdal</code></a></h2>

<p>For this to work, you'll need <a href="https://gdal.org/"><code>GDAL</code> - the Geospatial Data Abstraction Library</a>. They're a handy set of tools for getting and manipulating maps.</p>

<h2 id="get-the-data"><a href="https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/#get-the-data">Get the data</a></h2>

<p><a href="https://dataspace.copernicus.eu/explore-data/data-collections/sentinel-data/sentinel-2">Sentinel-2 launched in 2015</a>:</p>

<blockquote><p>The Copernicus Sentinel-2 mission comprises a constellation of two polar-orbiting satellites placed in the same sun-synchronous orbit, phased at 180° to each other. It aims at monitoring variability in land surface condition</p></blockquote>

<p>You can browse the maps on <a href="https://s2maps.eu/"></a><a href="https://s2maps.eu/">https://s2maps.eu/</a> and - best of all - the images are licenced under Creative Commons!</p>

<p>To download the data, run:</p>

<pre><code class="language-bash">gdal_translate -of JPEG -outsize 1600 900 \
   "WMS:https://tiles.maps.eox.at/?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;LAYERS=s2cloudless-2019&amp;SRS=EPSG:4326&amp;BBOX=-180.000000,-90.000000,180.000000,90.000000&amp;FORMAT=image/jpeg&amp;TILESIZE=256&amp;OVERVIEWCOUNT=17&amp;MINRESOLUTION=0.0000053644180298&amp;TILED=true" \
   1600x900.jpeg
</code></pre>

<p>That downloads the map in EPSG:4326 projection, saves a JPG, and an XML file with metadata.</p>

<p>To see which different versions of the data are available, run:</p>

<pre><code class="language-bash">gdalinfo "WMS:https://tiles.maps.eox.at/?SERVICE=WMS&amp;"
</code></pre>

<p>See <a href="https://gis.stackexchange.com/questions/372425/download-sentinel-2-wms-layer-using-gdal/372441">this StackOverflow answer</a> for details.</p>

<h2 id="re-project-the-data"><a href="https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/#re-project-the-data">Re-project the data</a></h2>

<p>OK, we now have the data in WGS84 format. Let's squish it around into a different projection. In this case, <a href="https://proj.org/operations/projections/cea.html">Equal Area Cylindrical (cea)</a>, centred roughtly on New Zealand, and South side up:</p>

<pre><code class="language-bash">gdalwarp -s_srs EPSG:4326 \
 -t_srs "+proj=cea +lon_0=146 +x_0=0 +y_0=0 +lat_ts=45 +ellps=WGS84 +datum=WGS84 +units=m +no_defs +axis=wsu" \
 -r near \
 -of PNG \
 1600x900.jpg out.png
</code></pre>

<h3 id="result"><a href="https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/#result">Result</a></h3>

<p><a href="https://shkspr.mobi/blog/wp-content/uploads/2021/07/map.jpeg"><img src="https://shkspr.mobi/blog/wp-content/uploads/2021/07/map.jpeg" alt="South up satellite photo." width="1642" height="821" class="aligncenter size-full wp-image-39743"></a>
Click to embiggen.</p>

<p>🄯 CC BY-NC-SA "Sentinel-2 cloudless - <a href="https://s2maps.eu">https://s2maps.eu</a> by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2020)"</p>

<h2 id="other-sources"><a href="https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/#other-sources">Other Sources</a></h2>

<p>There are a few other sources you can use.</p>

<p><a href="https://www.naturalearthdata.com/downloads/50m-raster-data/">Natural Earth</a> provides great imagery.
<a href="https://shkspr.mobi/blog/wp-content/uploads/2021/07/Natural-Earth-reprojected.jpeg"><img src="https://shkspr.mobi/blog/wp-content/uploads/2021/07/Natural-Earth-reprojected.jpeg" alt="Colourful map of the world." width="1024" height="648" class="aligncenter size-full wp-image-39744"></a></p>

<p><a href="https://worldview.earthdata.nasa.gov">NASA's World View</a> gives realtime-ish satelite images.
<a href="https://shkspr.mobi/blog/wp-content/uploads/2021/07/NASA-1024.jpeg"><img src="https://shkspr.mobi/blog/wp-content/uploads/2021/07/NASA-1024.jpeg" alt="Satellite view of the earth." width="1024" height="620" class="aligncenter size-full wp-image-39745"></a></p>

<p><a href="https://eos.com/blog/free-satellite-imagery-sources/">More resources on the EOS blog</a>.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=39737&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/08/reprojecting-satellite-maps/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[South Up Equal Earth Projection in R]]></title>
		<link>https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/</link>
					<comments>https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 28 Jul 2021 11:05:29 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[OCSE]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=39667</guid>

					<description><![CDATA[Yup - I&#039;m still banging on about this! This time, in R  Result    The colours are wrong, and the labels need adjustment - but not bad for a few lines of code!  Code  library(tidyverse) library(rnaturalearth) library(rnaturalearthdata) library(sf)  centre &#60;- 160 # NZ mostly centred, prevents Africa and South America wrapping. projection &#60;- &#34;eqearth&#34; # Other good projections are wag1 wag7 eck4…]]></description>
										<content:encoded><![CDATA[<p>Yup - <a href="https://shkspr.mobi/blog/2021/07/south-up-equal-earth-map/">I'm still banging on about this</a>! This time, in R</p>

<h2 id="result"><a href="https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/#result">Result</a></h2>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/07/map-colours-fs8.png" alt="Map of the world, south up, NZ in the centre, with labels and colours." width="1024" height="512" class="aligncenter size-full wp-image-39684">

<p>The colours are wrong, and the labels need adjustment - but not bad for a few lines of code!</p>

<h2 id="code"><a href="https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/#code">Code</a></h2>

<pre><code class="language-R">library(tidyverse)
library(rnaturalearth)
library(rnaturalearthdata)
library(sf)

centre &lt;- 160 # NZ mostly centred, prevents Africa and South America wrapping.
projection &lt;- "eqearth" # Other good projections are wag1 wag7 eck4 eqearth

crs_string &lt;- paste( "+proj=", projection, " +lon_0=", centre, " +axis=wsu", sep="") # WSU puts South up

target_crs &lt;- st_crs(  crs_string  )

worldrn &lt;- ne_countries( scale = "medium", returnclass = "sf" ) %&gt;%
   st_make_valid()

offset &lt;- 180 - centre

#  Recalculate the polygons
polygon &lt;- st_polygon( x = list(rbind(
                                 c(-0.0001 - offset, 90),
                                 c(0 - offset, 90),
                                 c(0 - offset, -90),
                                 c(-0.0001 - offset, -90),
                                 c(-0.0001 - offset, 90)
))) %&gt;%
   st_sfc() %&gt;%
   st_set_crs(4326)


# modify world dataset to remove overlapping portions with world's polygons
world2 &lt;- worldrn %&gt;% st_difference(polygon)

# Transform
world3 &lt;- world2 %&gt;% st_transform(crs = target_crs)
ggplot(data = world3, aes(group = admin)) +
   #geom_sf( fill = "red" ) +
   geom_sf( fill = world3$mapcolor13, lwd = 0 ) + # remove borders
   geom_sf_label( aes( label = name_long ), label.size = 0, fill = NA, size = 1 ) + 
   theme( panel.grid.major = element_line( color = gray(.5), linetype = "dashed", size = 0.5 ), 
      panel.background = element_rect( fill = "#A7C7E7"))

#  Uncomment to save the map
#ggsave("map.png", width = 32, height = 18, units = "cm")
</code></pre>

<h2 id="further-reading"><a href="https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/#further-reading">Further Reading</a></h2>

<ul>
<li><a href="https://gis.stackexchange.com/a/287094/129854"></a><a href="https://gis.stackexchange.com/a/287094/129854">https://gis.stackexchange.com/a/287094/129854</a></li>
<li><a href="https://r-spatial.org/r/2018/10/25/ggplot2-sf.html"></a><a href="https://r-spatial.org/r/2018/10/25/ggplot2-sf.html">https://r-spatial.org/r/2018/10/25/ggplot2-sf.html</a></li>
<li><a href="https://www.jasondavies.com/maps/raster/"></a><a href="https://www.jasondavies.com/maps/raster/">https://www.jasondavies.com/maps/raster/</a></li>
<li><a href="https://stackoverflow.com/questions/68278789/how-to-rotate-world-map-using-mollweide-projection-with-sf-rnaturalearth-ggplot"></a><a href="https://stackoverflow.com/questions/68278789/how-to-rotate-world-map-using-mollweide-projection-with-sf-rnaturalearth-ggplot">https://stackoverflow.com/questions/68278789/how-to-rotate-world-map-using-mollweide-projection-with-sf-rnaturalearth-ggplot</a></li>
</ul>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=39667&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/07/south-up-equal-earth-projection-in-r/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[South Up, NZ Centric, Equal Earth Map]]></title>
		<link>https://shkspr.mobi/blog/2021/07/south-up-equal-earth-map/</link>
					<comments>https://shkspr.mobi/blog/2021/07/south-up-equal-earth-map/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Thu, 01 Jul 2021 11:16:15 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[OCSE]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=39429</guid>

					<description><![CDATA[(Yes, I&#039;m back on my bullshit!)  Regular readers may remember that I&#039;m trying to create an &#34;Organization of Cartographers for Social Equality&#34; map. That is, a map with a Gall-Peters Projection and with South up. Oh, and Aoteroa centred. For reasons.  I&#039;ve got one step closer! I wasn&#039;t able to find and decent Peters projection map tiles, but I did find the next best thing. The &#34;Equal Earth&#34;…]]></description>
										<content:encoded><![CDATA[<p>(Yes, I'm back on my bullshit!)</p>

<p>Regular readers may remember that I'm trying to create <a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/">an "Organization of Cartographers for Social Equality" map</a>. That is, a map with a Gall-Peters Projection and with South up. Oh, and Aoteroa centred. For reasons.</p>

<p>I've got one step closer! I wasn't able to find and decent Peters projection map tiles, but I <em>did</em> find the next best thing. The "Equal Earth" projection.</p>

<p>This is what it normally looks like:</p>

<p><a title="Strebe, CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0>, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Equal_Earth_projection_SW.jpg"><img width="1024" alt="Equal Earth projection SW" src="https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/Equal_Earth_projection_SW.jpg/960px-Equal_Earth_projection_SW.jpg"></a></p>

<p>So, how to flip it and spin it, while maintaining labels and borders?</p>

<p>Thankfully, Tom Patterson at <a href="https://equal-earth.com/index.html">Equal-Earth.com</a> has already done most of the hard work for me.</p>

<p>They already have an 150th meridian East maps designed. Here it is scaled down to 1024px wide:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/06/Equal-Earth-Map-1024.jpg" alt="The whole world, centred on New Zealand." width="1024" height="529" class="aligncenter size-full wp-image-39431"></p>

<p>The full map is 25 MB. Here's a detail from the full size:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/06/Equal-Earth-Map-Detail.jpg" alt="Close up of the UK, major cities are labelled." width="1024" height="576" class="aligncenter size-full wp-image-39430"></p>

<p>It's also available in this gorgeous topographical version:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/06/Equal-Earth-Physical-Map-Raster-topo.jpg" alt="Detial of map centred in China. Mountain ranges and deserts are visible." width="1024" height="576" class="aligncenter size-full wp-image-39432"></p>

<p>That's a decent raster image. Thankfully, they provide a vector version. Although sadly (for me) it is in Adobe's proprietary .ai format. They're a couple of hundred MB and <a href="http://equal-earth.com/physical/">can be downloaded from the site</a>.</p>

<p>I've never used Adobe Illustrator before - but I have access via my uni - so I've probably done this in a very inefficient way. But, <a href="https://twitter.com/MtnMapper/status/1409180816035483651">with a bit of guidance</a> I was able to rotate the map, and then individually rotate all the text labels.</p>

<p>Here's my first attempt:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/06/NZ-SU-small.jpg" alt="Whole Earth south up with labels oriented correctly." width="1024" height="512" class="aligncenter size-full wp-image-39434"></p>

<p>Zooming in on a bit of detail:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2021/06/NZ-SU-detail.jpg" alt="Detail of Australia, south up." width="1024" height="576" class="aligncenter size-full wp-image-39433"></p>

<p>Obviously it isn't quite right yet. Rotating text can shift it quite significantly, and some of the fiddly details need to be corrected. I'll be working on this when time allows - and I hope to sell physical prints soon.</p>

<p>Stay tuned!</p>

<p>I am incredibly grateful to the generosity of Tom Patterson for licencing the map under the following terms:</p>

<blockquote><p>The Equal Earth Physical Map is in the public domain. You may use the map any way you like, including modifying the content, reproducing it on any type of media, and selling it for profit. Consider it as yours.</p></blockquote>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=39429&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2021/07/south-up-equal-earth-map/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
		<item>
		<title><![CDATA[Creating an "Organization of Cartographers for Social Equality" map with OpenStreetMap]]></title>
		<link>https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/</link>
					<comments>https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 20 Nov 2019 07:27:48 +0000</pubDate>
				<category><![CDATA[/etc/]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[NaBloPoMo]]></category>
		<category><![CDATA[OCSE]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<guid isPermaLink="false">https://shkspr.mobi/blog/?p=32724</guid>

					<description><![CDATA[If you&#039;ve seen that episode of The West Wing, you&#039;ll remember this scene:    I&#039;m not a paying member of the OCSE, but I fully support their aims. Because messing around with maps is fun.  So, can I build a web-first maps which is South-up, Pacific-centred, and Peters-projected?  Here&#039;s what I managed to do using OpenLayers - an Open Source web maps library which is pretty hackable.  Get started …]]></description>
										<content:encoded><![CDATA[<p>If you've seen <em>that</em> episode of The West Wing, you'll remember this scene:</p>

<iframe title="Gall--Peters Projection" width="620" height="349" src="https://www.youtube.com/embed/vVX-PrBRtTY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen=""></iframe>

<p>I'm not a paying member of the OCSE, but I fully support their aims. Because messing around with maps is fun.  So, can I build a web-first maps which is South-up, Pacific-centred, and Peters-projected?</p>

<p>Here's what I managed to do using <a href="https://openlayers.org/">OpenLayers</a> - an Open Source web maps library which is pretty hackable.</p>

<h2 id="get-started"><a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/#get-started">Get started</a></h2>

<p>Following <a href="https://openlayers.org/en/latest/doc/quickstart.html">the example documentation</a> gets us a boring North-up map. Booo!</p>

<h2 id="flip-that-reverse-it"><a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/#flip-that-reverse-it">Flip that, reverse it</a></h2>

<p>Rotating a map about 180° is pretty easy:</p>

<pre><code class="language-JavaScript">view: new ol.View({
        maxZoom: 19,
        zoom: 3,
        rotation: Math.PI
})
</code></pre>

<p>The <code>rotation</code> option is is <em>radians</em> - so you'll need to remember your GCSE maths in order to recall that Pi radians = 180°.  There's a small but significant problem.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/09/everything-upside-down-fs8.png" alt="Map of the UK turned upside down." width="321" height="396" class="aligncenter size-full wp-image-32726">
<em>Everything</em> is upside down. Including the text.</p>

<h2 id="vectorman"><a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/#vectorman">Vectorman</a></h2>

<p>That's because the default tiles use <em>raster</em> images. We need <em>vector</em> images.</p>

<pre><code class="language-JavaScript">layers: [
    new ol.layer.VectorTile({
        source: new ol.source.VectorTile({
            format: new ol.format.MVT(),
            url: 'https://basemaps.arcgis.com/arcgis/rest/services/OpenStreetMap_v2/VectorTileServer/tile/{z}/{y}/{x}.pbf'
        }),
    })
],
</code></pre>

<p><img src="https://shkspr.mobi/blog/wp-content/uploads/2019/11/blankmap.png" alt="" width="501" height="311" class="aligncenter size-full wp-image-32888">
That looks a bit dull, so lets add some proper styles to it:</p>

<pre><code class="language-html">&lt;script src="https://cdn.jsdelivr.net/npm/ol-mapbox-style@4.3.1/dist/olms.js"&gt;&lt;/script&gt;
</code></pre>

<p>and</p>

<pre><code class="language-js">var layer = map.getLayers().getArray()[0];
var url = 'https://www.arcgis.com/sharing/rest/content/items/3e1a00aeae81496587988075fe529f71/resources/styles/root.json'
fetch(url).then(function(response) {
    response.json().then(function(glStyle) {
        olms.applyBackground(map, glStyle);
        olms.applyStyle(layer, glStyle, 'esri');
    });
});
</code></pre>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/09/Screenshot_2019-09-25-OCSE1-fs8.png" alt="Map of Europe upside down - with the labels the right way up." width="318" height="210" class="aligncenter size-full wp-image-32727">

<p>This uses the <a href="https://www.arcgis.com/home/item.html?id=3e1a00aeae81496587988075fe529f71">OpenStreetMap vectors from Arcgis</a> - but it can be changed to <a href="https://www.arcgis.com/home/search.html?t=content&amp;q=tags%3A%22vector%22">any other style</a> you like.</p>

<h2 id="location-location-location"><a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/#location-location-location">Location, Location, Location</a></h2>

<p>At the moment, the centre of the map is at 0° - with the UK in the centre. That's no good! We want <em>Aotearoa</em> - the land of the long white cloud, and ancestral home of my wife - to be in prime position.</p>

<pre><code class="language-JavaScript">view: new ol.View({
    center: ol.proj.fromLonLat([180, 0]),
    zoom: 3,
    rotation: Math.PI
})
</code></pre>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/09/Screenshot_2019-09-25-OCSE-fs8.png" alt="Map of the world, south up, Pacific centred." width="1020" height="598" class="aligncenter size-full wp-image-32728">

<p>Success!</p>

<h2 id="projecting"><a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/#projecting">Projecting</a></h2>

<p>Here's comes the tricky bit.  At the moment, we are still using the Mercator Projection which distorts the size of some countries. I'm not going to get into <a href="https://xkcd.com/977/">an argument about which projection is best</a> - but I want to show how to re-project an existing map.</p>

<p>With a raster map - where the tiles are bitmaps, not vectors - <a href="https://gist.github.com/NickFitz/58829a65dab12a5c9be7ae40087ada9c">it's pretty easy</a>.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/09/Screenshot_2019-09-27-Gall-Peters-projection-with-OpenStreetMap-tiles-and-OpenLayers-5-fs8.png" alt="Map of the world, south up, stretched." width="723" height="454" class="aligncenter size-full wp-image-32729"></p>

<p>But when zoomed in, this gives us the worst of both worlds:
<img src="https://shkspr.mobi/blog/wp-content/uploads/2019/09/Screenshot_2019-09-27-Gall-Peters-projection-with-OpenStreetMap-tiles-and-OpenLayers-51-fs8.png" alt="Distorted map of the UK." width="433" height="422" class="aligncenter size-full wp-image-32730">
The place-names are upside-down and are distorted.</p>

<h2 id="reprojecting-vectors"><a href="https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/#reprojecting-vectors">Reprojecting Vectors</a></h2>

<p>I naïvely thought this would be easy. Manipulating vectors doesn't sound so hard, does it? But I just can't find any way to do it in OpenLayers.  It doesn't work in any web mapping library I've found. And there are no Peters-projection raster tiles either.</p>

<p>I suspect the answer is that I would have to create my own tileset - which is beyond my capabilities.</p>

<p>So, if you know of a way to get a weird projection out of web maps - please let me know in the comments box.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=32724&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2019/11/creating-an-organization-of-cartographers-for-social-equality-map-with-openstreetmap/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
