GithubHelp home page GithubHelp logo

slyr's Introduction

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.

slyr's People

Contributors

dependabot[bot] avatar emhain8 avatar marioba avatar nyalldawson avatar prebm avatar storyofblue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slyr's Issues

Add a symbol -> Python dict converter

We should create a simple converter which converts the internal Symbol/SymbolLayer classes and their properties to a normal Python dictionary. We could use this in the symbol dump utilities to provide a complete dump of the symbol properties, and also within the unit tests.

error message: "This plugin is defect. Meta data are missing"

According to the README file, I'm just supposed to add the "slyr" folder to the Python -> Plugin folder and activated it in QGIS.

When I go to the QGIS Plugin extentions the plugin appears but I get the error message "This plugin is defect. Metadata is missing". However, there is a metadata.txt file inside the "slyr" folder.
Does anyone have any ideas what the problem might be and how to solve it?

I'm using QGIS 3.4.6.

What license?

What license is this code released under? At the moment I can't find any information about that.
Would be really nice if it was released under MIT or Apache for easy reuse in other projects.

frustrated

hi. I love the concept behind this and cant wait for the layer to sld version.
I am trying to run style_to_qgis_xml but I am getting frustrated by the prerequisites.
It looks like the original code was built to run on linux and I am trying to run it in windows with the starting point of the ESRI python 64 bit (which I don't want to wreck as I am running quite a few complex processes)
I also installed qgis 2.18 a few months ago
On my initial run of style_to_qgis_xmlI had error messages regarding import failures which I think I fixed by setting PYTHONPATH to look at my qgis python extras.
Then I had messages about not being able to import SIP. When I tried to install this, I got
ImportError: No module named Cython.Distutils"
Then looking for info on this it says cython is another programming language, but does not reveal how to really fix the issue.
Can anyone assist?

Failed to convert Fill symbol

Failed to convert Fill symbols (probably not only), tested with:
QGIS version 3.2.2-Bonn, QGIS code revision 75cac03, Ubuntu 16.04
SLYR - actual master

Critical: Traceback (most recent call last):
   File "/home/testuser/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr/qgis_plugin/algorithms.py", line 122, in processAlgorithm
     raw_symbols = Extractor.extract_styles(input_file, symbol_type, mdbtools_path=mdbtools_folder)
   File "/home/testuser/.local/share/QGIS/QGIS3/profiles/default/python/plugins/slyr/bintools/extractor.py", line 64, in extract_styles
     symbol_id, name, category, blob, tags = r.split(Extractor.__DELIMITER)
 ValueError: not enough values to unpack (expected 5, got 4)
 

Tested on resource and style samples provided by Latvian Geospatial Information Agency for ArcGIS 9.2. and 9.3. Samples for download (style and resource files with data samples) http://map.lgia.gov.lv/index.php?lang=2&cPath=4_15_31&txt_id=43

Where to put the mdbtools binaries

Hi,
I want to test your program in QGIS but I dont know where I have to put the the mdbtools binaries, so I can´t run this plugin.

Thank you and best regards

Failed to convert polygon fill style "Expected 01 at 0x30, got b'14"

I'm having issue when try to convert my custom arcgis style which consists of polygon fill, the slyr log stated that: Error reading symbol Mangrove: Expected 01 at 0x30, got b'14' (mangrove is one of my style class).
I'm using QGIS 3.2 on Windows10-x64 and already setup the mdbtools-win path, my style file is attached
2018-09-05 05_09_34-convert esri style to qgis xml

PL.zip

Warn on missing fonts

When converting symbols to QGIS symbology, we should throw warnings if the user is missing the required fonts.

Complex fill symbol outlines

When a fill symbol outline is a multi-layer symbol, or has template/offset/etc, we need to add this as separate layers during QGIS conversion

mdbtools

HI, when I clic "location of mdbtools binaries" (in processing) does not happen anything. what can i do?

Parse CMYK colors

Allow parsing of CMYK colors -- they are stored using a different structure vs RGB

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.