Coverage for gws-app/gws/plugin/ows_server/__init__.py: 100%

0 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-05 13:35 +0200

1"""OGC web services provided by GBD WebSuite. 

2 

3This plugin publishes projects and their layers as OGC services. The common 

4parts (request parsing, dispatching, layer caps, error responses, template 

5helpers and the ``ows`` action) live in ``gws.base.ows.server``; the subpackages 

6here implement the protocols. 

7 

8Subpackages: 

9 

10- ``wms``: WMS 1.1.x and 1.3.0 service. Renders map images (GetMap), returns 

11 feature info (GetFeatureInfo) and legends (GetLegendGraphic). 

12- ``wmts``: WMTS 1.0.0 service. Renders the layers as tiles on a tile matrix 

13 set for each supported CRS. 

14- ``wfs``: WFS 2.0 service. Returns features of searchable layers as GML or 

15 GeoJSON. 

16- ``csw``: CSW 2.0.2 catalogue service. Publishes the metadata of public 

17 objects that have a catalog UID as ISO 19115 records. 

18 

19Each service is an ``owsService`` object. It declares its supported operations, 

20each with the name of a handler method, and the base class dispatches incoming 

21requests to these handlers. XML responses (capabilities, feature collections, 

22records) are produced by templates of type ``py``; each service package has a 

23``templates`` subpackage with the default templates, which can be replaced by 

24configuring templates with the same subjects. 

25 

26Example:: 

27 

28 actions+ { type "ows" } 

29 

30 projects+ { 

31 uid "my_project" 

32 owsServices+ { type "wms" uid "my_wms" } 

33 owsServices+ { type "wmts" uid "my_wmts" } 

34 owsServices+ { type "wfs" uid "my_wfs" } 

35 } 

36 

37 owsServices+ { type "csw" uid "my_csw" } 

38"""