{"id":2120,"date":"2018-09-25T10:47:15","date_gmt":"2018-09-24T22:47:15","guid":{"rendered":"http:\/\/blogs.lincoln.ac.nz\/gis\/?p=2120"},"modified":"2023-05-07T03:28:39","modified_gmt":"2023-05-07T03:28:39","slug":"loaded-layers","status":"publish","type":"post","link":"https:\/\/blogs.lincoln.ac.nz\/gis\/loaded-layers\/","title":{"rendered":"Loaded Layers"},"content":{"rendered":"<p><em>We look at using the Load command to add new records to a layer in this post.\u00a0 Sometimes it&#8217;s a far better option than a spatial join or a merge.<\/em><\/p>\n<p>We recently had a summer scholarship student looking at some mapping work for the Department of Conservation (DOC).\u00a0 Amongst the myriad of things they look after (1\/3 of the NZ landmass, all those critters) DOC is also responsible for keeping track of the movements of exotic fish.\u00a0 So when someone wants to transfer some rainbow trout to a pond in Northland, they need to gain permission from DOC and MPI before doing so.\u00a0 This also means keeping track of all the paperwork that goes into granting those permissions.\u00a0 In the spirit of a picture telling a 1,000 words, they were interested in mapping all these permissions as an alternative way to mange the data.\u00a0 What a great idea!<\/p>\n<p>After several weeks of work, the end result was a webmap that DOC can use to access these data and focus on whatever areas they&#8217;re interested in:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/WM.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2220\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/WM.jpg\" alt=\"\" width=\"1437\" height=\"795\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/WM.jpg 1437w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/WM-300x166.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/WM-1024x567.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/WM-768x425.jpg 768w\" sizes=\"auto, (max-width: 1437px) 100vw, 1437px\" \/><\/a><\/p>\n<p>Each point represents one of the permissions and can be clicked on to get the details for each.<\/p>\n<p>Our student got started by having a look at the data DOC provided.\u00a0 Not surprisingly, the data were kept in a table-based database with links to PDFs and spreadsheets in some cases.\u00a0 For a few, there were only paper documents.\u00a0 Buried deeply in all the\u00a0data were several ways of locating the permissions.<\/p>\n<p>In the most fortuitous cases, x and y coordinates were listed.\u00a0 In other cases, just a place name could be found.\u00a0 In still other cases, the only spatial data was around the land section details.\u00a0 We&#8217;ll deal with them one by one and see how they ended up as points on a map above.\u00a0 At the end of this post we&#8217;ll see how three separate layers were merged into one using a handy tool.<\/p>\n<p><strong>Permissions with Coordinates<\/strong><\/p>\n<p>This was the best case with these data, but they weren&#8217;t quite as straightforward as we had hoped.\u00a0 As an example, we found coordinates like this: NZMS 260 M36-671-293 (<em>Ed. &#8211; not real coordinates<\/em>).\u00a0 These spreadsheets looked something like this (I&#8217;ve blanked out the Holders and some other vital details):<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2221\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260.jpg\" alt=\"\" width=\"908\" height=\"229\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260.jpg 908w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260-300x76.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260-768x194.jpg 768w\" sizes=\"auto, (max-width: 908px) 100vw, 908px\" \/><\/a><\/p>\n<p>Those of you familiar with eastings and northings in New Zealand Transverse Mercator or Map Grid would look a bit askance at these &#8211; they don&#8217;t look much like coordinates.\u00a0 They are, but they&#8217;re from a much older mapping system.\u00a0 NZMS 260 is an older version of 1:50,000 scale topo maps.\u00a0 The country was broken down into 329 tiles with a letter and two numbers to identify it.\u00a0 Around here, M36 was the map that covered Lincoln and parts of Banks Peninsula.<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260Sheets2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2226 alignleft\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260Sheets2.jpg\" alt=\"\" width=\"354\" height=\"509\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260Sheets2.jpg 354w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/260Sheets2-209x300.jpg 209w\" sizes=\"auto, (max-width: 354px) 100vw, 354px\" \/><\/a><\/p>\n<p>Within each sheet, two triplets of numbers would allow you to locate a point to within a hundred metres or so. For instance, in the old NZMG system, the rough coordinates for the Forbes Building would be Easting 24<strong>671<\/strong>00 Northing 57<strong>293<\/strong>00 (these are in meters).\u00a0 Since this point is on map sheet M36, an alternative way to identify this point is as NZMS 260 M36-671-293.\u00a0 On the map sheet, the leading 24 and 57 won&#8217;t change so the 671 and 293 are shorthand for that point.\u00a0 With a little bit of practice this becomes easy to use (provided you&#8217;ve got the maps) but the bigger problem is that ArcMap isn&#8217;t going to like that map reference.\u00a0 (<a href=\"http:\/\/blogs.lincoln.ac.nz\/gis\/map-projections-3-the-tour-de-topo\/\" target=\"_blank\" rel=\"noopener noreferrer\"><em>The current mapping system is set up in the same way<\/em><\/a>.) So how to convert the NZMS map references to something more useful (i.e. current), like NZTM?<\/p>\n<p><a href=\"https:\/\/www.linz.govt.nz\/\" target=\"_blank\" rel=\"noopener noreferrer\">LINZ<\/a> to the rescue &#8211; they provide a <a href=\"http:\/\/apps.linz.govt.nz\/coordinate-conversion\/\" target=\"_blank\" rel=\"noopener noreferrer\">coordinate conversion page<\/a> where you can input a series of coordinates and get their NZTM equivalents out the other end.\u00a0 These could be added to the spreadsheet and then easily mapped using the <a href=\"https:\/\/support.esri.com\/en\/technical-article\/000012745\" target=\"_blank\" rel=\"noopener noreferrer\">Display X Y Data<\/a> option.\u00a0 That was the easy part.<\/p>\n<p><strong>Permissions with Place Names<\/strong><\/p>\n<p>I was hoping this would also be an easy one&#8230;but&#8230; <em>(Ed. &#8211; a common refrain in GIS.)\u00a0<\/em> There&#8217;s a layer from LINZ called the <a href=\"https:\/\/data.linz.govt.nz\/layer\/51681-nz-place-names-nzgb\/\" target=\"_blank\" rel=\"noopener noreferrer\">gazetteer<\/a> which lists a plethora of place names.\u00a0 I was hoping it would be a quick <a href=\"http:\/\/blogs.lincoln.ac.nz\/gis\/mapping-the-census\/\" target=\"_blank\" rel=\"noopener noreferrer\">table join<\/a> to bring the spreadsheet and the points together but there weren&#8217;t many useable matches so most of these had to mapped manually.\u00a0 Our poor student\u00a0is blind now&#8230;<\/p>\n<p><strong>Permissions with Legal Descriptions<\/strong><\/p>\n<p>The remaining points&#8217; only spatial information was tied to the legal descriptions of property sections.\u00a0 All sections across NZ have a title and a legal description which is sort of a unique identifier.\u00a0 Unfortunately, there&#8217;s not much rhyme or reason to how legal descriptions get assigned, so unlike the map grid references above, we&#8217;re pretty much starting from scratch.\u00a0 There are <a href=\"https:\/\/data.linz.govt.nz\/tables\/category\/full-landonline-dataset\/\" target=\"_blank\" rel=\"noopener noreferrer\">legal description layers<\/a> on the LINZ Data Service but try as we might, there were enough discrepancies between legal description texts that we got no useful matches.\u00a0 With just over 30 records having only this limitation, what to do now?\u00a0 Here&#8217;s an image of the spreadsheet to give you an idea of what we were dealing with (with holder names blocked out).\u00a0 The &#8220;Location&#8221; column has the legal descriptions:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/SS.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2219\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/SS.jpg\" alt=\"\" width=\"1410\" height=\"643\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/SS.jpg 1410w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/SS-300x137.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/SS-1024x467.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/SS-768x350.jpg 768w\" sizes=\"auto, (max-width: 1410px) 100vw, 1410px\" \/><\/a><\/p>\n<p>There is one mapping software application that allows you to search on legal descriptions &#8211; <a href=\"http:\/\/quickmap.co.nz\/\" target=\"_blank\" rel=\"noopener noreferrer\">QuickMap<\/a>, which is available on the computers in C4.\u00a0 With both ArcMap and QuickMap open on the desktop, I was able to read off the legal descriptions from the spreadsheet and then search from them in QuickMap, as shown below:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/QuickMap.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2218\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/QuickMap.jpg\" alt=\"\" width=\"1605\" height=\"847\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/QuickMap.jpg 1605w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/QuickMap-300x158.jpg 300w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/QuickMap-1024x540.jpg 1024w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/QuickMap-768x405.jpg 768w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/QuickMap-1536x811.jpg 1536w\" sizes=\"auto, (max-width: 1605px) 100vw, 1605px\" \/><\/a><\/p>\n<p>Then, in ArcMap, I could place the point in the correct place.\u00a0 There was no way to get around having to do this record by record, but happily there weren&#8217;t too many.<\/p>\n<p><strong>Pulling the Data Together<\/strong><\/p>\n<p>So now we&#8217;ve got three separate layers of points mapped in three different ways.\u00a0 The final challenge is to bring them all together into one layer so we can produce a map for DOC.\u00a0 Normally, one could do a spatial join, like <a href=\"http:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/analysis\/union.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Union<\/a>, or perhaps use a command like <a href=\"http:\/\/pro.arcgis.com\/en\/pro-app\/tool-reference\/data-management\/merge.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Merge<\/a>.\u00a0 The problem was that each of my layers had a different set of attributes (a different <a href=\"http:\/\/wiki.gis.com\/wiki\/index.php\/Database_schema\" target=\"_blank\" rel=\"noopener noreferrer\">schema<\/a> in database terms).\u00a0 If using something like Merge I would end up with possibly two or three different versions of similar attributes.\u00a0 This was a good place to use the <a href=\"http:\/\/desktop.arcgis.com\/en\/arcmap\/10.3\/tools\/production-mapping-toolbox\/load-data.htm\" target=\"_blank\" rel=\"noopener noreferrer\">Load <\/a>tool. With this tool, one of your layers is the target and has the attribute names that you want to maintain.\u00a0 The other layers are &#8220;loaded&#8221; into that one and differently named attributes can be mapped to the target ones.\u00a0 This allows you to retain the important ones, overlook those that aren&#8217;t needed and keep everything consistent.<\/p>\n<p>Load only works with feature classes in a geodatabase and shapefiles.\u00a0 To load addition data into an existing layer, start by right-clicking the layer name (in Catalog) and choose Load &gt; Load Data&#8230;\u00a0 A wizard then steps up through the process (what would we do without wizards?)<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2227 alignright\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load1.jpg\" alt=\"\" width=\"443\" height=\"409\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load1.jpg 443w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load1-300x277.jpg 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/a><\/p>\n<p>This first window just summaries what the tool does<\/p>\n<p>Here you set the target layer:<a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2228 alignright\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load2.jpg\" alt=\"\" width=\"444\" height=\"411\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load2.jpg 444w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load2-300x278.jpg 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/a><\/p>\n<p>Next, set the layer to be loaded:<a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2229 alignright\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load3.jpg\" alt=\"\" width=\"443\" height=\"411\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load3.jpg 443w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load3-300x278.jpg 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/a><\/p>\n<p>(We&#8217;ll have to talk about subtypes other time.)<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2230 alignright\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load4.jpg\" alt=\"\" width=\"445\" height=\"412\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load4.jpg 445w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load4-300x278.jpg 300w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/a><\/p>\n<p>This window allows us to map the attribute values from the source layer to the target layer:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2231 alignright\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load5.jpg\" alt=\"\" width=\"444\" height=\"414\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load5.jpg 444w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load5-300x280.jpg 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/a>Next, confirm that you want to load all the data or only that that are selected:<\/p>\n<p><a href=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load6.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-2232 alignright\" src=\"https:\/\/d-blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load6.jpg\" alt=\"\" width=\"444\" height=\"410\" srcset=\"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load6.jpg 444w, https:\/\/blogs.lincoln.ac.nz\/gis\/wp-content\/uploads\/sites\/3\/2018\/09\/load6-300x277.jpg 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/a>A final summary and off we go:<\/p>\n<p>Once completed, the new records are added directly into the target layer with the attributes matching up nicely. The benefit here is that the attribute names don&#8217;t have to be the same yet we can still match them up.\u00a0 This would cause us some problems when using a spatial join or a merge.<\/p>\n<p>So two (hopefully) useful things in this post &#8211; mapping points in a spreadsheet that have various different types of spatial data and use of the Load tool to standardise attributes.\u00a0 All those points on the final map look good but don&#8217;t really indicate the work that went into getting them in the right place.\u00a0 Perhaps this is a good example of <a href=\"https:\/\/www.memecenter.com\/fun\/6306705\/pay-no-attention-to-the-man-behind-the-curtain\" target=\"_blank\" rel=\"noopener noreferrer\">not paying attention to that man behind the curtain<\/a>.<\/p>\n<p><em>(Ed. &#8211; we do aim to be apolitical here at the GIS Blog, but occasionally we just can&#8217;t help ourselves.)<\/em><\/p>\n<p>C<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We look at using the Load command to add new records to a layer in this post.\u00a0 Sometimes it&#8217;s a far better option than a spatial join or a merge. We recently had a summer scholarship student looking at some mapping work for the Department of Conservation (DOC).\u00a0 Amongst the myriad of things they look [&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-2120","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/2120","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=2120"}],"version-history":[{"count":1,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/2120\/revisions"}],"predecessor-version":[{"id":4115,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/posts\/2120\/revisions\/4115"}],"wp:attachment":[{"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/media?parent=2120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/categories?post=2120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.lincoln.ac.nz\/gis\/wp-json\/wp\/v2\/tags?post=2120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}