{"id":2143,"date":"2026-09-07T13:23:23","date_gmt":"2026-09-07T13:23:23","guid":{"rendered":"https:\/\/commons.mtholyoke.edu\/emarcano\/?page_id=2143"},"modified":"2026-09-17T12:16:49","modified_gmt":"2026-09-17T12:16:49","slug":"ex1-rasters","status":"publish","type":"page","link":"https:\/\/commons.mtholyoke.edu\/emarcano\/mhcgis\/geog323\/ex1-rasters\/","title":{"rendered":"Exercise 1 &#8211; Raster analysis"},"content":{"rendered":"\n<h2 id=\"top\" class=\"wp-block-heading\"><strong>Exercise 1 \u2013 Introduction to raster analysis<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Contents<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"#part1\">Part 1: Interpolation &amp; raster operations<\/a><\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Objective:&nbsp; <\/strong>Perform interpolation to create a digital elevation map (DEM), neighborhood operations to calculate of slope\/aspect, and reclassification of rasters to locate the best place for a solar farm.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong><a href=\"#part2\">Part 2: Zonal Operations<\/a><\/strong>\n<ul class=\"wp-block-list\">\n<li><strong>Objective: <\/strong>Perform zonal statistics.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide\" \/>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/commons.mtholyoke.edu\/emarcano\/geog323\">Return to Geog 323 page<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide\" \/>\n\n\n\n<h2 id=\"part1\" class=\"wp-block-heading\">Part 1: Interpolation &amp; raster operations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In this part we want to find the best place for a solar farm.&nbsp; The selected site must be on a relatively <strong>flat area (slope 0-5 degrees of inclination)<\/strong> and where it gets the <strong>most solar radiation<\/strong> during the day (a <strong>south facing area<\/strong>).&nbsp; In addition, it must be a single parcel larger than 60 acres.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We will use interpolation methods to create a DEM and perform some neighborhood operations and reclassification to choose our area for the solar farm.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Data:<\/strong> You don\u2019t have direct access to a Digital Elevation Model (DEM) of your area of interest (AOI) but a good friend has provided you with an outline of the area, <em>AOI <\/em>(North of South Hadley) and a regular sampling of points with their elevation values (<em>Elevation_Points<\/em>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, we need to create a DEM from the point data through a process called Interpolation.&nbsp;<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Interpolation predicts values for cells in a raster from a limited number of sample data points. It can be used to predict unknown values for any geographic point data, such as elevation, rainfall, chemical concentrations, and noise levels. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211; <em><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/spatial-analyst\/understanding-interpolation-analysis.htm\" target=\"_blank\" rel=\"noreferrer noopener\">ArcGIS Help<\/a><\/em><\/p>\n<\/blockquote>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/interpolation.png\"><img loading=\"lazy\" decoding=\"async\" width=\"463\" height=\"238\" src=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/interpolation.png\" alt=\"interpolation\" class=\"wp-image-640\" style=\"width:351px;height:auto\" srcset=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/interpolation.png 463w, https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/interpolation-300x154.png 300w\" sizes=\"auto, (max-width: 463px) 100vw, 463px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">We\u2019ll use two methods of interpolation and compare the results. The first one is called I<strong>nverse Distance Weighted or IDW:<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">This method assumes that the variable being mapped decreases in influence with distance from its sampled location. E.g., when interpolating a surface of consumer purchasing power for a retail site analysis, the purchasing power of a more distant location will have less influence because people are more likely to shop closer to home <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211; <em><a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/spatial-analyst\/how-idw-works.htm\" target=\"_blank\" rel=\"noreferrer noopener\">ArcGIS Help<\/a><\/em><\/p>\n<\/blockquote>\n\n\n\n<h3 id=\"task0\" class=\"wp-block-heading task0\">Task 0 \u2013 Preliminary &#8211; Data source &amp; activating Spatial Analyst extension<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The dataset for this exercise is in the N: drive  (N:\\Geog323\\ex1) <strong>copy <\/strong>the whole ex1 folder to your personal working folder (X:\\username) and work in there.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><a href=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/raster-calculator-error.png\"><img loading=\"lazy\" decoding=\"async\" width=\"267\" height=\"98\" src=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/raster-calculator-error.png\" alt=\"raster calculator error\" class=\"wp-image-644\" style=\"width:200px;height:auto\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">After copying the data, you need to verify that ArcGIS Pro has the right permissions. It needs an extension called Spatial Analyst to work with raster.&nbsp; We have the extension installed but before using it we need to activate it.&nbsp; If it\u2019s not activated, you\u2019ll get an error message when using some raster tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After launching ArcGIS Pro, before creating a map or opening an existing map, click <strong>Settings<\/strong>, on the left, then <strong>Licensing<\/strong> \u2026&nbsp; OR if you already loaded a map go to the Project tab (first tab on the left) Licensing. In the box &#8220;ArcGIS PRO extensions&#8221; verify that Spatial Analyst is licensed, If YES, you&#8217;re OK, keep working. If NOT, click the button &#8220;Configure your licensing options&#8221; below and check the checkbox next to Spatial Analyst.&nbsp; Click OK and continue working. You shouldn&#8217;t need to do this anymore, but, in case you see that error, you now know what to do.<\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background wp-block-paragraph\"><strong>NOTE: <\/strong>Spatial Analyst is a very old software that ESRI hasn&#8217;t updated in a long time so it cannot work with blank spaces in the paths (folder names) or file names. Use &#8220;_&#8221; underscores if necessary. E.g. &#8220;<em>X:\\user\\My folder\\my data<\/em>&#8221; will not work, use instead &#8220;<em>X:\\user\\My_folder\\my_data<\/em>&#8220;<\/p>\n\n\n\n<h3 id=\"task1a\" class=\"wp-block-heading\">Task 1A \u2013 Creating DEM using IDW<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Create a new map project in a new working folder containing the required dataset.<\/li>\n\n\n\n<li class=\"has-accent-color has-text-color has-link-color wp-elements-1\">Add the vector file <em>Elevation_Points<\/em> located in<em>Terrain.gdb<\/em> to your map and open the attribute table; notice the column containing elevation data in meters.<\/li>\n\n\n\n<li>In the Analysis tab click the red Tools icon and in the Geoprocessing pane on the right, click on Toolboxes on top, then go to <strong>Spatial Analyst Tools &gt; Interpolation &gt; IDW<\/strong><\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Enter <em>Elevation_Points<\/em> as input<\/li>\n\n\n\n<li>Z value (this is the elevation value to be used in the DEM) should be set to the elevation field<\/li>\n\n\n\n<li>Output cell size enter 30 (meters, don\u2019t enter the units; units depend on the map units, meters; you should have, before doing this, verify the map units. In this case it\u2019s meters and it\u2019s inherited by the coordinate system of the point data. Please verify this!)<\/li>\n\n\n\n<li>Output raster, save it as <em>DEM_AOI_IDW <\/em>(no empty spaces in the name)<\/li>\n\n\n\n<li>Leave Search radius as \u201cVariable\u201d (read the corresponding help to understand what this means)<\/li>\n\n\n\n<li>No barrier polyline, in this case the DEM will be created all the way to the edge of the extent of the data.<\/li>\n\n\n\n<li>Click Run.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Study the resulting raster.&nbsp; Verify its properties and make sure the cell size is 30 (R-click on the theme &gt; Properties &gt;Source &gt; Raster Information)<\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 1. How many columns does this DEM have? <\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The raster will show in the map window with about nine discrete classes.&nbsp; Please note the color changes and the values in the legend carefully and study the terrain.&nbsp; Can you see which areas are lower in elevation? Where are the higher elevations?<\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 2.&nbsp; In general, in what direction is the elevation going up?<\/em><br><em>From North to South &#8211; South to North &#8211; East to West &#8211; West to East <\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 id=\"task1b\" class=\"wp-block-heading\">Task 1B\u2013 Creating DEM using Spline<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">The Spline tool uses an interpolation method that estimates values using a mathematical function that minimizes overall surface curvature, resulting in a smooth surface that passes exactly through the input points.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&#8211; <a href=\"https:\/\/doc.esri.com\/en\/arcgis-pro\/latest\/tool-reference\/spatial-analyst\/how-spline-works.html\" target=\"_blank\" rel=\"noopener\">ArcGIS Pro Help<\/a><\/p>\n<\/blockquote>\n\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li>Repeat the procedure to create a DEM but this time use the Spline method. Select the input, X value field, output (<em>DEM_AOI_SPLINE<\/em>), output cell size (30), and use the default values for the rest (check the help on these parameters to understand what they do).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Compare both DEMs. Verify that both DEMs have the same number of rows &amp; columns and cell size.<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#7bdcb5\"><em>Question 3. How many rows does this, spline, DEM have? ____<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Make a note of the lowest and highest elevation values displayed in the content pane for both DEMs (even better, check Min\/Max in Properties\\Source\\Statistics) and open the attribute table of <em>Elevation_Points<\/em>. Sort the Elevation_meters column and copy the lowest and highest elevation (consider only 2 decimal places).<\/p>\n\n\n\n<p class=\"has-background wp-block-paragraph\" style=\"background-color:#7bdcb5\"><em>Question 4 \u2013 Which of the two interpolation methods is an exact interpolation method (i.e. it has the same min\/max values as the original data)?<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Two points you have to understand:<\/p>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Why is one interpolating method exact and the other not?<\/li>\n\n\n\n<li>Can you open the attribute tables of the DEMs to check for min\/max values? Why? or why not?<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">There are other methods of interpolation and different procedures to help you select which one is best. Please check your readings to learn about those.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>For the rest of the exercise will be using the IDW interpolation.<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 id=\"task2\" class=\"wp-block-heading\">Task 2 \u2013 Calculating Slope and Aspect<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now we need to calculate the <strong>Slope<\/strong>.&nbsp; This is the inclination of the terrain, or rate of change in elevation by change in distance.&nbsp; You can express it as a percent change or in degrees of the angle \u03b8 (see figure).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/slope.png\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"154\" src=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/slope.png\" alt=\"slopes calculation\" class=\"wp-image-641\" style=\"width:642px;height:auto\" srcset=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/slope.png 620w, https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/slope-300x75.png 300w\" sizes=\"auto, (max-width: 620px) 100vw, 620px\" \/><\/a><\/figure>\n<\/div>\n\n\n<ul class=\"wp-block-list\">\n<li>% Slope = (a\/b) x 100&nbsp;&nbsp; where \u201ca\u201d is the change in elevation (Rise) and \u201cb\u201d is the change in distance (Run)<\/li>\n\n\n\n<li>Slope in degrees = Arctan (a\/b) (Arctan is the inverse tangent function of the ratio a\/b; remember that a\/b is Tan \u03b8)<\/li>\n\n\n\n<li>Notice that a 100% slope is a 45-degree angle, larger angle will give you a slope &gt; 100%<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Knowing the elevation of each cell and their size, the software can easily calculate the slope at each pixel in either percent or degrees. In addition to elevation, we need to know the size of each pixel. In this case, each pixel measures 30 m x 30 m, but the software knows that and it will calculate the slope correctly if we tell it correctly what to do. The software will calculate all the slopes around each cell and outputs the steepest slope for the cell. We\u2019ll use slope in degrees.<\/p>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Go to the Analysis tab click on the red Tools icon and in the Geoprocessing pane click on Toolboxes on top then go to <strong>Spatial Analyst Tools &gt; Surface &gt; Slope<\/strong><\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Enter <em>DEM_AOI_IDW <\/em>as input<\/li>\n\n\n\n<li>Enter <em>Slope_degrees<\/em> as output<\/li>\n\n\n\n<li>Output measurements as DEGREE<\/li>\n\n\n\n<li>Leave Z factor at 1 (the vertical, height, values are in meter, same as the XY coordinates) and Run.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Study the result. You should get values between almost flat (0 degrees) to around 17 degrees.&nbsp; If the software is showing you values up to ~90 degrees, go to the symbology pane of the layer and choose a Classify symbology with Natural Break 5 classes.&nbsp; The legend should now show you the minimum and maximum values.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"wp-block-paragraph\">Now we need to find the areas that are facing the sun.&nbsp; In the northern hemisphere, the sun is always on the southern side of the sky above us (remember that the sun shines perpendicular in tropical regions).&nbsp; We need to find areas where the slopes are facing south.&nbsp; This is the <strong>Aspect<\/strong> of the slope.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"121\" height=\"104\" src=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2025\/02\/aspect.gif\" alt=\"aspects\" class=\"wp-image-639\" style=\"width:131px;height:auto\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Using a compass as a guide, and knowing that a circle has 360 degrees around, we assume that north is 0\u00ba, east is 90\u00ba, south is 180\u00ba, and west is 270\u00ba (see figure).<\/p>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li>Go to the Analysis tab click on the red Tools icon and in the Geoprocessing pane click on Toolboxes on top then go to <strong>Spatial Analyst Tools &gt; Surface &gt; Aspect<\/strong><\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>For input use the <em>DEM_AOI_IDW <\/em>(<strong>NOT the slope raster<\/strong>)<\/li>\n\n\n\n<li>Save the output as <em>Aspect_AOI<\/em><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Again, study the results: it should be very colorful. Notice the legend and copy the range of angles shown for South __________(xxx.x\u00ba -xxx.x\u00ba) (copy these values). All aspects between those values are facing south are good for our solar panels.&nbsp;&nbsp; These directions should be represented light blue in the content pane (CP), similar to the graph above.&nbsp; Look at the map and try to see which areas have these colors. Compare it with the original DEM.&nbsp;Can you see the south facing areas in the DEM?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Notice also that there is a class for \u201cflat\u201d areas with a value of -1. Flat areas have no slope orientation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h3 id=\"task2\" class=\"wp-block-heading\">Task 3 \u2013 Reclassification and overlay<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now we need to put those two themes (slope &amp; aspect) together.&nbsp; However, even though they both have units of degrees, they represent different things.&nbsp; One represents degrees of inclination in the vertical direction; the other represents degrees of orientation from the north (in the horizontal direction).&nbsp; We are going to separate the \u201cGood\u201d areas, just as we did with vectors in Exercise 6 land suitability.&nbsp; This is called <strong>Standardization<\/strong>, <em>i.e<\/em>. taking layers that represent different things and making them compatible. We do this, &nbsp;in raster analysis, with a function called <strong>Reclassification<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Reclassification assigns new numbers to our raster cells according to our criteria.&nbsp; In the case of the slope we are going to reclassify all the values with a slope of 0-5\u00ba&nbsp;(<em>i.e. <\/em>flat<em>) <\/em>to have a value of \u201c1\u201d, all the other values will have a value of \u201c0\u201d.&nbsp; For the aspect, we\u2019re going to assign a value of \u201c1\u201d to our south facing slopes, and \u201c0\u201d to the rest.<\/p>\n\n\n\n<ol start=\"7\" class=\"wp-block-list\">\n<li>Go to the Geoprocessing pane (Analysis tab Tools), click on Toolboxes on top, then go to <strong>Spatial Analyst Tools &gt; Reclass &gt; Reclassify<\/strong><\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Input: <em>Slope_degrees<\/em> (<strong>NOTE: use the SLOPE raster!)<\/strong><\/li>\n\n\n\n<li>Reclass field: Value<\/li>\n\n\n\n<li>In the Reclassification table, make sure the first <strong>Start<\/strong> value shows the first class from the lowest value (0.008145, or just \u201c0\u201d) in the Start column<\/li>\n\n\n\n<li>Enter a value of 5 in the End column of the first line, leave the New Value for this first class as 1<\/li>\n\n\n\n<li>For the second class, enter 5 for start and 99 for End, <strong>change New value to \u201c0\u201d<\/strong>&nbsp;(Any number higher than 17.32 will be good for the End field, 99 or 9999 is a \u201csafe\u201d easy number)<\/li>\n\n\n\n<li>Leave NoData as it is<\/li>\n\n\n\n<li>Left-click on the \u201cextra\u201d lines and press the delete key in the keyboard to remove them. Make sure there are only 3 rows: 0-5, 5-99, and NoData (or click the Classify button and fix the table there)<\/li>\n\n\n\n<li>Output raster <em>Good_slopes<\/em> and click Run.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">You should get a binary (0\/1) map.&nbsp; It\u2019s important that you get a raster with <strong>only 0 and 1 value <\/strong>(this is called a Binary or Boolean raster).&nbsp; If you got values 1 and 2, you didn\u2019t assign the classes correctly, do it again.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Study the output; everything with a value of 1 is Good (relatively flat).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Since this is a raster with integer values, it does contain an attribute table, open it and check its content.<\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background wp-block-paragraph\"><strong>Hint: <\/strong><em>Good_slopes <\/em>should have 29971 pixels with value of 1.<\/p>\n\n\n\n<ol start=\"8\" class=\"wp-block-list\">\n<li>Now reclass the <em>Aspect<\/em> raster.<\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Input: <em>Aspect_AOI <\/em><strong>(NOT DEM)<\/strong><\/li>\n\n\n\n<li>Reclass field: Value<\/li>\n\n\n\n<li>In the Reclassification table enter, in the first row, a value -1 to to the lowest value for south aspect, <strong>change the New Value for this first class to 0<\/strong><\/li>\n\n\n\n<li>For the second class, lowest value to highest value of south aspect, change the<strong> New value <\/strong>to<strong> \u201c1<\/strong>\u201d<\/li>\n\n\n\n<li>For the third class, highest value south aspect to 360, change the<strong> New value <\/strong>to<strong> 0<\/strong>.&nbsp;<\/li>\n\n\n\n<li>Leave the NoData as it is and delete the extra rows. You should end up with 4 rows<\/li>\n\n\n\n<li>Output raster <em>Good_aspects.<\/em> Click Run.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Again, you should get a binary (0\/1) map, if not, do it again.&nbsp; <\/p>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background wp-block-paragraph\"><strong>Hint: <\/strong><em>Good_aspects<\/em> should have 5130 pixels with value of 1.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"wp-block-paragraph\">With vector layers, we would now do an intersection to find the sites where the two good conditions coincide.&nbsp; In raster we use a trick from basic math:&nbsp; all numbers multiplied by 0 become 0.&nbsp; So, we\u2019ll just multiply our binary (0\/1) maps and only in the places where cells with value 1 overlay another cell with value 1, there will be a 1 as a result.&nbsp; See the table below.&nbsp; That is why it was important to have only 0\u2019s and 1\u2019s in our \u201cGood\u201d maps.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><em>Good_Slopes<\/em><\/th><th><\/th><th><em>Good_aspects<\/em><\/th><th><\/th><th><em>Good_areas<\/em><\/th><\/tr><\/thead><tbody><tr><td>0<\/td><td>x<\/td><td>0<\/td><td>=<\/td><td>0<\/td><\/tr><tr><td>0<\/td><td>x<\/td><td>1<\/td><td>=<\/td><td>0<\/td><\/tr><tr><td>1<\/td><td>x<\/td><td>0<\/td><td>=<\/td><td>0<\/td><\/tr><tr><td>1<\/td><td>x<\/td><td>1<\/td><td>=<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ol start=\"9\" class=\"wp-block-list\">\n<li>Use the Raster Calculator <strong>(Geoprocessing pane Spatial Analyst Tools &gt; Map Algebra &gt; Raster Calculator)<\/strong> to multiply <em>Good_slopes <\/em>and<em> Good_aspects <\/em>and name the output<em> Good_Areas.<\/em><\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>In the Raster Calculator pane double click on the 1<sup>st<\/sup> layer (e.g. <em>Good_aspects<\/em>) then double click on the * symbol then double click on the 2<sup>nd<\/sup> layer.&nbsp; You \u201cbuild\u201d the following equation &#8220;<em>good_aspects<\/em>&#8221; * &#8220;<em>good_slope<\/em>&#8220;<\/li>\n\n\n\n<li>Name output: <em>Good_Areas<\/em><\/li>\n<\/ol>\n\n\n\n<ol start=\"10\" class=\"wp-block-list\">\n<li>Examine <em>Good_Areas<\/em>. Only the few pixels with value of 1 are suitable for our purpose.<\/li>\n<\/ol>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 5. What\u2019s the total area of \u201cGood_Areas\u201d in acres?&nbsp; <\/em><br><br><em>Hint 1: Only pixels with value of 1 (suitable).&nbsp;<\/em><br><em>Hint 2: Check the properties of the final raster to find out the area of one pixel, and the units of the map<\/em> <br><em>Hint 3: Knowing the area of 1 pixel, the attribute table tells you the number of pixels, so calculate the total area.&nbsp; This area will be in <strong>map unit square<\/strong>.&nbsp;&nbsp; Convert those units to acres.<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Very small patches of land are not good enough for a solar farm, so the total area calculated is not very realistic.&nbsp; One final thing we need to do is to dis-aggregate all the separate patches (groups of touching pixels) with value 1 (equivalent, in the vector world, to converting a multipart polygon to single part).&nbsp; Then we can extract the ones larger than certain <strong>critical size<\/strong> (in our case, how many acres? ______)<\/p>\n\n\n\n<ol start=\"11\" class=\"wp-block-list\">\n<li>In the Geoprocessing pane launch <strong>Spatial Analyst Tools &gt; Generalization &gt; Region Group<\/strong><\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Input <em>Good_Areas<\/em><\/li>\n\n\n\n<li>Output<em>&nbsp;Regions_good_areas<\/em><\/li>\n\n\n\n<li>Number of neighbors FOUR (this decides which \u201ctouching\u201d cells are counted as a group. With 4, only cells touching up\/down and left\/right; EIGHT \u2013 same as before plus the diagonal cells)<\/li>\n\n\n\n<li>Leave the other options with the default values and click Run.<\/li>\n<\/ol>\n\n\n\n<ol start=\"12\" class=\"wp-block-list\">\n<li>Display <em>Regions_good_area<\/em> using a symbology of Unique Values and study its attribute table.&nbsp; Notice the large number of new groups (regions or zones) created.&nbsp; They have all been assigned a new Value, but they still have the information of suitable\/unsuitable (1\/0) in the column <strong>LINK<\/strong>, and, of course, the Count column tells you how many pixels there are in each region, therefore you can calculate the area of each patch of land.<\/li>\n<\/ol>\n\n\n\n<p class=\"has-pale-cyan-blue-background-color has-background wp-block-paragraph\"><strong>HINT<\/strong>: There should be 328 regions<\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 6. How many groups of cells (regions) are <strong>SUITABLE<\/strong>?<\/em> <br><br><em>Hint: 1\u2019s<\/em><\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 7. How many suitable parcels (regions) are larger than 60 acres?<\/em><br><br><em>Hint: you might want to calculate how many cells there are in 60 acres<\/em> (find out how many meters square there are in one acre; and you know the area of one cell)<\/p>\n\n\n\n<ol start=\"13\" class=\"wp-block-list\">\n<li>Repeat instruction #11 but this time use eight (8) neighbors to define the groups.<\/li>\n<\/ol>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 8. How many groups of cells (regions) are SUITABLE using groups of 8 cells? <\/em><\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 9. How many suitable parcels (regions) are larger than 60 acres using groups of 8 cells?<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In theory, we would also need to consider other factors like accessibility (distance to roads), environmental protection (buffers around water bodies), etc. but that\u2019s a problem for another day.<\/p>\n\n\n\n<ol start=\"14\" class=\"wp-block-list\">\n<li>Save your project for <a href=\"#part2\">part 2<\/a>.<\/li>\n\n\n\n<li>Study the cartographic model below to see the summary of what you did. Make sure you understand it and could make one yourself (click the image for a larger view).<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2026\/09\/ex7-rastersdrawio.drawio.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"380\" src=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2026\/09\/ex7-rastersdrawio.drawio-1024x380.png\" alt=\"\" class=\"wp-image-2153\" srcset=\"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2026\/09\/ex7-rastersdrawio.drawio-1024x380.png 1024w, https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2026\/09\/ex7-rastersdrawio.drawio-300x111.png 300w, https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2026\/09\/ex7-rastersdrawio.drawio-768x285.png 768w, https:\/\/commons.mtholyoke.edu\/emarcano\/wp-content\/uploads\/sites\/965\/2026\/09\/ex7-rastersdrawio.drawio.png 1041w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide\" \/>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"#top\">Return to top of page<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/commons.mtholyoke.edu\/emarcano\/geog323\">Return to Geog 323 page<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide\" id=\"part2\" \/>\n\n\n\n<h2 id=\"part2\" class=\"wp-block-heading\">Part 2: Zonal operations<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Task 1 \u2013 Zonal statistics.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After you explored the suitability of the area to have solar panels, a dispute among the neighbors has erupted.&nbsp; They want to know how much of their land is suitable for solar panels and whether their homes are located in suitable areas. To solve this problem we\u2019ll use a Zonal operation to evaluate <em>Good_Areas<\/em> using the neighbors&#8217; parcels (polygons) as \u201czones\u201d (with help of the houses\u2019 locations).<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the map from the previous part and add the following themes to your map (If you just have a new blank map, bring also <em>Good_Areas<\/em> and <em>DEM_AOI<\/em>):<\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li><em>AOI<\/em> (farmers&#8217; parcels)<\/li>\n\n\n\n<li><em>Houses<\/em><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">The <em>Houses <\/em>theme contains the information of the owner (owners&#8217; names are colors!), but the parcels shown in <em>AOI<\/em> don\u2019t have owner\u2019s name (check both layers\u2019 attribute tables).&nbsp; So, we have to join these two. But there are no common fields between these two themes so we&#8217;ll have to join them based on their locations.<\/p>\n\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li>Do a <strong>spatial<\/strong> <strong>join <\/strong>(Intersection) <strong>on <\/strong><em>AOI<\/em> (target feature) with the <em>houses<\/em> theme (join feature).<\/li>\n\n\n\n<li>Study the attribute table of <em>AOI<\/em> and make sure the names of the farmers are there.<\/li>\n\n\n\n<li>Go to<strong> <\/strong>Geoprocessing pane <strong>Spatial Analyst Tools &gt; Zonal &gt; Zonal Statistics as Table<\/strong> (read the help of the tool to learn what it is that you\u2019re doing)<\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Input raster or feature zone data (i.e. the file that defines the \u201czones\u201d) &#8211; <em>AOI<\/em><\/li>\n\n\n\n<li>Zone field \u2013 <strong>Name <\/strong><\/li>\n\n\n\n<li>Input value raster (i.e. the raster to be evaluated) \u2013 <em>Good_Areas<\/em><\/li>\n\n\n\n<li>Output table \u2013 <em>ZonalStats_Parcels<\/em><\/li>\n\n\n\n<li>Statistics type \u2013 ALL<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Study the output table.&nbsp; It shows a series of statistics for all the pixels from <em>Good_Areas<\/em> that fell within the limits of each parcel.&nbsp; Since the analyzed raster was a binary raster most of those columns don\u2019t make sense, except SUM that shows you the sum of the values of all the pixels in the parcel. Since all the pixels only have values 0 and 1 their sum is the same as the total number of pixels with value 1. Notice that the column COUNT now includes both, pixels 0 &amp; 1, it\u2019s just a total pixel count.<\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 10. Which is the parcel (name) with the largest number of good pixels (with value 1)?&nbsp;<\/em><\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 11. What is the <strong>total<\/strong> number of acres in the parcel above? <\/em><br><br>Hint 1: NOT just good pixels.&nbsp; <br>Hint 2: don\u2019t use the \u201cAREA\u201d column; the COUNT column tells you how many pixels there are, multiply these by the area of one pixel and convert to acres<\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 12. How many acres of <strong>good <\/strong>area are in this parcel? (Hint: &lt;300)&nbsp;<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"has-yellow-background-color has-background wp-block-paragraph\">Finally, let\u2019s redo this zonal statistic using <em>DEM_AOI<\/em> as our Input value raster.<\/p>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Go to Geoprocessing pane <strong>Spatial Analyst Tools &gt; Zonal &gt; Zonal Statistics as Table<\/strong><\/li>\n<\/ol>\n\n\n\n<ol style=\"list-style-type:lower-alpha\" class=\"wp-block-list\">\n<li>Input raster or feature zone data (i.e. the file that defines the \u201czones\u201d) &#8211; <em>AOI<\/em><\/li>\n\n\n\n<li>Zone field \u2013 <strong>Name<\/strong> <\/li>\n\n\n\n<li>Input value raster (i.e. the raster to be evaluated) \u2013 <em>DEM_AOI<\/em><\/li>\n\n\n\n<li>Output table \u2013 <em>ZonalStats_DEM<\/em><\/li>\n\n\n\n<li>Statistics type &#8211; ALL<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Study the output table. This time, some of the calculated statistics do make sense.&nbsp; You can now see for each parcel the minimum and maximum elevations (range is <em>max <\/em>minus <em>min<\/em>), the average elevation, and the standard elevation.&nbsp; In this case the column SUM is the one that doesn\u2019t make sense (can you tell why?).<\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 13. What is the average elevation for White parcel?<\/em><\/p>\n\n\n\n<p class=\"has-light-green-cyan-background-color has-background wp-block-paragraph\"><em>Question 14. What is the highest elevation found at Black parcel?<\/em><\/p>\n\n\n\n<ol start=\"6\" class=\"wp-block-list\">\n<li>Save and close the map<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-black-color has-alpha-channel-opacity has-black-background-color has-background is-style-wide\" \/>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"#top\">Return to top of page<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/commons.mtholyoke.edu\/emarcano\/geog323\">Return to Geog 323 page<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exercise 1 \u2013 Introduction to raster analysis Contents Return to Geog 323 page Part 1: Interpolation &amp; raster operations In this part we want to find the best place for a solar farm.&nbsp; The selected site must be on a relatively flat area (slope 0-5 degrees of inclination) and where [&hellip;]<\/p>\n","protected":false},"author":793,"featured_media":0,"parent":2130,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"class_list":["post-2143","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/pages\/2143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/users\/793"}],"replies":[{"embeddable":true,"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/comments?post=2143"}],"version-history":[{"count":25,"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/pages\/2143\/revisions"}],"predecessor-version":[{"id":2255,"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/pages\/2143\/revisions\/2255"}],"up":[{"embeddable":true,"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/pages\/2130"}],"wp:attachment":[{"href":"https:\/\/commons.mtholyoke.edu\/emarcano\/wp-json\/wp\/v2\/media?parent=2143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}