SLYR: the ESRI LYR and MXD to QGIS converter

While the use of open-source software is widely accepted and respected within the geospatial industry, organisations are often restricted in their ability to completely embrace these powerful new tools due to the need to utilise existing projects and data from proprietary software vendors.

This is particularly an issue with the ESRI software suite, where organisations may have hundreds (or thousands!) of existing map documents and layer styles which they currently cannot utilise outside of the ESRI software ecosystem. Unfortunately, ESRI software is often prohibitively expensive, yet organisations cannot completely transition to alternative software packages due to their dependence on accessing their pre-existing work.

Furthermore, many providers of spatial data only include ESRI specific layer formatting files with their data supplies. This leaves users with no means of utilising these official pre-defined styles in non-ESRI tools.

The good news: North Road have been conducting extensive research and development over the past 12 months, and are pleased to offer a product which allows use of these previously restricted formats within the open-source software environment!

This page describes our SLYR conversion tool, what we have planned, and how you can access the tool by becoming a project sponsor.

Table of Contents

SLYR functionality

The conversion tool targets three ESRI specific binary file formats:

  • “.style” databases: These database files store libraries of ESRI symbols (markers, lines, and fills), alongside other associated style objects such as color palettes, color ramps, legend presets, and text formats. Style databases also support library “tags”, allowing symbols to be organized by arbitrary, user-defined tag strings. SLYR supports conversion of .style marker, line, and fill symbols, color palettes, and color ramps to their QGIS equivalent file format (libraries containing symbols and color ramps are stored as .XML style library files, and color palettes are stored using the standard “.GPL” palette format).
  • “.lyr” files: These files contain both a layer’s definition (including the file or database path to the layer’s source data) and the associated symbology and layer settings to apply to that layer. LYR files can be added to an ArcMap document to automatically load and style data in a single step. Within QGIS, the “QLR” file format offers an equivalent functionality. SLYR supports both direct read of vector LYR files and conversion of LYR to QLR. (Support for raster layer handling is underway — see below)
  • “.mxd” documents: These map document files contain groups of layers, their styles, and print layouts for exporting the layers. The QGIS equivalent is a “QGS” project file. (Support for mxd document handling is available in beta form — see below)

All three formats are proprietary, ESRI specific binary formats. No specifications describing the formats have been publicly released, and the only currently available tools for working with these formats require access to an ArcGIS installation. Additionally, current tools are severely limited in their conversion functionality and require outdated ArcGIS software installs.

North Road have successfully reverse engineered these binary formats and created custom tools for extracting and converting these file types. These tools are available in our QGIS “SLYR” plugin, which is available for QGIS versions 3.4 and later.

The SLYR plugin offers rich integration within the QGIS application, by adding common functionality like support for direct drag and drop of the ESRI style and LYR formats to the QGIS application window.

SLYR also exposes the style and LYR conversion tools via QGIS “Processing Algorithms“. Exposing these tools as Processing algorithms allows users to utilise the conversion functionality as steps in QGIS graphical models, batch processes, and from PyQGIS scripts and other plugins, greatly improving their flexibility and allowing them be incorporated into wider workflows.

Open Source Pledge

North Road are passionate believers in the power of open source software, and have a history of extensive contributions to the open-source geospatial software stack! While we fully intend to make the SLYR plugin open source and freely publish the style/LYR/MXD conversion tools, we also require financial backing in order to support the significant time required to completely reverse engineer these file formats and develop quality tools supporting their use outside of the ESRI software ecosystem. Accordingly, the specifications and file parsing library will initially be closed source and available to SLYR license holders only. Exactly six months after we hit the pledged sponsorship levels for each stage of the project (see below), we will open-source that component of the code and freely publish the results under a permissive open source license.

Purchasing SLYR

A SLYR license is a one-time cost, which covers unlimited use within a single physical office location.

  • International (non-Australian) entities: €1950
  • Australian entities: AU$3000 (+10% GST)

We are currently running a discount rate for orders placed during September or October 2019:

  • International (non-Australian) entities: €1000
  • Australian entities: AU$1600 (+10% GST)

To purchase the SLYR plugin, email info@north-road.com for further details.

What License Holders Get

Early Access to Tools

License holders are given immediate access to both the current stable SLYR plugin and any upcoming beta versions of the plugin. License holders receive on-going access to the latest version of the plugin as work continues on the remaining project stages. (Non-license holders must wait until the open-source version of the tools are released which, as described under the “Open Source Pledge” section, occurs 6 months after each project stage is completed).

Becoming a project sponsor gives an organisation unlimited access to the latest version of the tools for a single physical workplace.

Priority Support

Additionally, license holders have access to priority support for the conversions tools from North Road.

Unfortunately, the three binary formats are heavily dependent on the software version they have been created with, and accordingly it is not uncommon to encounter versions of the .style/LYR/MXD files which have not yet been completely reverse engineered and supported by the SLYR conversion tools.

License holders will have access to priority support, allowing them to send unsupported file versions to North Road for analysis and inclusion in the conversion tools ASAP.

The support available to license holders will also extend to assistance with use and installation of the software.

SLYR symbology conversion functionality

SLYR currently offers conversion of a large range of ESRI symbol types to their QGIS symbology equivalent:

  • Marker symbols: simple markers, arrow markers, character markers and picture markers
  • Line symbols: simple lines, cartographic lines, marker lines and hash lines
  • Fill symbols: simple fills, line fills, marker fills, picture fills and gradient fills

The SLYR plugin exposes support for ESRI “.style” databases within the QGIS browser panel. When the plugin is enabled, .style files are shown when navigating through the browser. Double clicking these files opens a “style browser” window showing the symbols and color ramps embedded inside that .style file, allowing users to save the converted symbols to their local symbol libraries:

SLYR also adds some Processing tools for working with .style databases, allowing symbol conversion to be executed in batches or included within graphical models:

Planned enhancements to symbology conversion

Expected implementation date: June 30, 2019

In order to further improve the symbol conversion process, we plan on adding support for more symbol types and properties to SLYR:

  • Support for conversion of fill symbol outlines with offsets, decorations or dashed line templates. Currently only simple outline styles for fill symbols are supported.
  • Conversion of decoration markers at positions other than the start and end of lines
  • Support for picture fill and marker “transparent color”, and “flipped foreground/background colors” settings

Unsupported symbol types

The following symbol types are not supported by SLYR, as their are no equivalent QGIS symbol types available to convert to:

  • 3D symbols
  • Marker halos
  • Picture line symbols
  • Random marker fills
  • Rectangular gradient fills

When support for these missing features is added to the QGIS application itself, the SLYR plugin will be upgraded to add conversion support for them.

Open source pledge progress : 5 of 11 sponsors 

5/11

As described in Open Source Pledge, we will release the SLYR symbology conversion functionality under an open source license 6 months after reaching 11 project sponsors.

Vector LYR file conversion functionality

The SLYR plugin adds direct support for working with vector LYR files within QGIS, allowing automatic conversion of  common layer properties such as layer paths and symbology. LYR conversion does not rely on any external tools, and is not dependent on installation of any ArcGIS products.

When opening LYR files, SLYR automatically converts the following layer properties to their QGIS equivalent:

  • Source layer file paths
  • Layer visibility, including scale visibility ranges
  • Layer transparency
  • Simple, unique value, and ranges renderers
  • Marker rotation and size by attribute
  • Label settings

When installed, SLYR offers tight integration of LYR file handling within QGIS, including:

  • Dragging and dropping LYR files onto the main QGIS window automatically converts the LYR file in the background and adds the resultant layer to the current project, styled using the symbology and settings from the original LYR file.
  • LYR files are shown within the QGIS browser panel. Double clicking these files converts the LYR file in the background, and loads the corresponding data file into the current project, styled using the symbology and settings from the LYR file.
  • Right-clicking a LYR file in the browser allows for users to explore and extract any symbols found within that file, or convert the LYR file to a QGIS “QLR” file.

LYR conversion Processing algorithms

Additionally, SLYR adds several Processing algorithms for working with LYR file conversion. Like all QGIS Processing algorithms, these can be used within QGIS graphical models, batch processing modes, and in external scripts.

“Set Style from LYR File” Algorithm

This algorithm sets an existing QGIS vector layer’s style to match the style from a selected LYR file, replacing the layer’s current renderer in-place.

On launching the algorithm, users are asked to select a layer from the current project and a corresponding LYR file. The SLYR tool extracts the renderer settings from that file, including conversion of unique value and ranges renderers, and applies it to the selected project layer.

“LYR to QLR” Algorithm

This algorithm directly converts a LYR file to the corresponding QGIS QLR file. QLR files are a direct QGIS equivalent of ESRI LYR files, storing both a layer’s source and symbology.

“LYR to QGIS Style XML” Algorithm

This algorithm creates a QGIS Style XML database containing all symbols found within a specified LYR file. It allows users to select a LYR file, and obtain a “dump” of all symbols found within that file. The resultant QGIS Style XML database can be opened within the QGIS Style Manager and the symbols saved to the local style database.

Open source pledge progress : 0 of 30 sponsors (plus requirements for symbology conversion above)

0/30

As described in Open Source Pledge, we will release the SLYR vector LYR conversion functionality under an open source license 6 months after reaching 30 additional project sponsors.

Beta functionality: MXD document conversion

Beta support available now! Expected full implementation date: October 30, 2019

SLYR has beta support support for automatic ESRI MXD map document conversion. The MXD document format is an ESRI-specific format which includes sets of multiple layers (with their original styles), legend groups, and print layouts.

Planned functionality for working with MXD documents includes:

“Add Layers from MXD” algorithm

A new algorithm will be added to the Processing toolbox, allowing users to select an input MXD document. The algorithm will extract all layers from the document, and add them to the current project, keeping their original symbology from the MXD intact (with the exclusions already described in Stages 1-3).

“Extract Print Layouts from MXD” algorithm

This new algorithm will accept an MXD document input, and extract all print layouts contained within that document into either the current project or to QGIS QPT layout template files.

“Convert MXD to QGS” algorithm

This final algorithm is the “holy grail”! It will allow direct conversion of MXD files to their equivalent QGS project file, keeping as much of the original MXD settings as are translatable to QGIS project settings.

MXD Integration into QGIS application

Finally, we will implement tight integration of MXD document handling within the QGIS interface. Specifically,

  • Support will be added allowing drag and drop of MXD documents to the QGIS window. This will convert the document in the background and open as an equivalent QGIS project.
  • MXD documents will be shown within the QGIS browser panel, allowing them to be directly opened as new projects.

Open source pledge progress : 0 of 35 sponsors (plus requirements for vector LYR conversion above)

0/35

As described in Open Source Pledge, we will release the SLYR vector LYR conversion functionality under an open source license 6 months after reaching 30 additional project sponsors.

Beta functionality: Raster LYR file conversion

Expected implementation date: October/November, 2019

The final remaining planned functionality we will add to SLYR will consist of reverse engineering raster LYR file components, including raster layer symbology. Wherever equivalent settings within QGIS exist, the LYR file properties will be converted to their QGIS equivalent. Currently, SLYR supports conversions of raster layers which use ArcGIS “Stretched” color ramp renderers.

All the methods supported for working with vector LYR files within QGIS will be extended to also work for raster layers (e.g. support for dragging and dropping raster LYR files to QGIS, and exposing raster LYR files in the QGIS browser panel.)

During this work we will also identify feature gaps within QGIS’ raster symbology functionality, and implement the missing functionality wherever it is trivial to do so. 

Open source pledge progress: 0 of 20 sponsors (plus requirements for MXD document conversion above)

0/20

As described in Open Source Pledge, we will release the SLYR vector LYR conversion functionality under an open source license 6 months after reaching 30 additional project sponsors.

Future work

Potential future follow up work may add support for MPK map packages and LPK layer packages. These formats could potentially be exposed within the QGIS browser panel and support drag and drop to the QGIS main window, much like the LYR and MXD functionality described above.

We also have plans to extend SLYR to support the newer ArcGIS Pro LYRX and MAPX formats, and expect this functionality to be implemented by late 2019.