﻿{"id":8703,"date":"2019-05-10T03:27:06","date_gmt":"2019-05-10T01:27:06","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=8703"},"modified":"2023-04-28T14:57:06","modified_gmt":"2023-04-28T12:57:06","slug":"conditional-formatting-of-attribute-tables-with-qgis-2-12","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/en\/conditional-formatting-of-attribute-tables-with-qgis-2-12\/","title":{"rendered":"Conditional formatting of attribute tables with QGis 2.12"},"content":{"rendered":"\n<p>Following innovations introduced by QGis version\n2.12 : as in Excel tables, now\nyou\ncan\ncontrol\nthe cells setting of the attribute table\nof a layer . \n\nNow you can apply\nconditional rules on the format implementation of\nthe attribute table. To this end , open the\nattribute table of a layer\n. On the right, you will see a new\nbutton for the conditional setting. \n\n\n\n<\/p>\n\n\n\n<!--more-->\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"556\" height=\"609\" data-attachment-id=\"8704\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/conditional-formatting-of-attribute-tables-with-qgis-2-12\/101-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/101.png?fit=556%2C609&amp;ssl=1\" data-orig-size=\"556,609\" 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=\"101\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/101.png?fit=556%2C609&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/101.png?resize=556%2C609&#038;ssl=1\" alt=\"\" class=\"wp-image-8704\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/101.png?w=556&amp;ssl=1 556w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/101.png?resize=274%2C300&amp;ssl=1 274w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nClick\non the button to open\nthe formatting panel. \n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"391\" data-attachment-id=\"8705\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/conditional-formatting-of-attribute-tables-with-qgis-2-12\/102-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/102.png?fit=630%2C391&amp;ssl=1\" data-orig-size=\"630,391\" 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=\"102\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/102.png?fit=630%2C391&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/102.png?resize=630%2C391&#038;ssl=1\" alt=\"\" class=\"wp-image-8705\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/102.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/102.png?resize=300%2C186&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>You can format\na particular\ncolumn or the entire line by selecting\nField or Complete Line . For the field, you\nmust\nindicate\nwhich\nis\nthe field where you want to apply\na\nformat condition. \n\nTo include a formatting\nrule, click the New Rule button . Then, you will\nget\nthe conditional rule configuration panel: \n\n\n\n<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"392\" data-attachment-id=\"8706\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/conditional-formatting-of-attribute-tables-with-qgis-2-12\/103-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/103.png?fit=630%2C392&amp;ssl=1\" data-orig-size=\"630,392\" 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=\"103\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/103.png?fit=630%2C392&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/103.png?resize=630%2C392&#038;ssl=1\" alt=\"\" class=\"wp-image-8706\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/103.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/103.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n\n\n<p>You can enter\na\n<strong><em>name,<\/em><\/strong> but for now, it is used nowhere\n. \n\nThe @value variable\nrepresents the value of the cell. You can\ntype directly a condition, for example\n<strong><em>@value&gt; 3.0<\/em><\/strong> or\nopen\nthe\ncondition assistant by clicking on the button <strong>\u03b5<\/strong>\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=\"630\" height=\"390\" data-attachment-id=\"8707\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/conditional-formatting-of-attribute-tables-with-qgis-2-12\/104-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/104.png?fit=630%2C390&amp;ssl=1\" data-orig-size=\"630,390\" 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=\"104\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/104.png?fit=630%2C390&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/104.png?resize=630%2C390&#038;ssl=1\" alt=\"\" class=\"wp-image-8707\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/104.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/104.png?resize=300%2C186&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nAs in all\nthe classic expressions in QGis, you can\nrefer to other fields of the table. Once the condition is entered\n, you control the setting in\nform\nassociated\nwith the lower panel : &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=\"630\" height=\"393\" data-attachment-id=\"8708\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/conditional-formatting-of-attribute-tables-with-qgis-2-12\/105-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/105.png?fit=630%2C393&amp;ssl=1\" data-orig-size=\"630,393\" 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=\"105\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/105.png?fit=630%2C393&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/105.png?resize=630%2C393&#038;ssl=1\" alt=\"\" class=\"wp-image-8708\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/105.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/105.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>The drop-down menu presents\nsome\npre-established setting options. <\/p>\n\n\n\n<p>You can control\nthe background colors and characters, add an icon\nat\nthe beginning of the cell ( from the QGis characters ), and control the formatting\nand the characters font. \n\nFor a single column you\ncan\nenter\nmany\nimplementation\nformatting rules. In the following example, the wave heights are\nclassified\nin\nthree groups , each with a different formatting.. The column <em>hour<\/em>\nis\nclassified\nto put in evidence day and night .\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=\"630\" height=\"392\" data-attachment-id=\"8709\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/en\/conditional-formatting-of-attribute-tables-with-qgis-2-12\/106-4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/106.png?fit=630%2C392&amp;ssl=1\" data-orig-size=\"630,392\" 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=\"106\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/106.png?fit=630%2C392&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/106.png?resize=630%2C392&#038;ssl=1\" alt=\"\" class=\"wp-image-8709\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/106.png?w=630&amp;ssl=1 630w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2019\/05\/106.png?resize=300%2C187&amp;ssl=1 300w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p><strong>Warning: the<\/strong> <strong>formatting<\/strong> <strong>is<\/strong>\n<strong>saved<\/strong> <strong>in<\/strong> <strong>the<\/strong> <strong>QGis<\/strong>\n<strong>project<\/strong> <strong>.<\/strong> <strong>If<\/strong> <strong>you<\/strong>\n<strong>open<\/strong> <strong>the table<\/strong> <strong>in<\/strong> <strong>a<\/strong><strong>nother<\/strong> <strong>project,\nit is not taken into account. <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following innovations introduced by QGis version 2.12 : as in Excel tables, now you can control the cells setting of the attribute table of a layer . Now you can apply conditional rules on the format&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-8703","post","type-post","status-publish","format-standard","hentry","category-non-classe-en"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-2gn","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8703","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=8703"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/8703\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=8703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=8703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=8703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}