{"id":430,"date":"2020-08-06T14:45:31","date_gmt":"2020-08-06T22:45:31","guid":{"rendered":"http:\/\/blog.geofictician.net\/?p=430"},"modified":"2020-08-06T14:45:31","modified_gmt":"2020-08-06T22:45:31","slug":"round-and-round","status":"publish","type":"post","link":"https:\/\/blog.geofictician.net\/index.php\/2020\/08\/06\/round-and-round\/","title":{"rendered":"Round and round"},"content":{"rendered":"\n<p><em>I&#8217;m sorry I neglected this blog for the last two months. It wasn&#8217;t because I stopped geofiction activities &#8211; I just kind of forgot to update anything here. In fact, I&#8217;ve been staying busy with various geofiction projects.<\/em><\/p>\n\n\n\n<p>I ran across a small, free website that someone made that transforms a flat map of an imaginary planet into a globe that you can rotate with the mouse or that can be used to generate a &#8220;spinning world&#8221; gif.  It&#8217;s called <a href=\"https:\/\/www.maptoglobe.com\/\">maptoglobe.com<\/a>.<\/p>\n\n\n\n<p>I decided I wanted to make one for my planet, Arhet &#8211; just out of curiosity. This did have a few minor technical challenges. First, I had to &#8220;knit&#8221; together the tile images for Arhet. I found a nice utility that does this, an application called tile-stitch by Eric Fischer. <a href=\"https:\/\/github.com\/ericfischer\/tile-stitch\">It can be found on github<\/a>. Except for one small problem, I just followed the documentation provided on the github README. That one problem: to get it to work in my machine, I needed to modify the code in the <code>stitch.c<\/code> file to include the full path to the geotiff utilities. So&#8230;<\/p>\n\n\n\n<p><span style=\"font-size: inherit;\">Original code:<\/span><code>...<\/code><\/p>\n\n\n\n<p><code> #include &lt;geotiffio.h&gt;<br> #include &lt;xtiffio.h&gt;<br> ...<\/code><\/p>\n\n\n\n<p><span style=\"font-size: inherit;\">My version:<\/span><code>...<\/code><\/p>\n\n\n\n<p><code> #include &lt;\/usr\/include\/geotiff\/geotiffio.h&gt;<br> #include &lt;\/usr\/include\/geotiff\/xtiffio.h&gt;<br> ...<\/code><\/p>\n\n\n\n<p>Once that was set up, I simply extracted the tiles at zoom level 5 from the Arhet2-carto render using the tile-stitch utility, with this command<code><br>.\/stitch -o arhet5.png -- -85.05 -179.99 85.05 179.99 5 https:\/\/tiles01.rent-a-planet.com\/arhet2-carto\/{z}\/{x}\/{y}.png<\/code><\/p>\n\n\n\n<p><span style=\"font-size: inherit;\">That got the whole planet into a square .png file, which I called <\/span><code>arhet5.png.<\/code><\/p>\n\n\n\n<p>The next problem is that the maptoglobe website requires the map image to be in a equirectangular projection. But the tiles for Arhet are in the modified mercator projection used by almost all online &#8220;slippy maps,&#8221; classified as EPSG:3857.<\/p>\n\n\n\n<p>So the <code>arhet5.png<\/code> file was in the wrong projection. I found out I could use another utility that I already had, the gdal library, to do this job. I ran the following commands.<code><br>\/usr\/bin\/gdal_translate -of Gtiff -co \"tfw=yes\" -a_ullr -20037508.3427892 20036051.9193368 20037508.3427892 -20036051.9193368 -a_srs \"EPSG:3857\" \"arhet5.png\" \"arhet5_tfw.tiff\"<br><br>\/usr\/bin\/gdalwarp -s_srs EPSG:3857 -t_srs EPSG:4326 -ts 6400 3200 \"arhet5_tfw.tiff\" \"arhet5.tif\"<\/code><\/p>\n\n\n\n<p>These produced a .tif file in the right projection, 6400 x 3200 pixels. I then opened this file and resaved as .png again (because this is a more compact format that is therefore uploadable to maptoglobe.com &#8211; which has a maximum file size limit).<\/p>\n\n\n\n<p>I then uploaded that .png file to the maptoglobe site, and it allowed me to save the resulting &#8220;globe&#8221; &#8211; it&#8217;s accessible <a href=\"https:\/\/www.maptoglobe.com\/H1nuvhFWD\">here<\/a>.  Further, I was able to make this nice little spinning planet gif:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/rent-a-planet.com\/globeGif.gif\" alt=\"\"\/><\/figure>\n\n\n\n<p>That&#8217;s the planet Arhet, as it currently stands &#8211; note that most of the mapping there is not my own, but the work of the various other Arhet members who have joined me in my experiment.<\/p>\n\n\n\n<p>That worked out so well that I did the same thing for my own private planet, Rahet (note that the names <em>Arhet<\/em> and <em>Rahet<\/em> are obviously related; <em>Rahet<\/em> came first, and when I decided to change the project and invite other participants, I renamed the old  <em>Rahet<\/em> as <em>Arhet<\/em>, and then resurrected the old <em>Rahet<\/em> later and as a separate project again). <\/p>\n\n\n\n<p><a href=\"https:\/\/www.maptoglobe.com\/ByItFaKZw\">Here<\/a> is a the link for Rahet on the maptoglobe site, and here is the spinning planet gif:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/rent-a-planet.com\/rahetGif.gif\" alt=\"\"\/><\/figure>\n\n\n\n<p>So those are pretty cool. Remember that the original &#8220;slippy maps&#8221; (HRATEs) of these two projects are on the map portion of this website, <a href=\"https:\/\/test.geofictician.net\/#map=3\/4.65\/-17.58&amp;layers=W\">here<\/a> and <a href=\"https:\/\/test.geofictician.net\/#map=3\/4.65\/-17.58&amp;layers=R\">here<\/a>.<\/p>\n\n\n\n<p>Music to make HRATEs to: <a href=\"https:\/\/www.youtube.com\/watch?v=YuS-xoCpzGs\">\ud558\uc120\ud638 (Sandy), &#8220;Love Me More&#8221;<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m sorry I neglected this blog for the last two months. It wasn&#8217;t because I stopped geofiction activities &#8211; I just kind of forgot to update anything here. In fact, I&#8217;ve been staying busy with various geofiction projects. I ran across a small, free website that someone made that transforms a flat map of an &hellip; <a href=\"https:\/\/blog.geofictician.net\/index.php\/2020\/08\/06\/round-and-round\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Round and round<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-430","post","type-post","status-publish","format-standard","hentry","category-hrate"],"_links":{"self":[{"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/posts\/430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/comments?post=430"}],"version-history":[{"count":0,"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/posts\/430\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/media?parent=430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/categories?post=430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.geofictician.net\/index.php\/wp-json\/wp\/v2\/tags?post=430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}