Bug report #6897
Broken import of simple marker line
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||all||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||16022|
Symbol layer "Marker line" import is broken, both for lines and polygons outline. Point markers and SVG fills works fine.See attached screenshots:
- correct_import_18.png — import in 1.8.0
- broken_import_master.png — same symbols imported in master
To test use attached symbol: put vegetation_grounds folder in SVG search path and then try to import styles from test.xml.
Tagged as High because it works fine in previous version and this is major issue in using complex styles
#4 Updated by Arunmozhi P about 10 years ago
The issue is with the new nesting technique of the symbols. Previously the only a single level of nesting was possible, the XML structure was modified to accommodate multiple nesting.
Hence the symbols with nesting, like the marker line, in version before GSoC (guess < 1.8) will be incompatible with the code after GSoC (I guess 1.9) But export and import done only in 1.8 or only in 1.9 should work fine.
#7 Updated by Alexander Bruy about 10 years ago
Arunmozhi P wrote:
Here is a python script that someone can use for cross importing the symbols from old installations to the new. https://gist.github.com/4344168
Thanks! But seems this script don't understand cyrillic symbols in XML. Just tried to convert style from first post and get error
$ python symbol_convert.py test.xml Traceback (most recent call last): File "symbol_convert.py", line 62, in <module> convertXMLStructure( sys.argv ) File "symbol_convert.py", line 30, in convertXMLStructure indom = parse( filepath ) File "/usr/lib/python2.7/xml/dom/minidom.py", line 1920, in parse return expatbuilder.parse(file) File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse result = builder.parseFile(fp) File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile parser.Parse(buffer, 0) xml.parsers.expat.ExpatError: not well-formed (invalid token): line 4, column 24
Line 4 looks like
<symbol alpha="1" name="Болота проходимые_100к" outputUnit="MM" type="fill">