{"id":3291,"date":"2021-08-27T18:09:27","date_gmt":"2021-08-27T06:09:27","guid":{"rendered":"http:\/\/blogs.lincoln.ac.nz\/gis\/?p=3291"},"modified":"2023-05-07T02:53:53","modified_gmt":"2023-05-07T02:53:53","slug":"level-4-exercise","status":"publish","type":"post","link":"https:\/\/blogs.lincoln.ac.nz\/gis\/level-4-exercise\/","title":{"rendered":"Level 4 Exercise"},"content":{"rendered":"<p><em>We use a bit of network analysis to set the extent of exercise during lockdown.<\/em><\/p>\n<p>So you now know that part of my coping strategy for lockdown is Stuff quizzes, but to be honest, the main strategy for me is exercise, and running in particular.\u00a0 I&#8217;d be lost without it, as those in my bubble well know.\u00a0 We are encouraged to get out and exercise so long as we keep it local, but what exactly does that mean?\u00a0 Is it my block?\u00a0 Is it my suburb?\u00a0 Is it my little South Island bach out in the middle of nowhere (which I of course went to before level 4, right?).\u00a0 It hasn&#8217;t been that explicit during this lockdown but in the previous one I do seem to recall a 5 kilometre distance being put on distances away from home that were acceptable.\u00a0 \u00a0You might not be too surprised that I was thinking about how I would use maps to help figure this out.\u00a0 So here goes!<\/p>\n<p>To demonstrate (and to protect my privacy&#8230;) I&#8217;ll created three points on a map to use for this &#8211; one in Beckenham, one in Governors Bay and one at the uni:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3292\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Points-1.jpg\" alt=\"\" width=\"895\" height=\"705\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Points-1.jpg 895w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Points-1-300x236.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Points-1-768x605.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Points-1-665x525.jpg 665w\" sizes=\"auto, (max-width: 895px) 100vw, 895px\" \/><\/p>\n<p>5 kilometres is a pretty distinct value to work with.\u00a0 If I know that I&#8217;m okay running within that distance from home, my first thought might be to just buffer around the point\u00a0is my start:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3293\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Buffer.jpg\" alt=\"\" width=\"894\" height=\"708\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Buffer.jpg 894w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Buffer-300x238.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Buffer-768x608.jpg 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/p>\n<p>This gives me something to work with &#8211; sort of my running bubbles.\u00a0 To be fair, this is an as-the-kereru-flies distance, and, well, last time I tried to run through my neighbours back yard, he called the police.\u00a0 (I&#8217;m reminded\u00a0of John Cheever&#8217;s short story, <a href=\"https:\/\/en.wikipedia.org\/wiki\/The_Swimmer_(short_story)\" target=\"_blank\" rel=\"noopener noreferrer\">The Swimmer<\/a>, where the protagonist decides to make his way home by swimming through all his neighbours&#8217; pools to get there.)\u00a0 The reality is that we are constrained to use the road network for things like walking and running (and hopefully driving, too).\u00a0 So how do we take that into account?<\/p>\n<p>Here&#8217;s where <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/analysis\/networks\/what-is-network-analyst-.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Network Analysis<\/a> (NA) comes in to play.\u00a0 With the right input data, I can use NA to find the 5 k distances I can realistically travel <em>along<\/em> the road network from a starting point.\u00a0 To get this to work in Pro we first need a dataset that&#8217;s been prepared for network analysis, meaning that, in the case of roads, each line segment has connectivity information\u00a0which ties it into the rest of the network, so that a pathway can be found from one point to another.\u00a0 There&#8217;s one in J:\\Data\\NetworkAnalysisData called RoadsNA_ND.\u00a0 Feel free to play along at home if you like.<\/p>\n<p>Next I <a href=\"http:\/\/blogs.lincoln.ac.nz\/gis\/how-do-i-create-a-new-feature-classshapefile\/\" target=\"_blank\" rel=\"noopener noreferrer\">created a new point feature class<\/a> for my starting points, added them to my map and created the three points you see above.\u00a0 What really matters in this layer is the geographic location so it really doesn&#8217;t need any attributes.<\/p>\n<p>Once I&#8217;ve got these layers added to my map, there&#8217;s now a <span style=\"color: #0000ff\"><strong>Network Analysis<\/strong><\/span> button under the Analysis tab with a whole bunch of options beneath:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3294\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/tools.jpg\" alt=\"\" width=\"1913\" height=\"905\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/tools.jpg 1913w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/tools-300x142.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/tools-1024x484.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/tools-768x363.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/tools-1536x727.jpg 1536w\" sizes=\"auto, (max-width: 1913px) 100vw, 1913px\" \/><\/p>\n<p>Routes is the same sort of thing you might do in Google Maps to get directions.\u00a0 I won&#8217;t go into the others this time, but for our purposes, what we&#8217;re after is <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/analysis\/networks\/service-area-analysis-layer.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Service Areas<\/a>.\u00a0 <a href=\"http:\/\/blogs.lincoln.ac.nz\/gis\/the-spatial-smoking-gun-part-1\/\" target=\"_blank\" rel=\"noopener noreferrer\">We&#8217;ve seen these before<\/a> here at GIS Central.\u00a0 Selecting that adds a new layer to my map:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3295\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NLayer.jpg\" alt=\"\" width=\"458\" height=\"747\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NLayer.jpg 458w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NLayer-184x300.jpg 184w\" sizes=\"auto, (max-width: 458px) 100vw, 458px\" \/><\/p>\n<p>In this new layer, Facilities are my starting points, the Polygon and Lines layers are my two potential output layers and the different barriers are ways of limiting connectivity &#8211; like road blocks.\u00a0 Next I need to set the layer that I&#8217;m using as my start points, here called (creatively) Facilities.\u00a0 The <strong><span style=\"color: #0000ff\">Import Facilities<\/span><\/strong> button allows me to set this to my Facilities layer:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3296\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NASettings.jpg\" alt=\"\" width=\"1588\" height=\"234\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NASettings.jpg 1588w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NASettings-300x44.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NASettings-1024x151.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NASettings-768x113.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/NASettings-1536x226.jpg 1536w\" sizes=\"auto, (max-width: 1588px) 100vw, 1588px\" \/><\/p>\n<p>A few of the other key settings:<\/p>\n<ul>\n<li>Direction is &#8220;Away from Facilities&#8221;<\/li>\n<li>The Cutoffs are where I set the distances.\u00a0 Here I&#8217;m using 5,000 (metres) but I can set multiple cutoffs if need be.<\/li>\n<li>Outputs are set to Polygons and Lines.<\/li>\n<\/ul>\n<p>Note that if my network dataset has times of travel over each line segment I can just as easily create drive-time areas or walking-time areas (e.g. what areas are accessible within half an hour&#8217;s drive of my facilities?).\u00a0 We&#8217;re just interested in distance in this analysis.\u00a0 Once set, click <strong><span style=\"color: #0000ff\">Run<\/span><\/strong>, et volia!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3297\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/ServiceAreas.jpg\" alt=\"\" width=\"897\" height=\"708\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/ServiceAreas.jpg 897w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/ServiceAreas-300x237.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/ServiceAreas-768x606.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/ServiceAreas-665x525.jpg 665w\" sizes=\"auto, (max-width: 897px) 100vw, 897px\" \/><\/p>\n<p>Bummer &#8211; our Governors Bay and Beckenham friends could just barely meet up given these starting points&#8230;assuming each of\u00a0them could make it up their respective hills.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3301\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Meeting.jpg\" alt=\"\" width=\"894\" height=\"708\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Meeting.jpg 894w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Meeting-300x238.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Meeting-768x608.jpg 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\" \/><\/p>\n<p>At least this will allow them to remain socially distanced (they&#8217;re actually about 260 m apart).<\/p>\n<p>I&#8217;m showing both the line and polygon outputs here, but everything that&#8217;s purple is basically at or within 5 k of my three starting points.\u00a0 Note how they compare to my 5 k buffer &#8211; all are generally smaller in extent, which shouldn&#8217;t be too surprising &#8211; only a road running straight from a starting point out 5 k would reach the buffer edge.<\/p>\n<p>One important thing to note is that walking tracks are <em>not<\/em> included in my network dataset; it&#8217;s only roads.\u00a0 If I were to incorporate walking tracks it would probably make a biggish difference.<\/p>\n<p>Anyway, let&#8217;s look at things in more detail &#8211; here&#8217;s Lincoln (just the lines this time):<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3300\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Lincoln.jpg\" alt=\"\" width=\"744\" height=\"706\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Lincoln.jpg 744w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/Lincoln-300x285.jpg 300w\" sizes=\"auto, (max-width: 744px) 100vw, 744px\" \/><\/p>\n<p>And Governors Bay:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3299\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/GB.jpg\" alt=\"\" width=\"714\" height=\"684\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/GB.jpg 714w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/GB-300x287.jpg 300w\" sizes=\"auto, (max-width: 714px) 100vw, 714px\" \/><\/p>\n<p>And Beckenham:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3298\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/CHC.jpg\" alt=\"\" width=\"690\" height=\"682\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/CHC.jpg 690w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2021\/08\/CHC-300x297.jpg 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/p>\n<p>Of course the Beckenhamite has a lot more options than the Governors Bayesian (that one&#8217;s for all you statisticians out there &#8211; <em>you know who you are<\/em>), at least along the roads, but arguably much better views.\u00a0 Our friend in Lincoln will spend a lot of time looking at paddocks.<\/p>\n<p>Now I don&#8217;t know if we want to get all philosophical around the real world limiting our potentials but my aim here is to show how Network Analysis helps us to get better senses of distances and times along a linear network, such as road, or walking tracks, or wasterwater pipes, or fibre optic networks and any network connected together.\u00a0 Buffers are nice and easy but NA allows us to make outputs like this be a bit more realistic.<\/p>\n<p>So, with this task done, it feels like a good time for a run.<\/p>\n<p>C<\/p>\n<p>Postscript: in the figure showing all three service areas and buffers, note that the Beckenham and Governors Bay buffers overlap, but the figures lower down only show each buffer and network lines separately.\u00a0 Wondering how I did that?\u00a0 Check out <a href=\"https:\/\/pro.arcgis.com\/en\/pro-app\/latest\/help\/mapping\/layer-properties\/definition-query.htm\" target=\"_blank\" rel=\"noopener noreferrer\">definition queries<\/a> &#8211; they can be very handy.)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We use a bit of network analysis to set the extent of exercise during lockdown. So you now know that part of my coping strategy for lockdown is Stuff quizzes, but to be honest, the main strategy for me is exercise, and running in particular.\u00a0 I&#8217;d be lost without it, as those in my bubble [&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-3291","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/3291","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=3291"}],"version-history":[{"count":1,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/3291\/revisions"}],"predecessor-version":[{"id":4070,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/3291\/revisions\/4070"}],"wp:attachment":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/media?parent=3291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/categories?post=3291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/tags?post=3291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}