This is a follow up to my previous post on converting ESRI/ArcGIS styles and symbology for use in QGIS. Thanks to Tom Armitage for reminding me of Nyall Dawson’s SLYR plugin for converting ESRI styles files to QGIS XML styles. I don’t know Nyall but want to give him a big thank you for developing such a useful tool, making it open source and sharing it. Check out Nyall’s North Road website - he has some very interesting tools in the works related to getting ESRI and QGIS to play nice with each other.
Anyway, this post is my testing of the SLYR tool to convert ESRI *.style files into QGIS XML styles. My workflow is below, and my setup is the following: Windows 10 pro OS, QGIS 3.6 and ArcGIS 10.6.1 (for access to ESRI style files).
Download SLYR Tool from GitHub
Go to SLYR on GitHub and download and unzip to your hard drive.
Once unzipped, copy the slyr folder to your QGIS plugins directory (e.g. C:\Users\<username>\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins)
Important Note for Windows OS
For Windows OS users, you will also need to have the mdbtools installed for SLYR tools to work. This is noted on SLYR readme page. Download and extract mdbtools-win - the SLYR plugin will need access to the mdbtools, which you will do in the next step. There’s really no installation for the mdbtools-win. All you need to do is download and extract the files to your hard drive (e.g. C:\mdbtools-win) then tell the SLYR plugin where to the mdbtools are located (see step 2 below).
Activate and Set Option for SLYR plugin
Open QGIS, go to Plugins menu >> Manage and Install Plugins >> Installed >> Check the box next to SLYR
2. In the Processing Toolbox panel (if you don’t see the panel, go to Processing menu >> Toolbox), click the Options button. In the Options window, go to Processing and under Providers, find SLYR and set the path to your mdbtools folder (that you downloaded and extracted earlier). Here, you need to tell SLYR where the mdbtools are so it can access it.
Convert ESRI Styles to QGIS XML
In the Processing Toolbar, double click on Convert ESRI Styles to QGIS XML to open the dialog window
In the dialog window: Input your parameters. Below are the options I used.
Note: I tried the SVG options and it seems to convert ok. But when I try to open or view the svg files I got “attributes construct error”
Here’s a look at the converted pictures as pngs and error log (saved as csv) for symbols that couldn’t be converted
Import the Converted QGIS XML into QGIS Style Manager
Open QGIS style manager (Settings >> Style Manager) >> Import from File >> import the converted *.xml (e.g. ESRI.xml). Optionally, add additional tags. Then Select All Symbols >> Import
Here’s a look at what the ESRI.xml file look like - ESRI Default Markers
For comparison for how well the conversion worked, here’s what the ESRI.style look like. I think he SLYR tool does a great job of converting ESRI styles to QGIS XML.
Convert ESRI Style to GPL Color Palette
I’ve also tried the SLYR script for converting ESRI style to GPL Color Palette and it works great as well. Here’s a look at a sample.
Converting ESRI LYR to QGIS XML
You can also convert an ESRI .lyr file as well - although indirectly. You first will need to save the symbols in the .lyr file into a custom set of style (i.e. .style) before using the SLYR tool. This is what I did with the USGS TNM symbols - I created my own style file then converted them with the SLYR tool to QGIS XML.
Here’s my custom USGSTNM.style file created using the official USGS TNM map template in ArcGIS.
Here’s the converted style file as imported into QGIS - looks great and is exactly what I wanted.
Sample QGIS XML files available for download
I’ve converted some ESRI style files to QGIS XML files if anyone is interested in testing/using them. The sample styles are listed below and are available for download on my GitHub page.I make no guarantee of any kind to your use of these files.
That’s it for this post. Thanks as always for reading. Until next time.
Update (4/11/2019): Brett Carlock has a converted a set of corresponding GPL files for use in QGIS. Please see his GitHub page to download the gpl files. Thanks, Brett!