A QGIS plugin for extraction, parsing, and conversion of ESRI .lyr
, .mxd
and .style
files.
This repo contains the community, open-source version of SLYR, which lags in features and capabilities from the full SLYR version. Read more about the full version and how you can obtain it at https://north-road.com/slyr/.
bin_dump.py
Converts a binary .style
database row blob into a symbol and dumps the symbol properties to the consolestyle_dump.py
Dumps the complete contents of an ESRI .style
database, printing symbol properties to the consolestyle_to_bin.py
Exports the contents of an ESRI .style
database to individual .bin
binary files, each containing an encoded version of a single symbolstyle_to_qgis_xml.py
Converts the contents of an ESRI .style
database to a QGIS 3.x Style .xml
file, ready for importing direct into your QGIS style library (requires QGIS 3.x)Style parsing tools require the command line mdbtools
for handling the .style
database files. Binaries of these can be downloaded from https://github.com/lsgunth/mdbtools-win, and they should be extracted and available in the Windows path. Alternatively, you can extract them to any folder and then setup the correct path to that folder through the Settings -> Options -> SLYR panel.
LYR parsing tools do not require any additional dependencies.
SLYR also functions as a QGIS plugin (for QGIS >= 3.4). The community (unlicensed) version of the plugin is available via the standard QGIS plugins repository, so you can install it directly from within QGIS itself.
The plugin adds a new group to the Processing Toolbox for "SLYR", containing tools for conversion of style databases to QGIS symbol styles. Note that Windows users will first need to setup the path to the mdbtools binaries via Options - Processing - Providers - SLYR. There's also an algorithm for converting color palettes stored in style files to the standard GPL color palette text format.
The plugin throws warnings (and optionally creates a report) containing properties which cannot be translated to QGIS symbology. If you get these warnings, PLEASE consider sponsoring the feature development within QGIS itself! Everyone benefits, and you'll usually be pleasantly suprised at how inexpensive this can be! Just shoot us an email to [email protected] to discuss.
Some description of the .style
binary format can be found in specs.md, although the most up-to-date reference is the Python parsing code itself.
SLYR wouldn't be possible without direct financial support for its development. The following organisations have directly contributed to SLYR development, and are deserving of gratitude!
And hey, if you want to see slyr improved, why not consider financially supporting its development? Drop me a line at [email protected] to discuss.
Nothing to request, thanks for the logo :)
When converting style files the resulting xml loses non-latin characters.
Qgis 3.18.3 SLYR 4.0.6
OS: Windows 10 version 21H2 (English) Regional settings: Latvian System Locale: Latvian ("Beta: Use Unicode UTF-8 for worldwide language support" - disabled)
Current QGIS and Current OSX SLYR plugin is installed
QGIS version: 3.26.2-Buenos Aires QGIS code revision: b0f8302dbc Qt version: 5.15.2 Python version: 3.9.5 GDAL version: 3.3.2 GEOS version: 3.9.1-CAPI-1.14.2 PROJ version: Rel. 8.1.1, September 1st, 2021 PDAL version: 2.3.0 (git-version: Release) SLYR (community edition) version: 4.0.3 Algorithm started at: 2022-09-10T16:27:00 Algorithm 'Convert MXD/MXT to QGS' starting… Input parameters: { 'INPUT' : '/Users/Shared/GIS Best Files/Vegetation/SVTM extant and pre 1750/NSW C1.1 M1 Aug 22/vegetation_svtm_nsw_extant_pct_quickview/SVTM_NSW_Extant_PCT.mxd', 'OUTPUT' : 'TEMPORARY_OUTPUT' }
then nothing happens
same with .lyr
tried it on a few .lyr and mxb
Great work Thanks
Nick
When I double-click the tool,An error message appears Python error: An error has occurred while executing Python code: See message log (Python Error) for more details. ``` UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 58: illegal multibyte sequence Traceback (most recent call last): File "C:\PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins\processing\gui\ProcessingToolbox.py", line 241, in executeAlgorithm ok, message = alg.canExecute() File "C:\Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\slyr_community\qgis_plugin\algorithms\style_to_xml.py", line 108, in canExecute if not Extractor.is_mdb_tools_binary_available(): File "C:\Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\slyr_community\bintools\extractor.py", line 149, in is_mdb_tools_binary_available for line in proc.stdout: UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 58: illegal multibyte sequence
Python version: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] QGIS version: 3.22.6-Białowieża Białowieża, b6f33b1a
Python Path: C:\Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OpenTopography-DEM-Downloader C:/PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS32~1.6/apps/qgis-ltr/./python/plugins C:\Program Files\QGIS 3.22.6\bin\python39.zip C:\PROGRA~1\QGIS32~1.6\apps\Python39\DLLs C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib C:\Program Files\QGIS 3.22.6\bin C:\PROGRA~1\QGIS32~1.6\apps\Python39 C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages\GDAL-3.4.2-py3.9-win-amd64.egg C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages\win32 C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages\win32\lib C:\PROGRA~1\QGIS32~1.6\apps\Python39\lib\site-packages\Pythonwin C:/Users//AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users*\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\HCMGIS/forms C:\Users*\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\mmqgis/forms ```
Hello, I got an UnicodeDecodeError error when i use the 'Convert Esri style to QGIS style xml' of SLYR in QGIS. the detial information of error is: 2022-04-13T19:47:46 WARNING Traceback (most recent call last): File "D:\OSGeo4W/apps/qgis-ltr/./python/plugins\processing\gui\ProcessingToolbox.py", line 241, in executeAlgorithm ok, message = alg.canExecute() File "C:\Users/yiwuz/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\slyr_community\qgis_plugin\algorithms\style_to_gpl.py", line 81, in canExecute if not Extractor.is_mdb_tools_binary_available(): File "C:\Users/yiwuz/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\slyr_community\bintools\extractor.py", line 149, in is_mdb_tools_binary_available for line in proc.stdout: UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 58: illegal multibyte sequence
QGIS veriosn: 3.16.16 Python:3.9 Platform:windows 10 mdbtools:https://github.com/lsgunth/mdbtools-win SLYR: installed from QGIS plugin. I have set 'Settings -> Options -> SLYR -> set-MDB-tools-path'.
Hello, I cannot get slyr to find the mdb-export binary. I get the following message:
This algorithm cannot be run :-( The MDB tools "mdb-export" utility is required to convert .style databases. Please setup a path to the MDB tools utility in the Settings - Options dialog, under the SLYR tab.
I have gone to Settings -> Options -> SLYR -> set-MDB-tools-path and have set it to /usr/bin
confirm that mdb-tools is on that path: ``` which mdb-export /usr/bin/mdb-export
find / -name "mdb-export" /usr/bin/mdb-export ```
platform specs: Kubuntu 20.04, kernel 5.4.0-96-generic on 64-bit Intel i7; QGIS 3.22.3 successfully downloaded slyr plugin to QGIS - slyr appears in processing tools installed mdb-tools via apt
I would greatly appreciate any help! I'm stumped
To install, download the zip release below, and then install via the Plugins -> Manage and Install Plugins > Install from ZIP tab.
Testing feedback is sought and very welcome -- just file issues on https://github.com/nyalldawson/slyr/issues with a detailed description of any issues you encounter.