geostyler / geostyler-qgis-parser

GeoStyler Style Parser implementation for QGIS
https://geostyler.org
BSD 2-Clause "Simplified" License
16 stars 9 forks source link

Support QML expressions #259

Open geraldo opened 2 years ago

geraldo commented 2 years ago

Feature Request

We have a web based map viewer based on Openlayers for QGIS projects and generally use WFS together with SLDReader to apply styles to vector layers.

QGIS has the ability to export symbology to SLD, but ignores expressions. See this QGIS issue for more info about this limitation.

But it includes expressions when exporting symbology to QML. That's why I was thinking of using Geostyler to overcome this limitation of QGIS, as I already use it successfully to convert QML to Mapbox styles.

Any plans to accept expressions for QML parser?

jansule commented 2 years ago

Supporting QML expressions would definitely be a nice feature!

Currently, this feature is not on our roadmap, but I am sure, such a feature would be greatly appreciated.

geostyler-cql-parser probably provides already the majority of needed functionality. With just some minor adjustments (e.g. wrapping attribute names in double quotes) we should be able to parse basic expressions.

Supporting special keywords (e.g. $geometry) and functions (e.g. buffer()) is of course a completely different topic, and I rather doubt, we will be able to support them.

Would you like to create a (basic) parser that reads QML expressions? If so, we can set up a repository for this.

geraldo commented 2 years ago

Thanks for your response. I never did development with typescript and I'm quite lost on where to get started. For now we try to improve this situation on QGIS.

jansule commented 2 years ago

Thanks for the info @geraldo. https://github.com/qgis/QGIS-Enhancement-Proposals/issues/238 definitely sounds like a good idea.

I never did development with typescript and I'm quite lost on where to get started

In case you are still motivated to work on GeoStyler, we can have a call, where we do the initial set up together and give you a brief introduction into the code. We are always happy to extend the community. So just let us know.

KaiVolland commented 1 year ago

With the latest release and the use oft geostyler-style v7 it would now be possible to implement the parsing of qml-expressions. Bit i'm not sure how difficult this would be.