{"id":1093,"date":"2018-11-11T21:14:31","date_gmt":"2018-11-11T20:14:31","guid":{"rendered":"https:\/\/hannes.enjoys.it\/blog\/?p=1093"},"modified":"2018-11-12T22:14:22","modified_gmt":"2018-11-12T21:14:22","slug":"making-a-star-wars-hologram-in-qgis","status":"publish","type":"post","link":"https:\/\/hannes.enjoys.it\/blog\/2018\/11\/making-a-star-wars-hologram-in-qgis\/","title":{"rendered":"Making a Star Wars hologram in QGIS"},"content":{"rendered":"<p>I like doing silly things in QGIS.<\/p>\n<p>So I wanted to make a Star Wars hologram (you know, that &#8220;You&#8217;re my only hope&#8221; Leia one) showing real geodata. What better excuse for abusing QGIS&#8217; Inverted Polygons and Raster Fills. So, here is what I did:<\/p>\n<ol>\n<li>Find some <a href=\"https:\/\/www.google.com\/search?tbm=isch&amp;q=star+wars+hologram+leia\">star wars hologram leia<\/a> image.<br \/>\n<a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"394\" class=\"aligncenter size-large wp-image-1094\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-1-700x394.jpg\" alt=\"\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-1-700x394.jpg 700w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-1-250x141.jpg 250w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-1-768x432.jpg 768w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-1-120x68.jpg 120w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-1.jpg 1280w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>Crudly remove the princess (GIMP&#8217;s Clone and Healing tools work nicely for this).<br \/>\n<a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"394\" class=\"aligncenter size-large wp-image-1095\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-700x394.jpg\" alt=\"\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-700x394.jpg 700w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-250x141.jpg 250w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-768x432.jpg 768w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background-120x68.jpg 120w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-background.jpg 1280w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>In QGIS create an empty Polygon-geometry Scratchpad layer and set the renderer to Inverted Polygons to fill the whole canvas.<br \/>\n<a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-inverted.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"423\" class=\"aligncenter size-large wp-image-1097\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-inverted-700x423.jpg\" alt=\"\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-inverted-700x423.jpg 700w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-inverted-250x151.jpg 250w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-inverted-768x464.jpg 768w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-inverted-120x73.jpg 120w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-inverted.jpg 1680w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>Set the Fill to a Raster image Fill and load your image.<br \/>\n<a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-raster-fill.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"423\" class=\"aligncenter size-large wp-image-1096\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-raster-fill-700x423.jpg\" alt=\"\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-raster-fill-700x423.jpg 700w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-raster-fill-250x151.jpg 250w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-raster-fill-768x464.jpg 768w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-raster-fill-120x73.jpg 120w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-raster-fill.jpg 1680w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>Load some geodata, <a href=\"https:\/\/i.imgur.com\/nCec3EU.jpg\">style it accordingly<\/a> and rejoice.\n<ol>\n<li>Get some geodata. I used Natural Earth&#8217;s countries, populated places and tiny countries (to have some stuff in the oceans), all in 110m.<\/li>\n<li>Select a nice projection, I used &#8220;+proj=ortho +lat_0=39 +lon_0=139 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs&#8221;.<\/li>\n<li>I used a three layer style for the countries:\n<ul>\n<li>A Simple Line outline with color #4490f3, stroke width 0.3mm and the Dash Dot Line stroke style.<\/li>\n<li>A Line Pattern Fill with a spacing of 0.8mm, color #46a8f3 and a stroke width of 0.4mm.<\/li>\n<li>And on top of those, for some noisiness a black Line Pattern Fill rotated 45\u00b0 with a spacing of 1mm and stroke width 0.1mm.<\/li>\n<li>Then the Feature Blending Mode Dodge to the Layer Rendering and <a href=\"https:\/\/www.youtube.com\/watch?v=GakUmFcI3H8\">aha!<\/a><\/li>\n<li>More special effects come from Draw Effects, I disabled Source and instead used a Blur (Gaussian, strength 2) to lose the crispness and also an Outer Glow (color #5da6ff, spread 3mm, blur radius 3) to, well, make it glow.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/1-countries-outline-simple-line.png\" alt=\"\" class=\"alignleft size-full wp-image-1106\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/1-countries-outline-simple-line.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/1-countries-outline-simple-line-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/1-countries-outline-simple-line-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/2-countries-simple-line-1.png\" alt=\"\" class=\"alignleft size-large wp-image-1107\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/2-countries-simple-line-1.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/2-countries-simple-line-1-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/2-countries-simple-line-1-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/3-countries-simple-line-rotated.png\" alt=\"\" class=\"alignleft size-large wp-image-1108\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/3-countries-simple-line-rotated.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/3-countries-simple-line-rotated-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/3-countries-simple-line-rotated-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4-countries-dodge.png\" alt=\"\" class=\"alignleft size-large wp-image-1110\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4-countries-dodge.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4-countries-dodge-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4-countries-dodge-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4.2-countries-draw-effects.png\" alt=\"\" class=\"alignleft size-large wp-image-1109\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4.2-countries-draw-effects.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4.2-countries-draw-effects-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/4.2-countries-draw-effects-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/p>\n<div style=\"clear:both\"><\/div>\n<\/li>\n<li>I used a three layer style for the populated places:\n<ul>\n<li>I used a Simple Marker using the &#8220;cross&#8221; symbol and a size of 1.8mm. The Dash Line stroke style gives a nice depth effect when in Draw Effects the Source is replaced with a Drop Shadow (1 Pixel, Blur radius 2, color #d6daff).<\/li>\n<li>A Blending Mode of Addition for the layer itself makes it blend nicely into the globe.<\/li>\n<\/ul>\n<\/li>\n<li>I used a three layer style for the tiny countries:\n<ul>\n<li>I used a white Simple Marker with a size of 1.2mm and a stroke color #79c7ff, stroke width 0.4mm.<\/li>\n<li>Feature Blending Mode Lighten makes sure that touching symbols blob nicely into each other.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/5-popplaces-single.png\" alt=\"\" class=\"alignleft size-full wp-image-1111\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/5-popplaces-single.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/5-popplaces-single-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/5-popplaces-single-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/6-popplaces-globe-addition.png\" alt=\"\" class=\"alignleft size-large wp-image-1112\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/6-popplaces-globe-addition.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/6-popplaces-globe-addition-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/6-popplaces-globe-addition-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/7-tiny-countries.png\" alt=\"\" class=\"alignleft size-large wp-image-1113\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/7-tiny-countries.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/7-tiny-countries-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/7-tiny-countries-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"180\" height=\"180\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/8-full-globe.png\" alt=\"\" class=\"alignleft size-large wp-image-1114\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/8-full-globe.png 180w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/8-full-globe-150x150.png 150w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/8-full-globe-120x120.png 120w\" sizes=\"auto, (max-width: 180px) 100vw, 180px\" \/><\/p>\n<div style=\"clear:both\"><\/div>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-done.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"423\" class=\"aligncenter size-large wp-image-1099\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-done-700x423.jpg\" alt=\"\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-done-700x423.jpg 700w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-done-250x151.jpg 250w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-done-768x464.jpg 768w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-done-120x73.jpg 120w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/qgis-done.jpg 1680w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>You can now export the image at your screen resolution (I guess) using Project -&gt; Import\/Export or just make a screenshot.<br \/>\n<a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"627\" height=\"400\" class=\"aligncenter size-full wp-image-1100\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-2.png\" alt=\"\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-2.png 627w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-2-250x159.png 250w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-2-120x77.png 120w\" sizes=\"auto, (max-width: 627px) 100vw, 627px\" \/><\/a><a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars.png\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"298\" class=\"aligncenter size-large wp-image-1101\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-700x298.png\" alt=\"\" srcset=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-700x298.png 700w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-250x106.png 250w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-768x327.png 768w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars-120x51.png 120w, https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/star-wars.png 799w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/li>\n<li>Or add some more magic with random offsets and stroke widths in combination with refreshing the layers automatically at different intervals:<br \/>\n<center><div style=\"width: 625px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-1093-1\" width=\"625\" height=\"455\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/x11grab.mp4?_=1\" \/><a href=\"https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/x11grab.mp4\">https:\/\/hannes.enjoys.it\/blog\/wp-content\/uploads\/x11grab.mp4<\/a><\/video><\/div><\/center><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>I like doing silly things in QGIS. So I wanted to make a Star Wars hologram (you know, that &#8220;You&#8217;re my only hope&#8221; Leia one) showing real geodata. What better excuse for abusing QGIS&#8217; Inverted Polygons and Raster Fills. So, here is what I did: Find some star wars hologram leia image. Crudly remove the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,3,31],"tags":[],"class_list":["post-1093","post","type-post","status-publish","format-standard","hentry","category-gis","category-guide","category-qgis"],"_links":{"self":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/comments?post=1093"}],"version-history":[{"count":6,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1093\/revisions"}],"predecessor-version":[{"id":1116,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/posts\/1093\/revisions\/1116"}],"wp:attachment":[{"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/media?parent=1093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/categories?post=1093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hannes.enjoys.it\/blog\/wp-json\/wp\/v2\/tags?post=1093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}