{"id":1144,"date":"2015-08-13T01:29:56","date_gmt":"2015-08-13T01:29:56","guid":{"rendered":"http:\/\/blogs.lincoln.ac.nz\/gis\/?p=1144"},"modified":"2023-05-07T04:08:07","modified_gmt":"2023-05-07T04:08:07","slug":"getting-consistent-symbology-with-layer-files","status":"publish","type":"post","link":"https:\/\/blogs.lincoln.ac.nz\/gis\/getting-consistent-symbology-with-layer-files\/","title":{"rendered":"Getting Consistent Symbology with Layer Files"},"content":{"rendered":"<p><em>This post covers how you can get consistent symbology across several layers using layer files.<\/em><\/p>\n<p>So the good people in ERST310\/607 have been doing some fun analysis lately (though they may disagree), getting some high-resolution elevation models from LiDAR data (more to follow on that topic). &nbsp;Using three separate datasets, they&#8217;re creating DEMs for three different points in time and using them to look at topographic changes as a result of the earthquakes. &nbsp;In the image below, you can see the DEM (2 m resolution) from September 2010, just after the first major earthquake on the Greendale Fault.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/FirstDEM1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1146\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/FirstDEM1.jpg\" alt=\"FirstDEM\" width=\"1034\" height=\"697\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/FirstDEM1.jpg 1034w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/FirstDEM1-300x202.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/FirstDEM1-1024x690.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/FirstDEM1-768x518.jpg 768w\" sizes=\"auto, (max-width: 1034px) 100vw, 1034px\" \/><\/a><\/p>\n<p>In the Table of Contents you can see the legend for the other two from February and December. &nbsp;Notice the differences in the maximum and minimum values. &nbsp;By default, ArcMap has shown the DEM as a &#8220;stretched&#8221; greyscale image, so even though there&#8217;s not much variation between the rasters, the highs of September will be shown as the same colour as the highs of December, even though the actual values are quite different.<\/p>\n<p>Is there a way to symbolise each to a consistent scale? &nbsp;Yes, by using Layer files. &nbsp;These are nothing more than files that save the symbology in a reusable way. &nbsp;We can often end up putting lots of time into symbolising data to get an effective map and layer files provide us with a way to save those settings and reuse them.<\/p>\n<p>So first I&#8217;m going to judiciously choose a layer to symbolise , one that has maximum and minimum values that are the greatest and least, respectively so that the full range of values is covered. &nbsp;That would be September (it&#8217;s got the highest maximum value and the lowest minimum value of the three). &nbsp;I&#8217;ll &nbsp;first open up the Symbology tab for that layer:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1148\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1.jpg\" alt=\"Symbology1\" width=\"665\" height=\"506\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1.jpg 665w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1-300x228.jpg 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/a><\/p>\n<p>Change the &#8220;Show:&#8221; selection from Stretched to Classified:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1A.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1150\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1A.jpg\" alt=\"Symbology1A\" width=\"669\" height=\"506\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1A.jpg 669w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology1A-300x227.jpg 300w\" sizes=\"auto, (max-width: 669px) 100vw, 669px\" \/><\/a><\/p>\n<p>I&#8217;ll set up some custom ranges for the classes by clicking the Classify button &#8211; here I can set the number of classes I want to show and manually set my class ranges (among other techniques):<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Classify.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1147\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Classify.jpg\" alt=\"Classify\" width=\"639\" height=\"492\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Classify.jpg 639w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Classify-300x231.jpg 300w\" sizes=\"auto, (max-width: 639px) 100vw, 639px\" \/><\/a><\/p>\n<p>The location of each break can be dragged left or right with a left-click and hold. &nbsp;With an &#8220;OK&#8221; I&#8217;m back to the Symbology tab and can select a new colour ramp to emphasise the differences:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1149\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology2.jpg\" alt=\"Symbology2\" width=\"670\" height=\"506\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology2.jpg 670w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Symbology2-300x227.jpg 300w\" sizes=\"auto, (max-width: 670px) 100vw, 670px\" \/><\/a><\/p>\n<p>Here&#8217;s the result upon clicking &#8220;OK&#8221;:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewRamp.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1151\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewRamp.jpg\" alt=\"NewRamp\" width=\"1033\" height=\"699\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewRamp.jpg 1033w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewRamp-300x203.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewRamp-1024x693.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewRamp-768x520.jpg 768w\" sizes=\"auto, (max-width: 1033px) 100vw, 1033px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Wow! &nbsp;That jumps out at you a bit but is a bit of an improvement over a greyscale colour ramp. &nbsp;If I&#8217;m happy with that effect, my next step is to save the symbology into a Layer file. &nbsp;Right-click on the layer name and go to &#8220;Save as a Layer file&#8221;:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/SaveAsLayer.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1152\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/SaveAsLayer.jpg\" alt=\"SaveAsLayer\" width=\"370\" height=\"535\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/SaveAsLayer.jpg 370w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/SaveAsLayer-207x300.jpg 207w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/><\/a><\/p>\n<p>The new file will have a &#8220;.lyr&#8221; extension. &nbsp;Save it somewhere safe. &nbsp;Now we&#8217;ll open up the Symbology tab&nbsp;for one of my other grids, February, switch it to a Classified render and import the layer file.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Import1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1154\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Import1.jpg\" alt=\"Import\" width=\"668\" height=\"504\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Import1.jpg 668w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/Import1-300x226.jpg 300w\" sizes=\"auto, (max-width: 668px) 100vw, 668px\" \/><\/a><\/p>\n<p>From the Import button you can then point the raster to the layer file and the symbology from September gets applied to February:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewFebruary.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1155\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewFebruary.jpg\" alt=\"NewFebruary\" width=\"1036\" height=\"699\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewFebruary.jpg 1036w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewFebruary-300x202.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewFebruary-1024x691.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2015\/08\/NewFebruary-768x518.jpg 768w\" sizes=\"auto, (max-width: 1036px) 100vw, 1036px\" \/><\/a><\/p>\n<p>Yes, it pretty much looks the same, and, well, that&#8217;s the point! &nbsp;The extent of the February grid is different because the extent of the original LiDAR data was different. &nbsp;But with consistent symbology, we can now compare the two <span style=\"text-decoration: underline\"><em>visually<\/em> <\/span>to detect any changes. &nbsp;The layer file retains the information on the class ranges so I don&#8217;t need to fuss with redoing my classes for each grid.<\/p>\n<p>One really important thing to recognise here is that all we&#8217;ve done is change the way the data <strong><em>look<\/em><\/strong> rather than the data themselves. &nbsp;The underlying data have not changed. &nbsp;If we want to go a step further and carry out some analysis, we might need to reclassify the rasters or run some raster calculations.<\/p>\n<p>In this case, layer files have given us a way to keep our symbology consistent across several layers. &nbsp;Layer files work with vector layers as well, so keep them in mind when next you want some consistent symbology across several layers.<\/p>\n<p>C<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post covers how you can get consistent symbology across several layers using layer files. So the good people in ERST310\/607 have been doing some fun analysis lately (though they may disagree), getting some high-resolution elevation models from LiDAR data (more to follow on that topic). &nbsp;Using three separate datasets, they&#8217;re creating DEMs for three [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1144","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/1144","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/comments?post=1144"}],"version-history":[{"count":1,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/1144\/revisions"}],"predecessor-version":[{"id":4022,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/1144\/revisions\/4022"}],"wp:attachment":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/media?parent=1144"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/categories?post=1144"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/tags?post=1144"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}