Friday, 9 February 2018

symbology - SVG symbol colors differences in QGIS 2.12?


I don't understand why SVG symbols, which are colors changeable in the symbol default installation like this airplane:


enter image description here


enter image description here


whereas there symbols like the transport bus station, and lighting symbol (that i have been created in inkscape 0.91) that don't have any option to change the fill colors and the outline?


enter image description here


enter image description here



I have red Changing colours in SVG symbol using QGIS? and didn't got suitable answer.



Answer



You need to modify the content of the SVG file and an answer was given in GIS SE (How to create svg symbols that have modifiable fill color, stroke color and stroke width?) and in Add and personalise SVG symbols in QGIS (in French, Portail SIG)


Compare the "transport_bus_stop.svg" file where you can change the colors


enter image description here


In the file, the contains many parameters fill, fill_opacity, ...




And the "transport_bus_station.svg" file where you cannot change the colors, none of them.



enter image description here




Therefore if you add these tags (fill=,...) after each "" and before d=" in the file:




The result is a symbol where you can change the color, the stroke and...


enter image description here enter image description here enter image description here


The new paths of the "transport_bus_station.svg" file








No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...