layers.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .. _gwc_webadmin_layers:
  2. Tile Layers
  3. ===========
  4. This page shows a listing of all of the layers known to the integrated GeoWebCache. It is similar to the :ref:`layerpreview` for GeoWebCache, with many of the same options.
  5. .. figure:: img/tilelayers.png
  6. .. note:: There is also a link to the :ref:`GeoWebCache standalone demo page <gwc_webadmin_demo>`.
  7. Layer information
  8. -----------------
  9. For each layer cached by GeoWebCache, the following information is available.
  10. Disk Quota
  11. ~~~~~~~~~~
  12. The maximum amount of disk space that can be used for this layer. By default, this will be set to :guilabel:`N/A` (unbounded) unless :ref:`gwc_webadmin_diskquotas` are enabled.
  13. Disk Used
  14. ~~~~~~~~~
  15. The current disk space being used by tiles for this particular layer.
  16. .. note:: **This counter will only be updated if disk quotas are enabled.** If disk quotas are not enabled, tiles will still be saved to disk, but the counter will remain as ``0.0 B``.
  17. Enabled
  18. ~~~~~~~
  19. Indicates whether tile caching is enabled for this layer. It is possible to have a layer definition here but to not have tile caching enabled (set in the layer properties).
  20. Preview
  21. ~~~~~~~
  22. Similar to :ref:`layerpreview`, this will generate a simple OpenLayers application populated with tiles from one of the available gridset/image format combinations. Select the desired option from the menu to view in OpenLayers.
  23. Seed/Truncate
  24. ~~~~~~~~~~~~~
  25. Opens the GeoWebCache page for automatically seeding and truncating the tile cache. Use this if you want to pre-populate some of your cache.
  26. Empty
  27. ~~~~~
  28. Will remove all saved tiles from the cache. This is identical to a full truncate operation for the layer.
  29. Add or remove cached layers
  30. ---------------------------
  31. The list of layers displayed on this page is typically the same as, or similar to, the full list of layers known to GeoServer. However, it may not be desirable to have every layer published in GeoServer have a cached layer component. In this case, simply select the box next to the layer to remove, and click :guilabel:`Remove selected cached layers`. The layer will be removed from GeoWebCache, and the disk cache for this layer will be entirely removed.
  32. .. warning:: Deleting the tile cache cannot be undone.
  33. .. figure:: img/removecachedlayers.png
  34. Removing a cached layer
  35. To add in a layer from GeoServer (if it wasn't set up to be added automatically), click the :guilabel:`Add a new cached layer` link.
  36. .. figure:: img/newcachedlayer.png
  37. Adding a new cached layer
  38. Clearing GeoWebCache
  39. ---------------------------
  40. The ``Empty all`` link allows to clear the entire cache, for all layers, grid sets and filter parameters combination.
  41. .. warning:: This will truncate all layers in GeoWebCache
  42. .. figure:: img/gwc_confirm.png
  43. Confirmation to GeoWebCache
  44. A confirmation will appear on the page as message with names of cleared Tile layers.
  45. .. figure:: img/gwc_clean.png
  46. Configuring a cached layer
  47. --------------------------
  48. You have two options for layer configuration. The first option is to load the layer using the default (global) settings. To do this, select the layer you wish to start caching, and click the :guilabel:`Configure selected layers with caching defaults` link. The second option is to configure the caching parameters manually, via the :ref:`layer configuration <data_webadmin_layers>` pages. To do this, just click the layer name itself.
  49. Parameter Filters
  50. ~~~~~~~~~~~~~~~~~
  51. Parameter filters allow GeoWebCache to cache a layer with varying parameters such as ``STYLES``, ``TIME``. One is needed for each parameter to be cached and it needs to know how to recognize valid values to be cached and which values are the same as other values so they only get cached once. There are several different kinds of filter as a result.
  52. Adding a Filter
  53. _______________
  54. At the bottom of the filter list in the text box beside :guilabel:`Add filter` specify the name of the parameter. In the drop down box select the kind of filter you want then click the |add| button. For a filter that automatically tracks the layers styles in a parameter named ``STYLES`` click the :guilabel:`Add Style Filter` button.
  55. .. |add| image:: img/add.png
  56. Removing a Filter
  57. _________________
  58. To remove a filter, click the |remove| button to the right of the filter's entry in the filter list.
  59. .. |remove| image:: img/remove.png
  60. Types of filter
  61. _______________
  62. All parameter filters take a default parameter that will be used if the parameter was not specified. Specific types of parameter filter provide different ways of specifying which parameter values are allowed, and which are equivalent to one another and should be cached together.
  63. List of Strings
  64. :::::::::::::::
  65. The ``stringParameterFilter`` takes a collection of plain text strings. If the value matches one of the strings, it is valid, otherwise it is not. Matching can be done in a case sensitive way, or the strings can all be converted to upper or lower case before matching. As case rules vary between languages, the locale to use for case changes can be specified.
  66. Regular Expression
  67. ::::::::::::::::::
  68. The `regexParameterFilter` takes a regular expression to match strings. This should be used with caution as it potentially allows an arbitrarily large number of caches to be created. Like the string filter, it can be normalized for case.
  69. List of Numbers
  70. :::::::::::::::
  71. The ``floatParameterFilter`` is like the string filter in taking a list of values, but it uses floating point numbers rather than arbitrary text strings. A threshold can be given to pull close numbers to a standard value.
  72. List of Whole Numbers
  73. :::::::::::::::::::::
  74. The ``integerParameterFilter`` is like the float filter but works with integer/whole number values.
  75. Styles
  76. ::::::
  77. The ``styleParameterFilter`` is connected to the GeoServer catalog and knows what styles are available for the layer and when they change. You can specify a default distinct from the normal layer default if you wish, and restrict the range of additional styles available if you do not wish to cache all of them.