[Geoserver-devel] [Community module proposal] GeoStyler

Hi list,

I'm proposing a new community module: an integration of the GeoStyler.

The GeoStyler is a project we've been working on for a while now. It's
basically a set of JavaScript/TypeScript libraries to operate on
styles, including an interactive editor.

The GeoStyler can also be used to convert between different styling
formats such as

* OpenLayers
* SLD
* MapBox
* QGIS

It's by no means there yet to convert fully between these formats, but
it's already useful (and being used in other projects).

For more details on the GeoStyler, see the related projects on
GitHub[0].

The community module adds another tab to the GeoServer style editor,
on which the GeoStyler will display a rule based style editor that is
synchronized with the SLD code in the CodeMirror, so you can edit the
style visually, if you want.

I'll be at the OSGeo Bolsena Code Sprint[1] this week, so I'll expect
I get some input from the people around here.

[0]: https://github.com/terrestris?utf8=✓&q=geostyler&type=&language=
[1]: https://wiki.osgeo.org/wiki/Bolsena_Code_Sprint_2019

Related PR:

https://github.com/geoserver/geoserver/pull/3607

Best regards, Andreas

+1 on a new community module, are any changes needed to core to add the additional tab?

I curious on how style conversion is done.

···


Jody Garnett

Jody Garnett wrote:

Hi,

+1 on a new community module, are any changes needed to core to add the
additional tab?

yes, the fix from https://github.com/geoserver/geoserver/pull/3605 is
necessary for the extension mechanism to work (again), I think that
got broken during the wicket upgrade (just guessing).

I curious on how style conversion is done.

I can walk you through the repositories involved:

https://github.com/terrestris/geostyler is the package with the actual
react UI components (which you can use to get the default styler or
plug together your own).

https://github.com/terrestris/geostyler-style defines the TypeScript
style model which is used as the central object structure. It also
defines a model for data, so we can have automatic classifications on
client side (still looking into using GeoServer directly for
that). This package also defines the StyleParser interface which can
then be implemented to read/write specific formats to/from the
GeoStyler format.

https://github.com/terrestris/geostyler-sld-parser/ is an example of a
style parser implementation that can be used to read and write SLD
files (reads SLD/SE 1.1.0 and currently only writes SLD 1.0.0).

Once you have a GeoStyler style object you can use any of the parsers
to write it out to another format, enabling you to freely convert
between formats.

If you're interested, have a look at the demo (currently only
configured with the SLD parser):

https://terrestris.github.io/geostyler-demo/

Of course, you're also welcome to look over my shoulder :wink:

Best regards, Andreas

Is the license (BSD) compatible with ours (GPL) and will users need to install npm?

Ian

···

Ian Turton

Ian Turton wrote:

Hi,

Is the license (BSD) compatible with ours (GPL) and will users need to
install npm?

the license should not be a problem IMHO since the BSD license only
affects the client side (IANAL though).

The required js builds are currently included in the module in
compiled/transpiled form, although we may switch to downloading a
build at some time. npm will not be needed though.

Best regards, Andreas

Hi Andreas,
+1 on the module. You’re already covered by a CLA right?

Besides that, I see the PR has no documentation page. And you don’t need one, to be fair, a community module
has no requirement for it. But, if you have a bit of time, just a strawman page with a screenshot and installation
instructions would help to get people more interested in the module and try it out.

Anyhow, just a suggestion, the PR can be merged without.

Cheers
Andrea

···

Regards, Andrea Aime == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.

Andrea Aime wrote:

Hi Andrea,

+1 on the module. You're already covered by a CLA right?

after some research it turns out that I'm not. I expect I'll have it
by tomorrow for all of our company.

Besides that, I see the PR has no documentation page. And you don't need
one, to be fair, a community module
has no requirement for it. But, if you have a bit of time, just a strawman
page with a screenshot and installation
instructions would help to get people more interested in the module and try
it out.

Thanks, I'll do that!

Best regards, Andreas