index.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. .. _group_quickstart:
  2. Publishing a Layer Group
  3. ========================
  4. This tutorial walks through the steps of publishing a layer group combing several layers into a basemap.
  5. .. note:: This tutorial assumes that GeoServer is running at ``http://localhost:8080/geoserver``.
  6. Data preparation
  7. ----------------
  8. First let's gather that the data that we'll be publishing.
  9. #. Complete the previous tutorials:
  10. * :ref:`geopkg_quickstart` defining the `tutorial:countries` layer
  11. * :ref:`image_quickstart` defining the `tutorial:shaded` layer
  12. Create a layer group
  13. --------------------
  14. #. Navigate to :menuselection:`Data > Layer Group` page.
  15. .. figure:: images/groups.png
  16. Layer Groups
  17. #. This page displays a list of layer groups, workspace that the group belongs to.
  18. .. note:: Layer groups are allowed to be "global" allowing a map to be created combing layers from several workspaces into a single visual.
  19. #. At the top of the list :guilabel:`Layer Groups` locate and click the :guilabel:`Add new layer group` link.
  20. #. The :guilabel:`Layer group` editor defines
  21. * :guilabel:`Basic Resource Info` - describes how the layer is presented to others
  22. * :guilabel:`Coordinate Reference System` - establishes how the spatial data is to be interpreted or drawn on the world
  23. * :guilabel:`Bounding Boxes` - establishes where the dataset is located in the world
  24. * :guilabel:`Layers` - the layers to be drawn (listed in draw order)
  25. #. Locate :guilabel:`Basic Resource Info` and define the layer:
  26. .. list-table::
  27. :widths: 30 70
  28. :width: 100%
  29. :stub-columns: 1
  30. * - Name
  31. - :kbd:`basemap`
  32. * - Title
  33. - :kbd:`Basemap`
  34. * - Abstract
  35. - :kbd:`Plain basemap suitable as a backdrop for geospatial data.`
  36. * - Workspace
  37. - ``tutorial``
  38. .. figure:: images/basemap.png
  39. Basic resource information
  40. #. Scroll down to the :guilabel:`Layers` list which is presently empty.
  41. #. Click :guilabel:`Add Layer` link, select the ``tutorial:shaded`` layer first.
  42. The raster should be drawn first, as other content will be shown over top of it.
  43. #. Click :guilabel:`Add Layer` link, select the ``tutorial:countries`` layer second.
  44. This polygon layer will be drawn second.
  45. #. Locate the ``tutorial:countries`` layer in the list and click the :guilabel:`Style` entry to change ``polygon`` to ``line``.
  46. By drawing only the outline of the countries the shaded relief can show through.
  47. .. figure:: images/layers.png
  48. Layer group layers in drawing order
  49. #. Locate the :guilabel:`Coordiante Reference Systems` and press :guilabel:`Generate Bounds`.
  50. Now that layers are listed we they can be used to determine the coordinate reference system and bounds of the layer group.
  51. .. figure:: images/layers_crs.png
  52. Coordinate Reference Systems
  53. #. Press :guilabel:`Save` complete your layer group.
  54. Previewing the layer
  55. --------------------
  56. In order to verify that the ``tutorial:basemap`` layer is published correctly, we can preview the layer.
  57. #. Navigate to the :menuselection:`Data > Layer Preview` page and find the ``tutorial:basemap`` layer.
  58. .. note:: Use the :guilabel:`Search` field with :kbd:`tutorial` as shown to limit the number of layers to page through.
  59. #. Click the :guilabel:`OpenLayers` link in the :guilabel:`Common Formats` column.
  60. #. An OpenLayers map will load in a new tab. This preview is used to zoom and pan around the dataset, as well as display the attributes of features.
  61. .. figure:: images/openlayers.png
  62. Preview basemap