[Geoserver-users] Problem with SLDs exported from QGIS - implement symbol libaries

Dear list,

as it is pretty convinient, we are using QGIS to style our layers and export the SLD to be used in GeoServer. This works fine in pretty simple cases.

Right now we try to use the standard “Dense”-Symbologie from QGIS, overlaying a polygon with a hatch of points. This is represented in the SLD as se:WellKnownNamebrush://dense6</se:WellKnownName> or dense6, depending on which type of SLD you use.

When using the SLD in GeoServer, the style works, as the polygons get coloured in the way they should, but the hatch of points is not rendered.

The SLD has no validation error and the GeoServer Log shows no error either.

We figured out, that the ‘brush’-symbol libary is not available on GeoServer, and therefore the is not rendered.

If we are right on this one, is there in general a way to implement the QGIS symbol libaries on GeoServer?

Thank you in advance!

Mit freundlichen Grüßen

i.A. Erik Böhm

image001.gif

···

|

BSH

|

Erik Böhm, M4209



Open Data Koordination







Tel +49-40-3190-3429 (Neue Nummer ab 1.4.20) | erik.boehm@anonymised.com.



Fax +49-40-3190-5000



Bernhard-Nocht-Straße 78, 20359 Hamburg







Das Bundesamt für Seeschifffahrt und Hydrographie (BSH) ist eine Bundesoberbehörde im Geschäftsbereich des Bundesministerium für Verkehr und digitale Infrastruktur

|
| - | - |

Op 09-04-2021 om 14:20 schreef Erik Böhm:

Dear list,

as it is pretty convinient, we are using QGIS to style our layers and export the SLD to be used in GeoServer. This works fine in pretty simple cases.

Right now we try to use the standard "Dense"-Symbologie from QGIS, overlaying a polygon with a hatch of points. This is represented in the SLD as <se:WellKnownName>brush://dense6</se:WellKnownName> or <WellKnownName>dense6</WellKnownName>, depending on which type of SLD you use.

When using the SLD in GeoServer, the style works, as the polygons get coloured in the way they should, but the hatch of points is not rendered.

The SLD has no validation error and the GeoServer Log shows no error either.

We figured out, that the 'brush'-symbol libary is not available on GeoServer, and therefore the <WellKnownName> is not rendered.

If we are right on this one, is there in general a way to implement the QGIS symbol libaries on GeoServer?

unfortunately "brush" is not that well known

WellKnownName sybols are coded in factory classes in https://github.com/geotools/geotools/tree/main/modules/library/render/src/main/java/org/geotools/renderer/style and hold a limited sets of symbols. I thing you would need to create a "BrushMarkfactory" that provides for "brush://" and will return the shape "dense6" when requested.

The known Mark factories are listed in https://github.com/geotools/geotools/blob/main/modules/library/render/src/main/resources/META-INF/services/org.geotools.renderer.style.MarkFactory

atm I don't think there is any way to use "symbol libraries" without coding - I have no idea what those look like for qgis;
there are ways around this by modifying your style using eg. an external graphic for the pattern mark (eg a TTF or SVG symbol) instead

As noted on https://docs.geoserver.org/latest/en/user/styling/qgis/index.html the project is interested in improving support for QGIS generated styles, but it needs funding.

-M

Hello Mark,

thanks for the reply!

I think we will have to go with the workaround and create an svg.

Greetings,
Erik

-----Ursprüngliche Nachricht-----
Von: mark <mc.prins@anonymised.com>
Gesendet: Samstag, 10. April 2021 14:57
An: geoserver-users@lists.sourceforge.net
Betreff: Re: [Geoserver-users] Problem with SLDs exported from QGIS - implement symbol libaries

Op 09-04-2021 om 14:20 schreef Erik Böhm:

Dear list,

as it is pretty convinient, we are using QGIS to style our layers and
export the SLD to be used in GeoServer. This works fine in pretty simple
cases.

Right now we try to use the standard "Dense"-Symbologie from QGIS,
overlaying a polygon with a hatch of points. This is represented in the
SLD as <se:WellKnownName>brush://dense6</se:WellKnownName> or
<WellKnownName>dense6</WellKnownName>, depending on which type of SLD
you use.

When using the SLD in GeoServer, the style works, as the polygons get
coloured in the way they should, but the hatch of points is not rendered.

The SLD has no validation error and the GeoServer Log shows no error either.

We figured out, that the 'brush'-symbol libary is not available on
GeoServer, and therefore the <WellKnownName> is not rendered.

If we are right on this one, is there in general a way to implement the
QGIS symbol libaries on GeoServer?

unfortunately "brush" is not that well known

WellKnownName sybols are coded in factory classes in
https://github.com/geotools/geotools/tree/main/modules/library/render/src/main/java/org/geotools/renderer/style
and hold a limited sets of symbols. I thing you would need to create a
"BrushMarkfactory" that provides for "brush://" and will return the
shape "dense6" when requested.

The known Mark factories are listed in
https://github.com/geotools/geotools/blob/main/modules/library/render/src/main/resources/META-INF/services/org.geotools.renderer.style.MarkFactory

atm I don't think there is any way to use "symbol libraries" without
coding - I have no idea what those look like for qgis;
there are ways around this by modifying your style using eg. an external
graphic for the pattern mark (eg a TTF or SVG symbol) instead

As noted on
https://docs.geoserver.org/latest/en/user/styling/qgis/index.html the
project is interested in improving support for QGIS generated styles,
but it needs funding.

-M

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer

Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Can you open an enhancement request so that in the future people know this is what needs to be done? it might give someone an idea for a project if they have some spare time.

Ian

···

Ian Turton