Bug report #6897

Broken import of simple marker line

Added by Alexander Bruy almost 12 years ago. Updated almost 12 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:Arunmozhi P
Category:Symbology
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

Description

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

test.zip - sample style (2.17 KB) Alexander Bruy, 2012-12-19 04:55 AM

correct_import_18.png - correct import with QGIS 1.8.0 (4.07 KB) Alexander Bruy, 2012-12-19 04:55 AM

broken_import_master.png - broken import in QGIS master (8.6 KB) Alexander Bruy, 2012-12-19 04:55 AM

Associated revisions

Revision 8b981975
Added by Arunmozhi almost 12 years ago

Fixes #6897

Revision be315746
Added by Nathan Woodrow almost 12 years ago

Merge pull request #368 from tecoholic/6897

Fixes #6897. Handle import of old symbols.

History

#1 Updated by Giovanni Manghi almost 12 years ago

is this a regression?

#2 Updated by Alexander Bruy almost 12 years ago

Giovanni Manghi wrote:

is this a regression?

I think yes. It works fine in 1.8.0 and 1.7.x. Not sure, but seems this introduced by GSoC work

#3 Updated by Giovanni Manghi almost 12 years ago

  • Priority changed from High to Severe/Regression

anyway seems really a regression, so I'm tagging this as blocker.

#4 Updated by Arunmozhi P almost 12 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.

#5 Updated by Arunmozhi P almost 12 years ago

I am testing the uniqueness of the problem for "Marker Line" though. Will update.

#6 Updated by Arunmozhi P almost 12 years ago

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

#7 Updated by Alexander Bruy almost 12 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[1] )
  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">

#8 Updated by Nathan Woodrow almost 12 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF