{"id":1833,"date":"2018-07-02T21:10:54","date_gmt":"2018-07-02T19:10:54","guid":{"rendered":"https:\/\/blogs.fu-berlin.de\/reseda\/?page_id=1833"},"modified":"2019-07-23T13:29:28","modified_gmt":"2019-07-23T11:29:28","slug":"visualize-in-qgis","status":"publish","type":"page","link":"https:\/\/blogs.fu-berlin.de\/reseda\/visualize-in-qgis\/","title":{"rendered":"Visualize in QGIS"},"content":{"rendered":"<p>The prerequisite for this chapter is that you have <a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/usgs-earth-explorer\/\" target=\"_blank\" rel=\"noopener\">downloaded <\/a>and <a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/landsat-8-preprocessing\/\" target=\"_blank\" rel=\"noopener\">preprocessed <\/a>at least one Landsat 8 scene. If you completed the <a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/earthexplorer-exercise\/\" target=\"_blank\" rel=\"noopener\">EarthExplorer exercise <\/a> successfully, you should already own the Landsat 8 Level-2 scene of June 2, 2017 (ID: LC08_L1TP_193023_20170602_20170615_01_T1). You can download <a href=\"https:\/\/box.fu-berlin.de\/s\/ztHcGQtXMKJbcXN\/download?path=%2FLandsat_Data&amp;files=LC081930232017060201T1-SC20180613160412.tif\" target=\"_blank\" rel=\"noopener\">the preprocessed scene here<\/a>. We will use this image to explain the basic visualization tools in QGIS.<\/p>\n<p><a name=\"1\"><\/a><\/p>\n<h1>Import a Dataset<\/h1>\n<p>First of all, open <a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/qgis\/\">QGIS<\/a>.<br \/>\nQGIS is very similar to ArcGIS\/ ArcMap, which you already know from the second semester (GIS course: &#8220;Geographische Informationssysteme&#8221;).<br \/>\nAs with all operations, there are several ways to open a raster dataset here: Either navigate via the main menu to <em>Layer <\/em>&gt; <em>Add Layer<\/em> &gt; <em>Add Raster Layer&#8230;<\/em>, or press the corresponding icon <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1909\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_008.png\" alt=\"\" width=\"24\" height=\"24\" \/> in the toolbar or press the shortcut <strong>Ctrl + Shift + R<\/strong> to open a file explorer window.<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_007.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1910\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_007.png\" alt=\"\" width=\"832\" height=\"385\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_007.png 832w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_007-300x139.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_007-768x355.png 768w\" sizes=\"auto, (max-width: 832px) 85vw, 832px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Location of Add Raster Layer-function in QGIS<\/span><\/div>\n<p>In the file explorer window, navigate to the data folder which holds your L8 data. In the meantime, due to preprocessing, you may already have quite a few files in this folder. Click on a tif-container (extension &#8220;.tif&#8221;) and then on <strong>Open<\/strong>.<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_009.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1911\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_009.png\" alt=\"\" width=\"720\" height=\"451\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_009.png 720w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_009-300x188.png 300w\" sizes=\"auto, (max-width: 720px) 85vw, 720px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Choose a .tif-file for import in the file explorer<\/span><\/div>\n<p>If you have clicked <strong>Open<\/strong>, your data shine in full glory for the first time in QGIS! The file name will automatically appear in the Layers panel and the image data will be visible in the Map View:<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_010.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1913\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_010.png\" alt=\"\" width=\"1360\" height=\"732\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_010.png 1360w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_010-300x161.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_010-768x413.png 768w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_010-1024x551.png 1024w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_010-1200x646.png 1200w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Imported L8 dataset<\/span><\/div>\n<p>Navigate through your data with the mouse buttons and the mouse wheel, or with the navigation tools <img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1912\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_011.png\" alt=\"\" width=\"160\" height=\"36\" \/> in the toolbar.<\/p>\n<p><a name=\"2\"><\/a><\/p>\n<h1>Singleband Visualization<\/h1>\n<p>By default, QGIS maps the first three bands of a given rasterstack to the red, green and blue &#8220;slots&#8221; to create a color image. But we can also look at all the bands in the L8 layer stack individually.<br \/>\nOpen the Layer Properties dialog for the image layer by right-clicking on it in the Layer Panel and selecting Properties option or simply double-click the image layer. Switch to the Style tab and set <strong>Singleband gray<\/strong> in the drop down menu for the <strong>Render type<\/strong> option. You can choose the spectral channel you want to visualize by setting <strong>Gray band<\/strong> directly below. Confirm by clicking OK:<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_012.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1917\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_012.png\" alt=\"\" width=\"791\" height=\"476\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_012.png 791w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_012-300x181.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_012-768x462.png 768w\" sizes=\"auto, (max-width: 791px) 85vw, 791px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Choose Singleband gray for the Render type option and press OK<\/span><\/div>\n<p>Whoops! You will now see a totally gray rectangle which has no use at all. That is because we did not do any contrast stretching yet. We have to tell QGIS to scale the digital numbers to the whole bitspace (16 bit). In a grayscale visualization, this is black, white and all shades of gray in between. So open the Layer Properties dialog again, choose <strong>Stretch to MinMax <\/strong> as the contrast enhancement method. Unfold the <strong>Load min\/max values<\/strong> section directly below. The <strong>Cumulative count cut<\/strong> setting helps to eliminate very low and very high digital numbers, e.g., as a result of clouds. The standard data range is set from 2% to 98% of the DNs and can be adapted manually. Now click on the <strong>Load <\/strong>button and you will notice that values for minimum and maximum values are generated in the fields above:<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_013.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1919\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_013.png\" alt=\"\" width=\"791\" height=\"476\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_013.png 791w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_013-300x181.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_013-768x462.png 768w\" sizes=\"auto, (max-width: 791px) 85vw, 791px\" \/><\/a><\/p>\n<p>Confirm everything by clicking on <strong>Apply <\/strong>or <strong>OK <\/strong>after that. For the following picture we zoomed closer to the West of Berlin and its surrounding countryside:<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_014.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1920\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_014.png\" alt=\"\" width=\"957\" height=\"452\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_014.png 957w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_014-300x142.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_014-768x363.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Landsat 8 band 1, West of Berlin, stretched based on global statistics<\/span><\/div>\n<p>The city looks a bit oversaturated and offers little contrast. So far, we have used the information of the entire scene for contrast stretching. Since possible cloud fields and other edge areas of the scene are included in the calculation of the min\/max values, it is advisable to zoom in on a cloud-free area and recalculate the values based on the currently visible canvas.<br \/>\nSo search for a cloud-free spot in your image, open the Layer Properties again and select <strong>Clip extent to canvas<\/strong> just below the <strong>Load <\/strong>button. Then click the <strong>Load <\/strong>button and <strong>OK<\/strong>:<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_015.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1921\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_015.png\" alt=\"\" width=\"957\" height=\"452\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_015.png 957w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_015-300x142.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_015-768x363.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Landsat 8 band 1, West of Berlin, stretched based on local statistics<\/span><\/div>\n<p>Okay, but now it is time to bring some color into play.<\/p>\n<p><a name=\"3\"><\/a><\/p>\n<h1>Multiband Visualization<\/h1>\n<p>And again, open Layer Properties dialog for the L8 image layer by right-clicking on it in the Layer Panel and selecting Properties option or simply double-click the image layer. Now select <strong>Multiband color<\/strong> as the Render Type and select three spectral bands for the three RGB slots. First let us ave a look at the true color composite, which is band 4,3,2 for the RGB slots. Search for a cloud-free spot in your image, and select the remaining settings as described in the previous section as follows:<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_016.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1924\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_016.png\" alt=\"\" width=\"791\" height=\"561\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_016.png 791w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_016-300x213.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_016-768x545.png 768w\" sizes=\"auto, (max-width: 791px) 85vw, 791px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Layer Properties settings for Multiband coloring<\/span><\/div>\n<p>The resulting image is quite appealing, isn&#8217;t it? Feel free to play around with other band combinations!<\/p>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_017.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1925\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_017.png\" alt=\"\" width=\"957\" height=\"452\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_017.png 957w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_017-300x142.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_017-768x363.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Landsat 8 true color composite (RGB: 4,3,2)<\/span><\/div>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_018.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1927\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_018.png\" alt=\"\" width=\"957\" height=\"452\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_018.png 957w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_018-300x142.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_018-768x363.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Landsat 8 pseudocolor composite (RGB: 5,4,3)<\/span><\/div>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_019.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1928\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_019.png\" alt=\"\" width=\"957\" height=\"452\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_019.png 957w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_019-300x142.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_019-768x363.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Landsat 8 pseudocolor composite (RGB: 6,5,3)<\/span><\/div>\n<p><a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_020.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1929\" src=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_020.png\" alt=\"\" width=\"957\" height=\"452\" srcset=\"https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_020.png 957w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_020-300x142.png 300w, https:\/\/blogs.fu-berlin.de\/reseda\/files\/2018\/07\/vis_020-768x363.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><\/p>\n<div style=\"margin: -30px 0 20px 0;text-align: center\"><span style=\"color: #686868;font-size: small\">Landsat 8 pseudocolor composite (RGB: 5,7,2)<\/span><\/div>\n<p>Look at the forest areas in the southwest of the clipping (Berlin, Grunewald). The trees look so much more differentiated in the NIR and MIR bands &#8211; what an information gain!<\/p>\n<p>&nbsp;<\/p>\n<hr style=\"height: 4px;background-color: #6b9e1f\" \/>\n<div style=\"font-family: 'Noto Sans', sans-serif;line-height: 1.2;text-align: right\"><span style=\"font-size: 12px;color: #bfbfbf\"><strong><em>NEXT<\/em><\/strong><\/span><br \/>\n<a style=\"text-decoration: none\" href=\"https:\/\/blogs.fu-berlin.de\/reseda\/visualize-in-r\/\"><span style=\"font-size: 30px;color: #6b9e1f\"><strong><em>VISUALIZE IN R<\/em><\/strong><\/span><\/a><\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The prerequisite for this chapter is that you have downloaded and preprocessed at least one Landsat 8 scene. If you completed the EarthExplorer exercise successfully, you should already own the Landsat 8 Level-2 scene of June 2, 2017 (ID: LC08_L1TP_193023_20170602_20170615_01_T1). You can download the preprocessed scene here. We will use this image to explain the &hellip; <a href=\"https:\/\/blogs.fu-berlin.de\/reseda\/visualize-in-qgis\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Visualize in QGIS&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3237,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1833","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/pages\/1833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/users\/3237"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/comments?post=1833"}],"version-history":[{"count":23,"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/pages\/1833\/revisions"}],"predecessor-version":[{"id":2948,"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/pages\/1833\/revisions\/2948"}],"wp:attachment":[{"href":"https:\/\/blogs.fu-berlin.de\/reseda\/wp-json\/wp\/v2\/media?parent=1833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}