You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.py
has two interesting methods which we can likely adapt:qml2Sld()
and sld2qml()`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 layerIt 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./layers/{layer-id}
), not from the list response (/layers
)The text was updated successfully, but these errors were encountered: