This is a document describing what I had to learn to create a custom point symbol to use in QGIS. This process involved some workarounds that appear to be unique to Apple OSX 10.10.
In order to accomplish this task I needed to:
- Do some research1.
- Have QGIS installed on your computer.
- I am running version 2.8.22
- Have software capable of creating an SVG file.
- Import or draw the design that you want to use for your custom symbol.
- In my case I’m trying to create the brand of my grandfather’s ranch. Which so far looks very rough, but the possibilities are promising.
- Save the drawing out as a SVG file.
- Alter the SVG file so QGIS can control the fill color the border color and
the border width.
- Do more research5
- Open the SVG file in a text editor.
- Find the line in your saved SVG file that reads
style="fill:#4d4d4d;stroke:#000000;stroke-width:1;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- Delete that line.
- insert the following line in it’s place.
fill="param(fill) #FFF" stroke="param(outline) #000" stroke-width="param(outline-width) 1"
- Use your new marker symbol in QGIS.
- Open the Layer Properties window for a point vector layer.
- Change to the Style tab.
- Expand the single listed Marker symbol to see the Simple marker layer.
- Click to highlight the Simple marker.
- Change the Symbol layer type to SVG marker.
- Look for a text box containing a full path and file name. Click the button to the right with three dots.
- Browse to the SVG file just edited and Open it.
- Now the various attributes are available to adjust.
- Add custom SVGs to the QGIS interface.
- Collect all the SVGs you want to make available into a directory.
- Open the Options window from the Settings menu.
- Select the System tab.
- Click the Add button above the Path(s) to search for Scalable Vector Graphic (SVG) symbols list box.
- Browse to the directory where you have placed your custom SVGs.
- Click the Choose button.
- Now you will see your custom symbols as choices when you go into the SVG marker window.
Footnotes
-
StackExchange is often the first step in me learning how to do something. ↩
-
The most current OSX installer is available from Kyng Chaos. Be sure to install the packages listed under Requirements. ↩
-
Download Inkscape for OSX. ↩
-
See the InkScape forum for a discussion of the problem. I was not able to get the solutions discussed to work. I found that I could launch the executable that is hidden inside the .app bundle. If Inkscape is installed in the Applications directory, the application can be launched at the command line by typing “
/Applications/Inkscape.app/Contents/MacOS/Inkscape
”. To simplify things for myself I added that command as an item on the X11 Applications menu. So I can start InkScape by launching the X11 app installed from XQuartz, opening the Applications menu, and choosing the InkScape item I added. ↩ -
Found the basic instructions and some more details for Inkscape generated SVG files. jgrocha provided the clearest answer and the one that put it all together. ↩