Skip to content
/ slyr Public
forked from north-road/slyr

A Python ESRI lyr/style file converter/extracter/parser

Notifications You must be signed in to change notification settings

EmHain8/slyr

 
 

Repository files navigation

SLYR Logo

SLYR (community edition)

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/.

Build Status

Status

  • This open-source version only supports ESRI .style database files, and vector .lyr files. See https://north-road.com/slyr/ for the version which supports direct MXD file conversion, and support for raster, TIN and point cloud LYR files, and the ArcGIS Pro stylx/lyrx file types.
  • Full support for converting vector layers, including all symbology, labeling, all renderer types (unique, class breaks, bivariate, etc) and other general layer properties like scale ranges, hotlinks, and much much more.
  • Near 100% pixel perfect support for converting all fill types, line types and marker symbol types (depending on QGIS version -- for best results always use the lastest QGIS version)
  • RGB colors can be parsed, within a maximum of 1 unit difference in either the R/G/B components.
  • 100% color match for other color types, including HSV, CMYK, Grayscale, etc
  • All color ramp types can be parsed

Tools

  • bin_dump.py Converts a binary .style database row blob into a symbol and dumps the symbol properties to the console
  • style_dump.py Dumps the complete contents of an ESRI .style database, printing symbol properties to the console
  • style_to_bin.py Exports the contents of an ESRI .style database to individual .bin binary files, each containing an encoded version of a single symbol
  • style_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.

QGIS Plugin

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.

Specifications

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.

Hall of Fame

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.

About

A Python ESRI lyr/style file converter/extracter/parser

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.9%
  • Other 0.1%