Discussion:
[Geoserver-users] Hide layers in layer group
Dylan Parry
2017-07-22 13:07:01 UTC
Permalink
Hi all,

I'm trying to set up a group of layers to create a tile server that will be served as Vector Tiles using the vectortile extension.

I have several layers, eg. roads, buildings, water etc, and I'd like to turn some of them off at certain zoom levels/scales. I've set up some SLD styles and it works well when I'm requesting the tiles as raster images. I've set for example the buildings layer to only start showing at 1:10k, and this works nice and fast as rasters.

The problem I'm having is that the SLD doesn't seem to have the desired effect when I start requesting vector tiles. It is incredibly slow at small scales. This makes me think that my data is still being processed instead of being excluded by the SLD. Nothing appears on the map as at that small a scale the features are being excluded by virtue of their size, but this means they are being tested by GeoServer for area/length etc so it's really slow. Most of the time it takes so long that requests will timeout.

So my question is, is there any way to do what I'm trying to do with Vector Tiles and still get good performance?

Thanks,

Dylan
Dylan Parry
2017-07-24 09:05:02 UTC
Permalink
Hi,
My understanding of WFS was that SLD’s are not applied to the request
as the service provides features rather than rendered outputs. I think
you may need to put your restrictions into the filtering rather than
the SLD but I accept that is more complex if you are trying to apply a
number of scale dependencies by feature type within the SLD.
Perhaps you are rendering it with the SLD on the client side using
something like OpenLayers; if so, you will still want to filter the
original request from the GeoServer I would think.
Probably not a very helpful response but I hope it helps a bit if you
haven’t already had a reply.
Thanks,
Paul
Thanks, Paul, that was what I suspected. I have watched a couple of
conference videos which seemed to suggest that SLD was used, but it
doesn't seem to be the case.

I am not familiar with how to do filtering in GeoServer, being a
relative newcomer to using it for anything other than raster tiles.
Would you be able to point me in the right direction?

Thanks,

Dylan
Dylan Parry
2017-07-24 11:47:27 UTC
Permalink
This post might be inappropriate. Click to display it.
Nuno Oliveira
2017-07-24 13:04:09 UTC
Permalink
TMS ? If you are using GWC you may want to take a look at this issue:
https://osgeo-org.atlassian.net/browse/GEOS-8228

Basically when using vector tiles with GWC metaling needs to be deactivated.

Is not your main issue but help you get a decent cache hit :)
Hi,
I'm using TMS with the VectorTile extension rather than WFS. I believe this is the recommended method as it simplifies the data for smaller scales and delivers a much smaller dataset. I've had a quick look, and it seems that CQL isn't supported by this setup :(
For now, I've found that I'm able to specify min/max resolutions in OpenLayers, and have split the layer groups into several groups that I can turn on/off based on the resolution. Eg. housing is a layer group, roads another etc. This means more requests to the server, but I can live with that as the TMS is going via GeoWebCache so it's no big strain on resources.
Thanks for your help though. Hopefully filtering support will come with time, but the hack I'm using at the moment will do for now at least.
Hi,
I believe you can use the CQL filter parameter if you are using a GET HTTP request but if you have a complex filter you may need to use a POST request and the OGC filter as a parameter. I assume you need to switch to POST requests as there is a limit on the length a URL can be and long CQL can make you hit the limit if you are querying by polygon.
I’ve actually just been looking into it again last week as I need the filters for WFS GetFeature requests; I’m assuming that is the service you are using for your vector tiles.
In terms of constructing the correct filters you should consult the documentation at http://docs.geoserver.org/latest/en/user/filter/index.html
However I don’t know how that works in terms of layergroups where you want an entire layer to be ignored at a given scale. I don’t know if WFS even uses the concept. I think it just returns the features within the given bbox and without rendering dimensions I’m not sure a scale dominator would apply. Hopefully someone else will help you there?
If the request returns a feature ID (FID) then you may be able to filter out whole layers based on the request size in units i.e. the width and height of your bbox.
Paul
"This e-mail is intended for the named addressee(s) only and may contain information about individuals or other sensitive information and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this email in error, kindly disregard the content of the message and notify the sender immediately. Please be aware that all email may be subject to recording and/or monitoring in accordance with relevant legislation."
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
- Earning your support instead of buying it, but Ian Turton:http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:http://geoserver.org/comm/userlist-guidelines.html
https://lists.sourceforge.net/lists/listinfo/geoserver-users
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dylan Parry
Lead Developer, Blue Fox Technology Ltd
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<http://www.opusmap.co.uk> T: 01452 524901
W: www.opusmap.co.uk <http://www.opusmap.co.uk/>
LinkedIn <https://www.linkedin.com/company/blue-fox-technology-ltd?trk=biz-companies-cym> Twitter <https://twitter.com/opusmap> YouTube <https://www.youtube.com/channel/UCIpw1EnG55-D9DzzbkZXV_A> Google+ <https://plus.google.com/u/0/b/112115908251760042852/+OpusmapUk>
Opus Map - Try it for free <http://www.opusmap.co.uk/free-demo/>
Registered in England and Wales, Company No. 05908226.
Registered office: Windsor House, 26 Mostyn Avenue, Craig-Y-Don, Llandudno, Conwy LL30 1YY
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information.
==

Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer

GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
Dylan Parry
2017-07-24 13:41:04 UTC
Permalink
Thanks, that's also really helpful to know. Am I right in thinking that
disabling the metatiling is just a case of setting it to 1x1 instead of
4x4, or is there another setting that I'm missing?

Thanks again,

Dylan
Post by Nuno Oliveira
https://osgeo-org.atlassian.net/browse/GEOS-8228
Basically when using vector tiles with GWC metaling needs to be deactivated.
Is not your main issue but help you get a decent cache hit :)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this list:
- Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html

Geoserver-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Andrea Aime
2017-07-24 11:54:12 UTC
Permalink
On Mon, Jul 24, 2017 at 10:36 AM, Paul Wittle via Geoserver-users <
Hi,
My understanding of WFS was that SLD’s are not applied to the request as
the service provides features rather than rendered outputs. I think you may
need to put your restrictions into the filtering rather than the SLD but I
accept that is more complex if you are trying to apply a number of scale
dependencies by feature type within the SLD.
Hi Paul,
vector tiles are a WMS output, so they should be taking into account SLD.
What Dylan describes looks more like a bug to me.
Unfortunately we don't seem to be catching the module maintainer
attention...

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

AVVERTENZE AI SENSI DEL D.Lgs. 196/2003

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo Ú consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.
Dylan Parry
2017-07-24 11:57:31 UTC
Permalink
Hi Andrea,

That's good to know---I was sure the presentations I watched were using
SLD, but figured it was me just "not getting it"!

If that's the case, then this is almost certainly a bug, or I'm not
writing my SLD correctly. Hopefully the module maintainer will be able
to chip in on this and confirm whether it's a bug or show an example of
how to correctly write the SLD so that it does filter the data out
rather than spend an inordinate amount of time processing it!

Thanks,
Post by Andrea Aime
On Mon, Jul 24, 2017 at 10:36 AM, Paul Wittle via Geoserver-users
Hi,
My understanding of WFS was that SLD’s are not applied to the
request as the service provides features rather than rendered
outputs. I think you may need to put your restrictions into the
filtering rather than the SLD but I accept that is more complex if
you are trying to apply a number of scale dependencies by feature
type within the SLD.
Hi Paul,
vector tiles are a WMS output, so they should be taking into account
SLD. What Dylan describes looks more like a bug to me.
Unfortunately we don't seem to be catching the module maintainer
attention...
Cheers
Andrea
--
Regards,
Andrea Aime
==GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.==Ing. Andrea Aime
@geowolfTechnical LeadGeoSolutions S.A.S.Via di Montramito 3/A55054
Massarosa (LU)phone: +39 0584 962313fax: +39 0584 1660272mob: +39
339 8844549http://www.geo-solutions.ithttp://twitter.com/geosolutions_it
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo Ú consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.
------------------------------------------------------------------------
Dylan Parry
Lead Developer, Blue Fox Technology Ltd
------------------------------------------------------------------------
<http://www.opusmap.co.uk> T: 01452 524901
W: www.opusmap.co.uk <http://www.opusmap.co.uk/>
LinkedIn
<https://www.linkedin.com/company/blue-fox-technology-ltd?trk=biz-companies-cym>
Twitter <https://twitter.com/opusmap> YouTube
<https://www.youtube.com/channel/UCIpw1EnG55-D9DzzbkZXV_A> Google+
<https://plus.google.com/u/0/b/112115908251760042852/+OpusmapUk>
Opus Map - Try it for free <http://www.opusmap.co.uk/free-demo/>
Registered in England and Wales, Company No. 05908226.
Registered office: Windsor House, 26 Mostyn Avenue, Craig-Y-Don,
Llandudno, Conwy LL30 1YY
Continue reading on narkive:
Loading...