Skip to content
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

raster layer - Use GeoNode SLD style when loading in QGIS #91

Open
ricardogsilva opened this issue Feb 12, 2021 · 0 comments · May be fixed by #107
Open

raster layer - Use GeoNode SLD style when loading in QGIS #91

ricardogsilva opened this issue Feb 12, 2021 · 0 comments · May be fixed by #107
Assignees
Labels
enhancement New feature or request

Comments

@ricardogsilva
Copy link
Member

ricardogsilva commented Feb 12, 2021

The GeoNode v2 API returns a layer's style in SLD format. Lets use that to style a raster layer that is loaded into QGIS.

Unfortunately, QGIS does not currently support import of SLD for raster layers (export is supported though) We'll likely need to read in the SLD and convert it to QGIS' native style format (QML). There are a couple of plugins that implement such functionality:

  • SLD4raster - its sld4raster.py has two interesting methods which we can likely adapt: qml2Sld() and sld2qml()`
  • GeoCatBridge - is also able to convert qml to sld but the code is more complex

Let's study these and come up with a suitable implementation that would allows us load a raster SLD style into QGIS.

NOTES

  • A GeoNode layer can have multiple styles, not just one. Regardless, there is always a default style. When a layer is first loaded we shall assign it the default style it has on GeoNode. GeoNode is moving towards a single style per layer
  • It shall be possible to select one of the other styles the layer may have for loading. This shall be implemented by means of an additional GUI control, so it will be better described in a later issue.
  • The layer's SLD style shall be retrieved from the API's detail response (i.e. /layers/{layer-id}), not from the list response (/layers)
  • The current version of GeoNode API returns the SLD document directly in the layer details. However, this may change in the future. As such, lets not assume that we will always have the style readily accessible for loading.
@ricardogsilva ricardogsilva added size: 13+ enhancement New feature or request labels Feb 12, 2021
@ricardogsilva ricardogsilva added this to the Beta release milestone Feb 12, 2021
@ricardogsilva ricardogsilva self-assigned this Feb 15, 2021
@ricardogsilva ricardogsilva linked a pull request Feb 17, 2021 that will close this issue
@ricardogsilva ricardogsilva removed this from the Beta release milestone Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants