|
9 | 9 |
|
10 | 10 | :Author: Jeff McKenna |
11 | 11 | :Contact: jmckenna at gatewaygeomatics.com |
12 | | -:Last Updated: 2026-03-29 |
| 12 | +:Last Updated: 2026-04-09 |
13 | 13 |
|
14 | 14 | .. contents:: Table of Contents |
15 | 15 | :depth: 2 |
@@ -72,47 +72,53 @@ Setting Up an SOS Server Using MapServer |
72 | 72 | Install the Required Software |
73 | 73 | ----------------------------- |
74 | 74 |
|
75 | | -SOS requests are handled by the ":ref:`mapserv`" CGI program. The |
| 75 | +SOS requests are handled by the :ref:`mapserv` CGI program. The |
76 | 76 | first step is to check that your mapserv executable includes SOS |
77 | 77 | support. One way to verify this is to use the "-v" command-line switch |
78 | 78 | and look for "SUPPORTS=SOS_SERVER". |
79 | 79 |
|
80 | 80 | Example 1. On Unix: |
81 | 81 |
|
82 | | -:: |
| 82 | +.. code-block:: bash |
83 | 83 |
|
84 | 84 | $ ./mapserv -v |
85 | | - MapServer version 4.9 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP |
86 | | - OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER |
87 | | - SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT |
88 | | - SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS INPUT=JPEG |
89 | | - INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG |
| 85 | + MapServer version 8.7-dev PROJ version 9.8 GDAL version 3.12 |
| 86 | + OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG |
| 87 | + SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS SUPPORTS=RSVG |
| 88 | + SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT |
| 89 | + SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER |
| 90 | + SUPPORTS=SOS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=GEOS SUPPORTS=PBF |
| 91 | + INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE |
| 92 | + INPUT=FLATGEOBUF |
90 | 93 |
|
91 | 94 |
|
92 | 95 | Example 2. On Windows: |
93 | 96 |
|
94 | | -:: |
95 | | - |
96 | | - C:\MS4W\Apache\cgi-bin> mapserv -v |
97 | | - MapServer version 4.9 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP |
98 | | - OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER |
99 | | - SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT |
100 | | - SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS INPUT=JPEG |
101 | | - INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG |
| 97 | +.. code-block:: bash |
| 98 | + |
| 99 | + C:\ms4w> mapserv -v |
| 100 | + MapServer version 8.7.0-dev (MS4W 5.2.0) PROJ version 9.9 |
| 101 | + GDAL version 3.13 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ |
| 102 | + SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=SVG_SYMBOLS |
| 103 | + SUPPORTS=SVGCAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER |
| 104 | + SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT |
| 105 | + SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=OGCAPI_SERVER |
| 106 | + SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG |
| 107 | + INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF |
102 | 108 |
|
103 | 109 | .. note:: |
104 | 110 | Windows users can install `MS4W <https://ms4w.com>`__ which supports SOS server. |
105 | 111 |
|
106 | 112 | If you don't have SOS support in your MapServer build, then you must |
107 | 113 | compile MapServer with the following in mind: |
108 | 114 |
|
109 | | -- flag *-DUSE_SOS_SVR* is required |
| 115 | +- CMake flag *-DWITH_SOS* is required |
110 | 116 |
|
111 | | -- requires either *-DUSE_WMS_SVR* or *-DUSE_WFS_SVR* flags to be enabled |
| 117 | +- requires either *-DWITH_WMS* or *-DWITH_WFS* flags to be enabled |
112 | 118 |
|
113 | 119 | - requires libxml2 and proj libraries |
114 | 120 |
|
115 | | -- requires ICONV support (*-DUSE_ICONV*) on Windows |
| 121 | +- requires ICONV support (*-DWITH_ICONV*) on Windows |
116 | 122 |
|
117 | 123 | For more help with MapServer compilation see the appropriate HowTo: |
118 | 124 | :ref:`Unix <unix>` / :ref:`Windows <win32>` |
@@ -288,6 +294,7 @@ things are likely not going to work. |
288 | 294 | .. note:: |
289 | 295 | The SERVICE parameter is required for all SOS requests. |
290 | 296 |
|
| 297 | +`SOS GetCapabilities live example <https://demo.mapserver.org/cgi-bin/sos?SERVICE=SOS&REQUEST=GetCapabilities>`__ |
291 | 298 |
|
292 | 299 | GetObservation Request |
293 | 300 | ###################### |
@@ -388,7 +395,11 @@ Example 4: |
388 | 395 | http://127.0.0.1/cgi-bin/mapserv.exe?map=D:/ms4w/apps/sos/sos_test.map& |
389 | 396 | Request=GetObservation&service=SOS&Offering=WQ1289& |
390 | 397 | observedproperty=Water Quality&version=1.0.0& |
391 | | - responseFormat=text/xml; subtype="om/1.0.0"&resultModel=om:Observation |
| 398 | + responseFormat=text/xml; subtype="om/1.0.0"&resultModel=om:Observation |
| 399 | + |
| 400 | +Example 5: |
| 401 | + |
| 402 | +`SOS GetObservation live example <https://demo.mapserver.org/cgi-bin/sos?REQUEST=GetObservation&service=SOS&Offering=Water&observedproperty=WaterQuality&version=1.0.0&responseFormat=text/xml;%20subtype%3D%22om%2F1.0.0%22>`__ |
392 | 403 |
|
393 | 404 | DescribeSensor Request |
394 | 405 | ###################### |
@@ -948,7 +959,7 @@ Layer Object Metadata |
948 | 959 |
|
949 | 960 |
|
950 | 961 | All *sos_procedure* links from layers in the offerings will be |
951 | | - outputed together, such as the following taken from a |
| 962 | + outputted together, such as the following taken from a |
952 | 963 | GetCapabilities response: |
953 | 964 |
|
954 | 965 | .. code-block:: xml |
@@ -996,7 +1007,8 @@ In MapServer 5.0 SOS support has been upgraded to use a new metadata called |
996 | 1007 | sos_procedure_item. The value for sos_procedure_item is the field/attribute |
997 | 1008 | name containing the procedure values. The use of this metadata as well as the |
998 | 1009 | sos_procedure is described here per type of request (refer to |
999 | | -https://github.com/MapServer/MapServer/issues/2050 for more description): |
| 1010 | +`issue #2050 <https://github.com/MapServer/MapServer/issues/2050>`__ |
| 1011 | +for more description): |
1000 | 1012 |
|
1001 | 1013 | It should be noted that, for very large datasets defined only with |
1002 | 1014 | sos_procedure_item, this may result in costly processing, because MapServer |
|
0 commit comments