{"id":4571,"date":"2024-06-06T03:14:39","date_gmt":"2024-06-06T03:14:39","guid":{"rendered":"https:\/\/blogs.lincoln.ac.nz\/gis\/?p=4571"},"modified":"2024-06-06T03:14:40","modified_gmt":"2024-06-06T03:14:40","slug":"vector-makes-its-mark","status":"publish","type":"post","link":"https:\/\/blogs.lincoln.ac.nz\/gis\/vector-makes-its-mark\/","title":{"rendered":"Vector Makes Its Mark"},"content":{"rendered":"\n<p><em>A cornucopia of vector tools help with some marking<\/em><\/p>\n\n\n\n<p>While both students and academics are celebrating the end of another semester, it may well be a bit short-lived.  Poor students have exams to cope with and poor academics have scads of marking to endure.  One of the GIS courses has recently done a project on sea level rise impacts, and as I set out to get the marking done, it was clear that I was going to have to have do some analysis to help make that as painless as possible.<\/p>\n\n\n\n<p>Let me explain: for this project, we were looking at a rise in sea level of 1.0 m (as projected by the CCC by 2051) plus an additional 1.08 m to account for high tide effects (as outlined by NIWA), for a total of 2.08 m above current sea level.  As a first part of this, I used a LiDAR DEM to identify all those areas up to that height, ran some filters (<a rel=\"noreferrer noopener\" href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/spatial-analyst\/focal-statistics.htm\" target=\"_blank\">Focal Statistics<\/a>, for those playing at home) to weed out some of the very small (but numerous) unconnected areas and then converted that to a polygon layer (called SLRZone), as shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"733\" height=\"656\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SA.jpg\" alt=\"\" class=\"wp-image-4572\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SA.jpg 733w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SA-300x268.jpg 300w\" sizes=\"auto, (max-width: 733px) 100vw, 733px\" \/><\/figure>\n\n\n\n<p>Are study area extends from the Waimakariri River, all the way around Banks Peninsula and out to Akaroa.  Rather than look at all these areas, I chose to break things down so students could look at the impact for a selected suburb, chosen from a layer called AffectedAreas, here shown with purpley boundaries (these are the <a rel=\"noreferrer noopener\" href=\"https:\/\/datafinder.stats.govt.nz\/layer\/92213-statistical-area-2-2018-clipped-generalised\/\" target=\"_blank\">SA2<\/a> areas from the 2018 census via StatsNZ):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"713\" height=\"657\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AAs.jpg\" alt=\"\" class=\"wp-image-4573\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AAs.jpg 713w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AAs-300x276.jpg 300w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/figure>\n\n\n\n<p>With these two layers, students can then pick one of the suburbs and then for each, create a bit of an inventory of the roads, buildings, landcovers and people affected &#8211; classic GIS stuff, yes?<\/p>\n\n\n\n<p>For most, that meant selecting a suburb, exporting it to a new layer, then using that to <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/clip.htm\" target=\"_blank\" rel=\"noreferrer noopener\">Clip <\/a>the SLRZone layer, thus giving them the flooded extent within each suburb.  This can then be used to clip out each of the important features from the right data layer and total up the important elements.<\/p>\n\n\n\n<p>When it came to marking, things were a bit different, as I will need to know the &#8220;correct&#8221; values for each suburb so I can check their results.  Rather than do each one individually, I wanted to optimise my time by doing this analysis for all suburbs at once.  Along the way, I ended up using a range of some of the more useful vector tools, so I thought it might be helpful to cover them here.  There are the key steps I&#8217;ll cover:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Knowing which flood area goes with which suburb<\/li>\n\n\n\n<li>Preparing layers for each of the four factors<\/li>\n\n\n\n<li>Making it easy to check results<\/li>\n<\/ul>\n\n\n\n<p><strong>Knowing which flood area goes with which suburb<\/strong><\/p>\n\n\n\n<p>On the map, I can see each suburb and the extent of flooded area within.  But these are still two separate layers &#8211; one has the suburb details (name being the most important) and the other that just has the extent of the flooded area.  I&#8217;d like to have both in one layer, so an <a rel=\"noreferrer noopener\" href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/intersect.htm\" target=\"_blank\">Intersect <\/a>spatial join sounds like a good way to go.  I&#8217;m calling this layer AffectedAreasSLRZone (in blue outline below) and deleted any unneeded attributes:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"985\" height=\"885\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AASLR2.jpg\" alt=\"\" class=\"wp-image-4576\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AASLR2.jpg 985w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AASLR2-300x270.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AASLR2-768x690.jpg 768w\" sizes=\"auto, (max-width: 985px) 100vw, 985px\" \/><\/figure>\n\n\n\n<p>This doesn&#8217;t look terribly different from my SLRZone layer, but the key is in the table &#8211; each layer is now broken down by suburb (SA2 area), so if I select one record in the table, I can see that its features are contained totally within that suburb &#8211; a simple but critical step for everything that follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"971\" height=\"886\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Avondale2.jpg\" alt=\"\" class=\"wp-image-4577\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Avondale2.jpg 971w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Avondale2-300x274.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Avondale2-768x701.jpg 768w\" sizes=\"auto, (max-width: 971px) 100vw, 971px\" \/><\/figure>\n\n\n\n<p><strong>Preparing layers for each of the four factors<\/strong><\/p>\n\n\n\n<p>Using the layer from above, I can extract what I need for roads (total length), buildings (number), landcovers (type and area in m<sup>2<\/sup>) and population counts (number within SLRZone).<\/p>\n\n\n\n<p>*Roads<\/p>\n\n\n\n<p>Using a <a rel=\"noreferrer noopener\" href=\"https:\/\/data.linz.govt.nz\/layer\/50329-nz-road-centrelines-topo-150k\/\" target=\"_blank\">road centerlines<\/a> layer from the LINZ Data Service, I first Intersected this with AffectedAreasSLRZone (<em>Ed. couldn&#8217;t you have come up with a shorter name?<\/em>) but I&#8217;m not done yet &#8211; in the result, I&#8217;ve got all the roads (multiple) within each suburb.  <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"376\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDAtt-1024x376.jpg\" alt=\"\" class=\"wp-image-4579\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDAtt-1024x376.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDAtt-300x110.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDAtt-768x282.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDAtt-1536x565.jpg 1536w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDAtt.jpg 1635w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>See how there are multiple entries for Akaora?  And a total of 976 features (rows)?  To make things a bit easier to manage, I ran the <a rel=\"noreferrer noopener\" href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/data-management\/dissolve.htm\" target=\"_blank\">Dissolve <\/a>tool on this using the suburb name:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"360\" height=\"421\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDDIS.jpg\" alt=\"\" class=\"wp-image-4578\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDDIS.jpg 360w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDDIS-257x300.jpg 257w\" sizes=\"auto, (max-width: 360px) 100vw, 360px\" \/><\/figure>\n\n\n\n<p>In the output from this tool, anything with an SA22018_1 value of Akaroa will be compressed into one feature made up of multiple parts.  Since this is going to be in a geodatabase, I automatically get a Shape_Length attribute.  Here&#8217;s the output, with the unnecessary attributes removed:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"911\" height=\"883\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDDissolved.jpg\" alt=\"\" class=\"wp-image-4580\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDDissolved.jpg 911w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDDissolved-300x291.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/RDDissolved-768x744.jpg 768w\" sizes=\"auto, (max-width: 911px) 100vw, 911px\" \/><\/figure>\n\n\n\n<p>With this layer I&#8217;ve got the total length of roads in each suburb just by looking at Shape_Length.  And now there are only 40 records, one for each suburb.<\/p>\n\n\n\n<p>*Buildings<\/p>\n\n\n\n<p>I probably could have done something similar to the above for buildings, but there&#8217;s a much better tool to use for this: <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/spatial-join.htm\">Spatial Join<\/a>.  This tool is a bit of an unsung hero in my book.  Amongst other things, it does a nice job of counting features within polygons.  So with my LINZ <a rel=\"noreferrer noopener\" href=\"https:\/\/data.linz.govt.nz\/layer\/101290-nz-building-outlines\/\" target=\"_blank\">building outlines layer<\/a> (downloaded from the LINZ Data Service):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"361\" height=\"431\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/BLDSJT.jpg\" alt=\"\" class=\"wp-image-4581\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/BLDSJT.jpg 361w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/BLDSJT-251x300.jpg 251w\" sizes=\"auto, (max-width: 361px) 100vw, 361px\" \/><\/figure>\n\n\n\n<p>Notice here that I&#8217;m using AffectedAreasSLRZone as the target and nz-building-outlines for the Join Features, so for each AffectedAreasSLRZone polygon, it&#8217;s going to count the number of buildings within it&#8217;s boundary and put that in a new attribute called Join_Count.  The Join Operation requires a bit of thought but one-to-one is definitely the way to go here (output again simplified in the table):<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"340\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AASJOut.jpg\" alt=\"\" class=\"wp-image-4582\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AASJOut.jpg 570w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AASJOut-300x179.jpg 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/figure>\n\n\n\n<p>Again, only 40 records so I know how many buildings (Join_Count) each suburb has.  That&#8217;s two done.<\/p>\n\n\n\n<p>*Landcover<\/p>\n\n\n\n<p>Our tried and true friend in the Landcover Database serves as our base data here.  I could use either Intersect or <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/identity.htm\" target=\"_blank\" rel=\"noreferrer noopener\">Identity <\/a>here and used the latter for some reason, unknown to me now, but since they&#8217;re both polygons, the result should be the same:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"362\" height=\"305\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/ID1.jpg\" alt=\"\" class=\"wp-image-4583\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/ID1.jpg 362w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/ID1-300x253.jpg 300w\" sizes=\"auto, (max-width: 362px) 100vw, 362px\" \/><\/figure>\n\n\n\n<p>In my result I&#8217;ve got a bit of a double problem &#8211; not only do I have multiple entries for suburbs, there are also multiple entries for the different landcovers:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"914\" height=\"853\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/LC1.jpg\" alt=\"\" class=\"wp-image-4584\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/LC1.jpg 914w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/LC1-300x280.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/LC1-768x717.jpg 768w\" sizes=\"auto, (max-width: 914px) 100vw, 914px\" \/><\/figure>\n\n\n\n<p>For example, in Aranui, Urban Parklands\/Open Space occurs at least five times.  No worries &#8211; Dissolve can work at multiple levels, so for each suburb, I want it to compress all the Name_2018 entries that have the same value:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"324\" height=\"480\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/DIS2.jpg\" alt=\"\" class=\"wp-image-4585\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/DIS2.jpg 324w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/DIS2-203x300.jpg 203w\" sizes=\"auto, (max-width: 324px) 100vw, 324px\" \/><\/figure>\n\n\n\n<p>I&#8217;ve added in a request for a new attribute that Sums up the Shape_Area values.  The output now breaks down each suburb with the unique landcover types and I get the Shape_Area for free:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"901\" height=\"889\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/DIS2out.jpg\" alt=\"\" class=\"wp-image-4586\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/DIS2out.jpg 901w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/DIS2out-300x296.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/DIS2out-768x758.jpg 768w\" sizes=\"auto, (max-width: 901px) 100vw, 901px\" \/><\/figure>\n\n\n\n<p>*Populations<\/p>\n\n\n\n<p>Possibly the trickiest one, only because we&#8217;re working with <a rel=\"noreferrer noopener\" href=\"https:\/\/blogs.lincoln.ac.nz\/gis\/mapping-the-census\/\" data-type=\"post\" data-id=\"44\" target=\"_blank\">spreadsheet data from the census<\/a>, and hence, some table joins.  <\/p>\n\n\n\n<p>So far we&#8217;ve been working with the SA2 data to give us our suburb boundaries.  We could grab the population counts for each SA2 area from the right census spreadsheet, but that will only give us the entire population of each suburb with no ability to look at a finer scale.  For that we need the <a rel=\"noreferrer noopener\" href=\"https:\/\/datafinder.stats.govt.nz\/layer\/92211-statistical-area-1-2018-clipped-generalised\/\" target=\"_blank\">SA1<\/a> data (in green below).  <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"918\" height=\"445\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SA1s.jpg\" alt=\"\" class=\"wp-image-4588\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SA1s.jpg 918w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SA1s-300x145.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SA1s-768x372.jpg 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/figure>\n\n\n\n<p>With a bit of behind the scenes table joining, the population values were added.  Next up, an Identity between AffectedAreasSLRZone and my SA1 population layer (SA1AffectedAreas_Pop) giving me Pop_Identity:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"837\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/PopIdent-1024x837.jpg\" alt=\"\" class=\"wp-image-4587\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/PopIdent-1024x837.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/PopIdent-300x245.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/PopIdent-768x628.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/PopIdent.jpg 1083w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>(Intersect would also have worked here, by the way.)  Now I&#8217;ve got my populations (C18_CURPop) within each suburb&#8217;s flood area, but again, multiple records because of the finer scale SA1 polygons.  I could use Dissolve here so long as I ask for it to Sum up the populations.  <\/p>\n\n\n\n<p>If not using Dissolve, there are two other options here: <a rel=\"noreferrer noopener\" href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/summarize-within.htm\" target=\"_blank\">Summarize Within<\/a> or <a rel=\"noreferrer noopener\" href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/tool-reference\/analysis\/summary-statistics.htm\" target=\"_blank\">Summary Statistics<\/a>.  The first is going to be a bit fiddly so I went with the second option.  This will give me an output table, rather than a layer, so I&#8217;m already thinking about what to join this to.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"269\" height=\"306\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SUMSTAT.jpg\" alt=\"\" class=\"wp-image-4589\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SUMSTAT.jpg 269w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SUMSTAT-264x300.jpg 264w\" sizes=\"auto, (max-width: 269px) 100vw, 269px\" \/><\/figure>\n\n\n\n<p>Setting the Case Field forces it to summarize by the suburb name:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"431\" height=\"442\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SUMSTATTab.jpg\" alt=\"\" class=\"wp-image-4590\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SUMSTATTab.jpg 431w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SUMSTATTab-293x300.jpg 293w\" sizes=\"auto, (max-width: 431px) 100vw, 431px\" \/><\/figure>\n\n\n\n<p>Note: 40 records and I&#8217;ve got the name in SA22018_1.  What next?  I&#8217;ve got my choice of layers to join this  to and this time I&#8217;m going to join it to my AffectedAreas layer (you&#8217;ll see why in a sec).<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"462\" height=\"436\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AAPop.jpg\" alt=\"\" class=\"wp-image-4591\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AAPop.jpg 462w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/AAPop-300x283.jpg 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/figure>\n\n\n\n<p>Almost done &#8211; by this stage I have all that I need to start marking (apart from courage and coffee, oh and some chocolate and Spotify).  Last step is to set this up in a way that streamlines it all.  What I&#8217;ve managed to do here is to relate everything to a suburb name, and therein lies my advantage at the last stage.<\/p>\n\n\n\n<p><strong>Making it easy to check results<\/strong><\/p>\n\n\n\n<p>If you&#8217;re still with me (and you can be forgiven for toddling off to bed by now), I&#8217;d like to be able to quickly check the key values for each of my four factors for a selected suburb.  As I read through a report, the first thing I&#8217;m looking for is the chosen suburb.  Once I know that, I can go into the AffectedAreas table and select that record manually and click on Zoom To.  Let&#8217;s stick with Avondale:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"840\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/S1-1024x840.jpg\" alt=\"\" class=\"wp-image-4592\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/S1-1024x840.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/S1-300x246.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/S1-768x630.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/S1.jpg 1087w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Notice that I can see the affected population straightaway.  I&#8217;ll then use this selected record to select all the others in the other three layers using <a rel=\"noreferrer noopener\" href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/mapping\/navigation\/select-features-by-location.htm\" target=\"_blank\">Select by Location<\/a>:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"455\" height=\"534\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SbyL.jpg\" alt=\"\" class=\"wp-image-4593\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SbyL.jpg 455w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/SbyL-256x300.jpg 256w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/figure>\n\n\n\n<p>When Apply is clicked, the right features in the other layers get selected &#8211; by showing just the Selected records, I get to see all the values I need to check (I used Within as the Relationship to ensure neighbouring polygons weren&#8217;t also selected):<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Tables-1024x300.jpg\" alt=\"\" class=\"wp-image-4594\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Tables-1024x300.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Tables-300x88.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Tables-768x225.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Tables-1536x449.jpg 1536w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2024\/06\/Tables.jpg 1559w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>This did actually help a lot by minimising the time I have to look at the data to check results.  I&#8217;d say it took a good hour and a bit to set things up, but once done, two clicks got me what I needed.<\/p>\n\n\n\n<p>While this post has been about trying to do things smarter (<em>Ed. You?<\/em>), it&#8217;s really been about using some helpful vector tools, including Intersect, Identity, Spatial Join, Clip, Summary Statistics, Dissolve and table joins, all in one analysis package.  And while I certainly don&#8217;t enjoy marking (who does?), this did make things easier.  So take away what may be useful for making your own life easier. <\/p>\n\n\n\n<p>Maybe giving up GIS all together would be a good start.  But where&#8217;s the fun in that?<\/p>\n\n\n\n<p>C <\/p>\n","protected":false},"excerpt":{"rendered":"<p>A cornucopia of vector tools help with some marking While both students and academics are celebrating the end of another semester, it may well be a bit short-lived. Poor students have exams to cope with and poor academics have scads of marking to endure. One of the GIS courses has recently done a project on [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4571","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/4571","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=4571"}],"version-history":[{"count":2,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/4571\/revisions"}],"predecessor-version":[{"id":4596,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/4571\/revisions\/4596"}],"wp:attachment":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/media?parent=4571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/categories?post=4571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/tags?post=4571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}