﻿{"id":8747,"date":"2019-05-17T03:31:59","date_gmt":"2019-05-17T01:31:59","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=8747"},"modified":"2019-05-17T06:15:58","modified_gmt":"2019-05-17T04:15:58","slug":"how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/","title":{"rendered":"How to change your geometries automatically in relation to a QGis 2.12 reference"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One of the recurrent problems regarding the management of the geographical layers\nresults\nfrom the differences between the layer entities, depending\non their origin . The\nsame layer produced by two different\nsources will have slight digitalisation differences.\nBut the term &nbsp;\u201cslight\n\u00a0\u00bb does not apply only to our\nvisual perception . In the case of our\nGIS\nsoftware , two entities with some shifted points\n, are as different as two entities\nlocated at the antipodes. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The usual solution is to\ntake a layer as\nreference\nand applying spatial analysis operators to recover\nquite\npoorly the attributes of the other \u00a0\u00bb similar \u00a0\u00bb layers .\n<\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"wp-block-paragraph\">Anyway! &nbsp;In\nQGis 2.12 you have a new tool\nthat allows you to modify the geometries of \u00ab\u00a0similar \u00a0\u00bb layers to\nmatch them exactly with the layer you\nhave\nselected\nas\nreference\n. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&rsquo;s look &nbsp;this tool with a\nsimple\nexample . \n\nLet\u2019s take as example\nthe Corine Land Cover layer. \n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"166\" data-attachment-id=\"8748\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/171-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/171.png?fit=300%2C166&amp;ssl=1\" data-orig-size=\"300,166\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"171\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/171.png?fit=300%2C166&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/171.png?resize=300%2C166&#038;ssl=1\" alt=\"\" class=\"wp-image-8748\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">This will be our reference\nlayer. \n\nSuppose now that we receive\na\nlayer\nmade from Corine Land Cover containing new data :\n\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"167\" data-attachment-id=\"8749\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/172-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/172.png?fit=300%2C167&amp;ssl=1\" data-orig-size=\"300,167\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"172\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/172.png?fit=300%2C167&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/172.png?resize=300%2C167&#038;ssl=1\" alt=\"\" class=\"wp-image-8749\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe\nred polygon is our\nnew layer . If we look in\ndetail, we see that the geometry is not exactly the same :\n&nbsp;\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"182\" data-attachment-id=\"8750\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/173-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/173.png?fit=300%2C182&amp;ssl=1\" data-orig-size=\"300,182\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"173\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/173.png?fit=300%2C182&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/173.png?resize=300%2C182&#038;ssl=1\" alt=\"\" class=\"wp-image-8750\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">To correct this problem\n, we will use a new plugin available in QGis version 2.12:\n<strong><em>snapping geometries.<\/em><\/strong> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You have to activate\nit because the plugin is installed automatically\nwith version 2.12 but it is not activated .\n\n\nClick on the <strong><em>Extensions<\/em><\/strong>\nmenu <strong><em>-&gt;<\/em><\/strong><strong><em>Manage<\/em><\/strong><strong><em>\/ Install Extensions<\/em><\/strong>\nto open\nthe window of the extension manager: \n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"125\" data-attachment-id=\"8751\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/174-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/174.png?fit=300%2C125&amp;ssl=1\" data-orig-size=\"300,125\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"174\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/174.png?fit=300%2C125&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/174.png?resize=300%2C125&#038;ssl=1\" alt=\"\" class=\"wp-image-8751\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Check the box in front of <strong><em>Snapping\ngeometries.<\/em><\/strong> \n\nTo open the plugin window,\nclick the <strong><em>Vector<\/em><\/strong> menu <strong><em>-&gt;<\/em><\/strong><strong><em>Geometry<\/em><\/strong><strong><em>Tools<\/em><\/strong><strong><em>-&gt;<\/em><\/strong><strong><em>Snap<\/em><\/strong><strong><em>geometries<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"131\" data-attachment-id=\"8752\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/175-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/175.png?fit=300%2C131&amp;ssl=1\" data-orig-size=\"300,131\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"175\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/175.png?fit=300%2C131&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/175.png?resize=300%2C131&#038;ssl=1\" alt=\"\" class=\"wp-image-8752\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThe\nconfiguration window opens : &nbsp;\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"218\" data-attachment-id=\"8753\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/176-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/176.png?fit=300%2C218&amp;ssl=1\" data-orig-size=\"300,218\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"176\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/176.png?fit=300%2C218&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/176.png?resize=300%2C218&#038;ssl=1\" alt=\"\" class=\"wp-image-8753\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>input Vector<\/em><\/strong><strong><em> layer<\/em><\/strong> corresponds to the layer where\nyou want to correct the geometry .\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong><em>reference<\/em><\/strong> <strong><em>layer<\/em><\/strong>\nis\nthe layer that will assume the entities correct geometry.\n<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In <strong><em>Maximum<\/em><\/strong> <strong><em>snap<\/em><\/strong>\n<strong><em>distance<\/em><\/strong> &nbsp;enter\nthe distance from which you do not want the geometry\nto\nbe corrected . In our\nexample,\nwe will look for points in the reference geometry with a\ndistance of 100 meters from the geometry to be corrected . <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can correct\ndirectly\nthe input layer ( always not\nrecommended ) or create a new\nlayer ( always advised ). \n\nClick on Launch, the corrected layer is loaded\nin\nthe cartographic window :\n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"165\" data-attachment-id=\"8754\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/177-3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/177.png?fit=300%2C165&amp;ssl=1\" data-orig-size=\"300,165\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"177\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/177.png?fit=300%2C165&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/177.png?resize=300%2C165&#038;ssl=1\" alt=\"\" class=\"wp-image-8754\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The new polygon (purple) corresponds exactly to the\npolygon of the reference layer, while keeping its\nattribute table . \n\nLet &lsquo;s leave aside the example and see\nwhat\nthe plugin does: \n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"300\" height=\"212\" data-attachment-id=\"8755\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/how-to-change-your-geometries-automatically-in-relation-to-a-qgis-2-12-reference\/178-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/178.png?fit=300%2C212&amp;ssl=1\" data-orig-size=\"300,212\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"178\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/178.png?fit=300%2C212&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/178.png?resize=300%2C212&#038;ssl=1\" alt=\"\" class=\"wp-image-8755\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For nodes that are in the same locations in both\ngeometries\n-&gt; no action . <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a node that is not exactly in the same location ( <em>Displaced\nnode<\/em> in the figure), but in\nthe search radius defined in\nthe setting window <em>(Snap area<\/em> of the figure) -&gt; movement of the\ngeometry node to locate the correct exactly at the location of\nthe reference geometry. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a node present\nin\nthe geometry to correct but which has no\ncorrespondence in the reference geometry\nin\nthe search radius defined in\nthe setting ( <em>Extra node<\/em> ) -&gt; no action , the nodes will\nkept\nin\ngeometry corrected . <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For nodes of the reference layer which have no correspondence\nin\nthe geometry to be corrected (missing node), but which are in\nthe search area (Snap area) -&gt; addition of these points in the geometry\ncorrected\n. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the recurrent problems regarding the management of the geographical layers results from the differences between the layer entities, depending on their origin . The same layer produced by two different sources will have slight&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"give_campaign_id":0,"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1260],"tags":[],"class_list":["post-8747","post","type-post","status-publish","format-standard","hentry","category-non-classe-en"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-2h5","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/comments?post=8747"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8747\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=8747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=8747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=8747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}