﻿{"id":3122,"date":"2016-04-05T10:06:00","date_gmt":"2016-04-05T09:06:00","guid":{"rendered":"http:\/\/www.sigterritoires.fr\/?p=3122"},"modified":"2016-04-05T10:06:00","modified_gmt":"2016-04-05T09:06:00","slug":"comment-rendre-un-symbole-svg-modifiable-couleurtrait-dans-qgis","status":"publish","type":"post","link":"https:\/\/www.sigterritoires.fr\/index.php\/comment-rendre-un-symbole-svg-modifiable-couleurtrait-dans-qgis\/","title":{"rendered":"Comment rendre un symbole svg modifiable (couleur,trait) dans QGis"},"content":{"rendered":"<p>Si vous importez ou cr\u00e9ez des symboles svg pour les utiliser dans QGis, vous aurez remarqu\u00e9 que les options de changement de couleur et contour de ces symboles sont d\u00e9sactiv\u00e9s dans QGis. En effet, ces param\u00e8tres sont cod\u00e9s en dur dans le fichier svg et, si vous voulez d\u00e9cliner votre symbole en plusieurs couleurs, vous \u00eates oblig\u00e9 d&rsquo;en cr\u00e9er autant de symboles que de couleurs souhait\u00e9es.<\/p>\n<p>Voici une petite astuce qui vous fera gagner du temps, en ne cr\u00e9ant qu&rsquo;un seul symbole et en activant les contr\u00f4les de couleur et contour dans QGis pour ce symbole.<!--more-->Prenons par exemple le symbole suivant<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1.png\" rel=\"attachment wp-att-3123\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3123\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-rendre-un-symbole-svg-modifiable-couleurtrait-dans-qgis\/svg1\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1.png?fit=1114%2C600&amp;ssl=1\" data-orig-size=\"1114,600\" 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=\"svg1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1.png?fit=640%2C345&amp;ssl=1\" class=\"aligncenter size-large wp-image-3123\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1-1024x552.png?resize=640%2C345\" alt=\"chargement d'un symbole svg dans qgis\" width=\"640\" height=\"345\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1.png?resize=1024%2C552&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1.png?resize=300%2C162&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1.png?resize=768%2C414&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg1.png?w=1114&amp;ssl=1 1114w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Le bloc de modification de couleur et bordure est inactif. La couleur des fl\u00e8ches est noire car telle est la d\u00e9finition en dur contenue dans le fichier svg.<\/p>\n<p>Nous allons \u00e9diter simplement le fichier svg pour changer cet \u00e9tat de choses. La modification \u00e9trant tr\u00e8s simplke, vous pouvez utiliser n&rsquo;importe quel \u00e9diteur de texte.<\/p>\n<p>Ouvrez le fichier:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2.png\" rel=\"attachment wp-att-3124\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3124\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-rendre-un-symbole-svg-modifiable-couleurtrait-dans-qgis\/svg2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2.png?fit=1183%2C327&amp;ssl=1\" data-orig-size=\"1183,327\" 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=\"svg2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2.png?fit=640%2C177&amp;ssl=1\" class=\"aligncenter size-large wp-image-3124\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2-1024x283.png?resize=640%2C177\" alt=\"contenu du fichier svg\" width=\"640\" height=\"177\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2.png?resize=1024%2C283&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2.png?resize=300%2C83&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2.png?resize=768%2C212&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg2.png?w=1183&amp;ssl=1 1183w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Apr\u00e8s les lignes d&rsquo;ent\u00eate, vous trouvez la balise <em><strong>&lt;path<\/strong><\/em> et le d\u00e9but de la d\u00e9finition du symbole <em><strong>d=<\/strong><\/em><\/p>\n<p>Entre les deux, vous pouvez trouver des param\u00e8tres tels que <em><strong>style=\u00a0\u00bbfill:#000000&Prime;<\/strong><\/em> ou d&rsquo;autres.<\/p>\n<p>L&rsquo;astuce est de remplacer tout ce qui se trouve entre &lt;path et d= par le texte suivant<\/p>\n<p><em><strong>fill=\u00a0\u00bbparam(fill) #FFF\u00a0\u00bb stroke=\u00a0\u00bbparam(outline) #000&Prime; stroke-width=\u00a0\u00bbparam(outline-width) 1&Prime;<\/strong><\/em><\/p>\n<p>Comme on le voit dans l&rsquo;image suivante:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3.png\" rel=\"attachment wp-att-3125\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3125\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-rendre-un-symbole-svg-modifiable-couleurtrait-dans-qgis\/svg3\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3.png?fit=1170%2C310&amp;ssl=1\" data-orig-size=\"1170,310\" 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=\"svg3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3.png?fit=640%2C169&amp;ssl=1\" class=\"aligncenter size-large wp-image-3125\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3-1024x271.png?resize=640%2C169\" alt=\"fichier svg modifi\u00e9\" width=\"640\" height=\"169\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3.png?resize=1024%2C271&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3.png?resize=300%2C79&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3.png?resize=768%2C203&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg3.png?w=1170&amp;ssl=1 1170w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Si vous utilisez ce nouveau fichier pour le style de votre couche, vous verrez que les options qui \u00e9taient inactives sont maintenant disponibles:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4.png\" rel=\"attachment wp-att-3126\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3126\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-rendre-un-symbole-svg-modifiable-couleurtrait-dans-qgis\/svg4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4.png?fit=1118%2C615&amp;ssl=1\" data-orig-size=\"1118,615\" 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=\"svg4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4.png?fit=640%2C352&amp;ssl=1\" class=\"aligncenter size-large wp-image-3126\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4-1024x563.png?resize=640%2C352\" alt=\"nouveau symbole svg modifiable\" width=\"640\" height=\"352\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4.png?resize=1024%2C563&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4.png?resize=300%2C165&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4.png?resize=768%2C422&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg4.png?w=1118&amp;ssl=1 1118w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a>Le symbole est maintenant blanc par d\u00e9faut avec des contours noirs, mais vous pouvez les modifier, ainsi que les \u00e9paisseurs:<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg5.png\" rel=\"attachment wp-att-3127\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3127\" data-permalink=\"https:\/\/www.sigterritoires.fr\/index.php\/comment-rendre-un-symbole-svg-modifiable-couleurtrait-dans-qgis\/svg5\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg5.png?fit=934%2C221&amp;ssl=1\" data-orig-size=\"934,221\" 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=\"svg5\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg5.png?fit=640%2C151&amp;ssl=1\" class=\"aligncenter size-full wp-image-3127\" src=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg5.png?resize=640%2C151\" alt=\"r\u00e9sultat de la modification du symbole svg\" width=\"640\" height=\"151\" srcset=\"https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg5.png?w=934&amp;ssl=1 934w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg5.png?resize=300%2C71&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.sigterritoires.fr\/wp-content\/uploads\/2016\/04\/svg5.png?resize=768%2C182&amp;ssl=1 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Si vous importez ou cr\u00e9ez des symboles svg pour les utiliser dans QGis, vous aurez remarqu\u00e9 que les options de changement de couleur et contour de ces symboles sont d\u00e9sactiv\u00e9s dans QGis. En effet, ces param\u00e8tres&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":[152,62],"tags":[320,58,41,319],"class_list":["post-3122","post","type-post","status-publish","format-standard","hentry","category-outils_divers","category-qgis-2","tag-modifier","tag-qgis","tag-svg","tag-symbole"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p6XU0A-Om","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3122","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=3122"}],"version-history":[{"count":0,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/posts\/3122\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/media?parent=3122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/categories?post=3122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigterritoires.fr\/index.php\/wp-json\/wp\/v2\/tags?post=3122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}