[Qgis-user] Categorized layers in QGIS-Server-WMS?
Richard Duivenvoorde
rdmailings at duif.net
Wed Jan 8 01:03:41 PST 2020
On 07/01/2020 09.16, Michael Rose wrote:
> I have a shp-file classified by column. Now I would like to use these, in
> QGIS switchable, geometries as separate layers in a WMS-request.
> Unfortunately the QGIS-Server-WMS (getcapabilities) only delivers one (main)
> layer. (I may copy the shp multiple times and filter each class via query,
> but this solution is unpleasant, especially because of loosing cartographic
> features like point displacement.) Thank you in advance..
Hi Michael,
To see more LAYERS, in WMS you can only create more layer.
OR depending on the WMS you use you could use a 'filter' to filter out
certain classes.
Using QGIS-server as WMS?
Because, then I would 'duplicate' your layer x times one per class,
giving them all a distinctive name. Then to retrieve them all you have a
&LAYERS=rootlayer or &LAYERS=subl1,subl2,subl3..etc
I'm not sure what happens with a style when you hide classes from a
layer by unchecking the tickboxes in front of the classnames... but if
that works it is pretty easy.
Alternative, or if not using QGIS-server, then you could also duplicate
the layers but 'hide' the other classes (by editing the sld's for
example for Geoserver).
As said you could also use filters-expressions.
All this could affect your point displacement though... because well the
displacement off course is depending on the amount of features, so
hiding certain features, changes displacement, I think.
HTH
Regards,
Richard
More information about the Qgis-user
mailing list