-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QML style from QGIS 3.28 cannot be parsed #455
Comments
Hi, thanks for the report. Currently the qgisparser supports very simple styles like https://github.com/geostyler/geostyler-qgis-parser/blob/master/data/qmls/polygon_simple.qml As the symbolization features in QGis are almost endless i'm not sure what could have change. But as the post style is still "renderer-v2" i would assume that it should work. If not the error message should be more speaking. I'll check your qgis files and add more feedback if possible. |
I have a qgis 3.22.4 runnig on my system. If i import and export and your style it looks different and can be parsed with the geostyler-qgis-parser in the demo: Unfortunately i wont have time to debug into this deeper nor to fix it. It would be great if you could find some time to dig deeper here. |
I can confirm that the error exists. It probably stems from the fact, that the new XML-Structure is as follows (Root <layer>
<Option>
<!-- multiple nested Options -->
<Option />
</Option>
</layer> Used to be direct <layer>
<prop />
</layer> This is why the following function fails, as there are no props. /**
*
* @param qmlSymbolizer
*/
qmlSymbolizerLayerPropsToObject(qmlSymbolizer: any) {
const qmlMarkerProps: any = {};
qmlSymbolizer.prop.forEach((prop: QmlProp) => {
const key = prop.$.k;
const value = prop.$.v;
qmlMarkerProps[key] = value;
});
return qmlMarkerProps;
} I'd be happy to look into it, but probably would need a short introduction from one member of the core-Team on how parsers I added a screenshot for illustration: |
I have created a work in progress. I converted all of the styles through a 3.28 Firenze QGIS to the new schema. The Parser correctly reads |
Without wanting to be impolite - what's the way forward on this issue? I see there is a PR from the community (#569) but it seems to be stalled. It's surely an important issue - it accounts for about half of the open issues right now. Does it need someone else from the community to pick up the PR, or is there a shortage or maintainers or funding? |
Hey @olsen232, thanks for the reminder. Sometimes things get lost and in the daily business and the varity of geostyler-repositories its hard to keep track. But maybe @geographika can give more informations about the status of the PR and if his going to continue working on it. |
@KaiVolland @olsen232 - agree it is a major issue as the parser will only work with old versions of QGIS. I was also in contact with the QGIS developers to see if there is a XML schema for the QGIS styles that the parser could be tested against, but the general consesus seemed to be the XML is modified as required for supporting new styling functionality and no such schema exists. |
Question
Hello, I am failing to parse any QML file created in QGIS 3.28. Looking in the code, there seem to be a significantly different inner structure of the
<symbol>
element. I am attaching a short example below. It should be a rough equivalent to https://github.com/geostyler/geostyler-qgis-parser/blob/master/data/qmls/polygon_simple.qml – a fill symbol with color, outline color and outline width.super-ugly-zones_only-symbology.zip
Parsing this QML with geostyler-qgis-parser leaves me with a following error (trimmed):
Related issue in hslayers: hslayers/hslayers-ng#3513
Could you please confirm that the issue is relevant? Is there a change in the way QGIS is exporting QML files which is not yet reflected in geostyler? I went through the QGIS visual changelogs but I have found no mention about any change in this regard (until version 3.30 which is not yet relevant as I am using 3.28)... Thanks!
The text was updated successfully, but these errors were encountered: