Closed gubuntu closed 7 years ago
Since GeoNode 2.6, which can now apply a qml style to a geoserver backend layer by converting it to SLD, we should perhaps use the UI and parts of the same API to apply qml styles to QGIS backend layers
API needed for style:
Please try to complete this week
@ismailsunni what do you mean by list available styles? Does QGIS Server backend must support multiple styles and style management?
CMIIW, in geoserver we have that multiple styles and style management. So, may be we can do the same. Although, I know that in the current implementation it's not easy to do. We need to generate one project file for each But for my current use case, as long as I can download, upload, and replace, it should be enough.
@gubuntu
IMO, supporting multiple styles and style management for QGIS Server is a big task, I can't possibly finish that this week. The style model of current geonode tightly integrated with geoserver and only support sld. We had to create another model for QGIS Server to save multiple styles and management. QGIS Server also doesn't natively manage styles. So we had to create our own UI for managing styles for QGIS Server.
What's possible for now is to provide @ismailsunni (based on our discussion) with a style API for geonode to query these styles and hide details about the backend we used. This functionality then will be used by him for QGIS client features.
From users perspective, we can download QGIS Server style and Upload/replace style now through Geonode UI. But no support for layer management yet.
QGIS (and QGIS WMS server) supports multiple named styles for a layer. And a named style can be specified in a WMS request.
If there is only one style it is used as the default style.
A WMS GetCapabilities returns all named styles.
So listing and usage of alternative styles can all be done via WMS.
Updating and adding extra named styles to a layer should be possible via the QGIS API.
So @lucernae I'm not sure the obstacles are so big.
As @gubuntu said, no need to generate one project per style. It's already in QGIS Server: many styles for one layer.
The obstacles is:
@lucernae obstacles are for overcoming!
@lucernae obstacles are for overcoming!
Hahaha, yes of course. I list the obstacles to give the idea about the size of the task 😄 .
Prior to this contract extension we had implemented support for uploading QGIS ‘qml’ style files when registering a layer with GeoNode. In this contract extension we propose to build on this prior work by providing a richer set of ways in which QGIS style files can be associated with a GeoNode layer. Specifically:
This functionality must be available through the GeoNode API and implemented for this Issue in the GeoNode UI (implementation in QGIS is covered by https://github.com/kartoza/QGIS/issues/18)