[659] | 1 | |
---|
| 2 | |
---|
| 3 | <!DOCTYPE html> |
---|
| 4 | <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
---|
| 5 | <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
---|
| 6 | <head> |
---|
| 7 | <meta charset="utf-8"> |
---|
| 8 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
---|
| 9 | |
---|
| 10 | <title>Optional MapServer support — ZOO-Project 1.4a0 documentation</title> |
---|
| 11 | |
---|
| 12 | <link href="http://fonts.googleapis.com/css?family=Days+One" rel="stylesheet" type="text/css"> |
---|
| 13 | |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | <link rel="search" type="application/opensearchdescription+xml" title="Search within ZOO-Project 1.4a0 documentation" href="../_static/opensearch.xml"/> |
---|
| 22 | |
---|
| 23 | |
---|
| 24 | |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | <link rel="top" title="ZOO-Project 1.4a0 documentation" href="../index.html"/> |
---|
| 35 | <link rel="up" title="ZOO-Kernel" href="index.html"/> |
---|
| 36 | <link rel="next" title="Optional Orfeo Toolbox support" href="orfeotoolbox.html"/> |
---|
| 37 | <link rel="prev" title="ZOO-Kernel configuration" href="configuration.html"/> |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | <script src="_static/js/modernizr.min.js"></script> |
---|
| 41 | |
---|
| 42 | </head> |
---|
| 43 | |
---|
| 44 | <body class="wy-body-for-nav" role="document"> |
---|
| 45 | |
---|
| 46 | <div class="wy-grid-for-nav"> |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
---|
| 50 | <div class="wy-side-nav-search"> |
---|
| 51 | |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | <a class="shrink" href="http://zoo-project.org"><img src="http://zoo-project.org/img/zoo-sun-logo.png" class="img-responsive sun" style="display: inline;"> ZOO</a> |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | |
---|
| 58 | </a> |
---|
| 59 | |
---|
| 60 | |
---|
| 61 | <div role="search"> |
---|
| 62 | <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> |
---|
| 63 | <input type="text" name="q" placeholder="Search docs" /> |
---|
| 64 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
| 65 | <input type="hidden" name="area" value="default" /> |
---|
| 66 | </form> |
---|
| 67 | </div> |
---|
| 68 | |
---|
| 69 | |
---|
| 70 | </div> |
---|
| 71 | |
---|
| 72 | <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | <ul class="current"> |
---|
| 77 | <li class="toctree-l1"><a class="reference internal" href="../intro.html">Introduction</a><ul> |
---|
| 78 | <li class="toctree-l2"><a class="reference internal" href="../intro.html#what-is-zoo-project">What is ZOO-Project ?</a></li> |
---|
| 79 | <li class="toctree-l2"><a class="reference internal" href="../intro.html#zoo-project-components">ZOO-Project components</a></li> |
---|
| 80 | <li class="toctree-l2"><a class="reference internal" href="../intro.html#open-source">Open Source</a></li> |
---|
| 81 | </ul> |
---|
| 82 | </li> |
---|
| 83 | <li class="toctree-l1"><a class="reference internal" href="../install/index.html">ZOO-Project installation</a><ul> |
---|
| 84 | <li class="toctree-l2"><a class="reference internal" href="../install/install-prerequisites.html">Prerequisites</a></li> |
---|
| 85 | <li class="toctree-l2"><a class="reference internal" href="../install/install-download.html">Download</a></li> |
---|
| 86 | <li class="toctree-l2"><a class="reference internal" href="../install/install-confoptions.html">Configure options</a></li> |
---|
| 87 | <li class="toctree-l2"><a class="reference internal" href="../install/install-installation.html">Installation on Unix/Linux</a></li> |
---|
| 88 | <li class="toctree-l2"><a class="reference internal" href="../install/install-onwindows.html">Installation on Windows ™</a></li> |
---|
| 89 | <li class="toctree-l2"><a class="reference internal" href="../install/install-onmacos.html">Installation on MacOSX ™</a></li> |
---|
| 90 | </ul> |
---|
| 91 | </li> |
---|
| 92 | <li class="toctree-l1 current"><a class="reference internal" href="index.html">ZOO-Kernel</a><ul class="current"> |
---|
| 93 | <li class="toctree-l2"><a class="reference internal" href="what.html">What is ZOO-Kernel ?</a></li> |
---|
| 94 | <li class="toctree-l2"><a class="reference internal" href="configuration.html">ZOO-Kernel configuration</a></li> |
---|
| 95 | <li class="toctree-l2 current"><a class="current reference internal" href="">Optional MapServer support</a></li> |
---|
| 96 | <li class="toctree-l2"><a class="reference internal" href="orfeotoolbox.html">Optional Orfeo Toolbox support</a></li> |
---|
| 97 | <li class="toctree-l2"><a class="reference internal" href="sagagis.html">Optional SAGA GIS support</a></li> |
---|
| 98 | </ul> |
---|
| 99 | </li> |
---|
| 100 | <li class="toctree-l1"><a class="reference internal" href="../services/index.html">ZOO-Services</a><ul> |
---|
| 101 | <li class="toctree-l2"><a class="reference internal" href="../services/what.html">What are ZOO-Services ?</a></li> |
---|
| 102 | <li class="toctree-l2"><a class="reference internal" href="../services/zcfg-reference.html">ZOO-Service configuration file</a></li> |
---|
| 103 | <li class="toctree-l2"><a class="reference internal" href="../services/process-profiles.html">Process profiles registry</a></li> |
---|
| 104 | <li class="toctree-l2"><a class="reference internal" href="../services/howtos.html">Create your own ZOO-Services</a></li> |
---|
| 105 | <li class="toctree-l2"><a class="reference internal" href="../services/status.html">ZOO Status Service</a></li> |
---|
| 106 | <li class="toctree-l2"><a class="reference internal" href="../services/debug.html">Debugging ZOO Services</a></li> |
---|
| 107 | <li class="toctree-l2"><a class="reference internal" href="../services/zoo-services.html">Available ZOO-Services</a></li> |
---|
| 108 | </ul> |
---|
| 109 | </li> |
---|
| 110 | <li class="toctree-l1"><a class="reference internal" href="../api/index.html">ZOO-API</a><ul> |
---|
| 111 | <li class="toctree-l2"><a class="reference internal" href="../api/what.html">What is ZOO-API ?</a></li> |
---|
| 112 | <li class="toctree-l2"><a class="reference internal" href="../api/howto.html">Using ZOO-API</a></li> |
---|
| 113 | <li class="toctree-l2"><a class="reference internal" href="../api/classes.html">ZOO-API Classes</a></li> |
---|
| 114 | <li class="toctree-l2"><a class="reference internal" href="../api/examples.html">Examples</a></li> |
---|
| 115 | </ul> |
---|
| 116 | </li> |
---|
| 117 | <li class="toctree-l1"><a class="reference internal" href="../client/index.html">ZOO-Client</a><ul> |
---|
| 118 | <li class="toctree-l2"><a class="reference internal" href="../client/what.html">What is ZOO-Client ?</a></li> |
---|
| 119 | <li class="toctree-l2"><a class="reference internal" href="../client/howto.html">Using ZOO-Client</a></li> |
---|
| 120 | <li class="toctree-l2"><a class="reference internal" href="../client/example.html">Example application</a></li> |
---|
| 121 | </ul> |
---|
| 122 | </li> |
---|
| 123 | <li class="toctree-l1"><a class="reference internal" href="../contribute/index.html">Contributor Guide</a><ul> |
---|
| 124 | <li class="toctree-l2"><a class="reference internal" href="../contribute/howto.html">How to contribute ?</a></li> |
---|
| 125 | <li class="toctree-l2"><a class="reference internal" href="../contribute/code.html">Contribute code</a></li> |
---|
| 126 | </ul> |
---|
| 127 | </li> |
---|
| 128 | </ul> |
---|
| 129 | |
---|
| 130 | |
---|
| 131 | |
---|
| 132 | </div> |
---|
| 133 | |
---|
| 134 | </nav> |
---|
| 135 | |
---|
| 136 | <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
---|
| 137 | |
---|
| 138 | |
---|
| 139 | <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> |
---|
| 140 | <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
---|
| 141 | <a href="../contents.html">ZOO-Project</a> |
---|
| 142 | </nav> |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | |
---|
| 146 | <div class="wy-nav-content"> |
---|
| 147 | <div class="rst-content"> |
---|
| 148 | <div role="navigation" aria-label="breadcrumbs navigation"> |
---|
| 149 | <ul class="wy-breadcrumbs"> |
---|
| 150 | |
---|
| 151 | <li><a href="../contents.html"> Docs</a> ∕  </li> |
---|
| 152 | |
---|
| 153 | <li><a href="index.html">ZOO-Kernel</a> ∕  </li> |
---|
| 154 | |
---|
| 155 | <li>Optional MapServer support</li> |
---|
| 156 | <li class="wy-breadcrumbs-aside"> |
---|
| 157 | |
---|
| 158 | <a href="../_sources/kernel/mapserver.txt" rel="nofollow"> View page source</a> |
---|
| 159 | |
---|
| 160 | </li> |
---|
| 161 | </ul> |
---|
| 162 | <hr/> |
---|
| 163 | </div> |
---|
| 164 | <div role="main" class="document"> |
---|
| 165 | |
---|
| 166 | <div class="section" id="optional-mapserver-support"> |
---|
| 167 | <span id="kernel-mapserver"></span><h1>Optional MapServer support<a class="headerlink" href="#optional-mapserver-support" title="Permalink to this headline">¶</a></h1> |
---|
| 168 | <p>Processing geospatial data using WPS Services is usefull. Publishing their results directly as WMS, WFS or WCS ressources is even more convenient. This is possible since <a class="reference external" href="http://zoo-project.org">ZOO-Project 1.3</a> using the <strong>optional MapServer support</strong>. The latter thus allows for automatic publication of WPS Service output as WMS/WFS or WCS using a <a class="reference internal" href="index.html#kernel-index"><span>ZOO-Kernel</span></a> specific internal mechanism which is detailed in this section.</p> |
---|
| 169 | <div class="admonition note"> |
---|
| 170 | <p class="first admonition-title">Note</p> |
---|
| 171 | <p class="last"><a class="reference internal" href="../_images/mapserver.png"><img alt="MapServer logo" src="../_images/mapserver.png" style="width: 37.0px; height: 37.0px;" /></a> <a class="reference external" href="http://mapserver.org">MapServer</a> is an open source WMS/WFS/WCS server. Learn more by reading its <a class="reference external" href="http://mapserver.org/documentation.html">documentation</a>.</p> |
---|
| 172 | </div> |
---|
| 173 | <div class="section" id="how-does-it-work"> |
---|
| 174 | <h2>How does it work ?<a class="headerlink" href="#how-does-it-work" title="Permalink to this headline">¶</a></h2> |
---|
| 175 | <p>If a request with <code class="docutils literal"><span class="pre">mimeType=image/png</span></code> is sent to <a class="reference internal" href="index.html#kernel-index"><span>ZOO-Kernel</span></a>, the latter will detect that the <em>useMapServer</em> option is set to true an it will automatically:</p> |
---|
| 176 | <blockquote> |
---|
| 177 | <div><ul class="simple"> |
---|
| 178 | <li>Execute the service using the <em><Default></em> block definition (these values must be understood by <a class="reference external" href="http:/gdal.org">GDAL</a>)</li> |
---|
| 179 | <li>Store the resulting output on disk (in the <code class="docutils literal"><span class="pre">[main]</span></code> > <code class="docutils literal"><span class="pre">dataPath</span></code> directory)</li> |
---|
| 180 | <li>Write a <a class="reference external" href="http://mapserver.org/mapfile/index.html">mapfile</a> (in the <code class="docutils literal"><span class="pre">[main]</span></code> > <code class="docutils literal"><span class="pre">dataPath</span></code> directory) using the <a class="reference external" href="http://mapserver.org">MapServer</a> C-API (this sets up both WMS and WFS services).</li> |
---|
| 181 | </ul> |
---|
| 182 | </div></blockquote> |
---|
| 183 | <p>Existing WPS Services source code doesn’t need to be modified once the MapServer support is activated. It only takes to edit their respective <a class="reference internal" href="../services/zcfg-reference.html#services-zcfg"><span>ZOO-Service configuration file</span></a> files accordingly.</p> |
---|
| 184 | <div class="admonition note"> |
---|
| 185 | <p class="first admonition-title">Note</p> |
---|
| 186 | <p class="last">In case of a vector data source output, both WMS and WFS configuration are included by default in the resulting mapfile.</p> |
---|
| 187 | </div> |
---|
| 188 | <div class="admonition note"> |
---|
| 189 | <p class="first admonition-title">Note</p> |
---|
| 190 | <p class="last">In case of a raster data source output, both WMS and WCS configuration are included by default in the resulting mapfile.</p> |
---|
| 191 | </div> |
---|
| 192 | <p>Depending on the requests, ZOO-Kernel is able to return a location header and different request types:</p> |
---|
| 193 | <blockquote> |
---|
| 194 | <div><ul class="simple"> |
---|
| 195 | <li><a class="reference external" href="mailto:ResponseDocument=XXXX%40asReference=true">ResponseDocument=XXXX<span>@</span>asReference=true</a></li> |
---|
| 196 | </ul> |
---|
| 197 | </div></blockquote> |
---|
| 198 | <p>In this case, ZOO-Kernel will return the GetMap/GetFeature/GetCoverage request as KVP in the <em>href</em> of the result.</p> |
---|
| 199 | <blockquote> |
---|
| 200 | <div><ul class="simple"> |
---|
| 201 | <li><a class="reference external" href="mailto:ResponseDocument=XXXX%40asReference=false">ResponseDocument=XXXX<span>@</span>asReference=false</a></li> |
---|
| 202 | </ul> |
---|
| 203 | </div></blockquote> |
---|
| 204 | <p>In this case, ZOO-Kernel will return the result of the GetMap/GetFeature/GetCoverage request as KVP of the href used in the previous case.</p> |
---|
| 205 | <blockquote> |
---|
| 206 | <div><ul class="simple"> |
---|
| 207 | <li><a class="reference external" href="mailto:RawDataOutput=XXXX%40asReference=true/false">RawDataOutput=XXXX<span>@</span>asReference=true/false</a></li> |
---|
| 208 | </ul> |
---|
| 209 | </div></blockquote> |
---|
| 210 | <p>In this case, ZOO-Kernel will return the GetMap/GetFeature/GetCoverage request as KVP in a specific location header, which implies that the browser is supposed to request MapServer directly.</p> |
---|
| 211 | <p>Whatever the default output <em>mimeType</em> returned by a WPS service is, it is used if the <em>useMapserver</em> option is found at runtime. As an example, if <code class="docutils literal"><span class="pre"><Default></span></code> and <code class="docutils literal"><span class="pre"><Supported></span></code> blocks are found in the ZOO Service configuration file as shown bellow, this means that the service returns GML 3.1.0 features by default.</p> |
---|
| 212 | <div class="highlight-guess"><div class="highlight"><pre><span class="nt"><Default></span> |
---|
| 213 | mimeType = text/xml |
---|
| 214 | encoding = UTF-8 |
---|
| 215 | schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd |
---|
| 216 | <span class="nt"></Default></span> |
---|
| 217 | <span class="nt"><Supported></span> |
---|
| 218 | mimeType = image/png |
---|
| 219 | useMapserver = true |
---|
| 220 | <span class="nt"></Supported></span> |
---|
| 221 | </pre></div> |
---|
| 222 | </div> |
---|
| 223 | </div> |
---|
| 224 | <div class="section" id="installation-and-configuration"> |
---|
| 225 | <h2>Installation and configuration<a class="headerlink" href="#installation-and-configuration" title="Permalink to this headline">¶</a></h2> |
---|
| 226 | <p>Follow the step described bellow in order to activate the ZOO-Project optional MapServer support.</p> |
---|
| 227 | <div class="section" id="prerequisites"> |
---|
| 228 | <h3>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h3> |
---|
| 229 | <blockquote> |
---|
| 230 | <div><ul class="simple"> |
---|
| 231 | <li>latest <a class="reference external" href="http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel">ZOO-Kernel</a> trunk version</li> |
---|
| 232 | <li><a class="reference external" href="http://mapserver/org">MapServer</a> version >= 6.0.1</li> |
---|
| 233 | </ul> |
---|
| 234 | </div></blockquote> |
---|
| 235 | <p>First download the lastest zoo-kernel by checking out the svn. Use the following command from do the directory where your previously checked out (in this example we will use <code class="docutils literal"><span class="pre"><PREV_SVN_CO></span></code> to design this directory).</p> |
---|
| 236 | <div class="highlight-guess"><div class="highlight"><pre>cd <PREV_SVN_CO> |
---|
| 237 | svn checkout http://svn.zoo-project.org/svn/trunk/zoo-kernel zoo-kernel-ms |
---|
| 238 | </pre></div> |
---|
| 239 | </div> |
---|
| 240 | <p>Then uncompress the MapServer archive (ie. <code class="docutils literal"><span class="pre">mapserver-6.0.1.tar.bz2</span></code>) into <code class="docutils literal"><span class="pre">/tmp/zoo-ms-src</span></code>, and compile it using the following command:</p> |
---|
| 241 | <div class="highlight-guess"><div class="highlight"><pre>cd /tmp/zoo-ms-src/mapserver-6.0.1 |
---|
| 242 | ./configure --with-ogr=/usr/bin/gdal-config --with-gdal=/usr/bin/gdal-config \ |
---|
| 243 | --with-proj --with-curl --with-sos --with-wfsclient --with-wmsclient \ |
---|
| 244 | --with-wcs --with-wfs --with-postgis --with-kml=yes --with-geos \ |
---|
| 245 | --with-xml --with-xslt --with-threads --with-cairo |
---|
| 246 | make |
---|
| 247 | cp mapserv /usr/lib/cgi-bin |
---|
| 248 | </pre></div> |
---|
| 249 | </div> |
---|
| 250 | <p>Once done, compile ZOO-Kernel with MapServer support from the <code class="docutils literal"><span class="pre"><PREV_SVN_CO></span></code> directory, using the following command:</p> |
---|
| 251 | <div class="highlight-guess"><div class="highlight"><pre>cd zoo-kernel-ms |
---|
| 252 | autoconf |
---|
| 253 | ./configure --with-python --with-mapserver=/tmp/zoo-ms-src/mapserver-6.0.1 |
---|
| 254 | make |
---|
| 255 | </pre></div> |
---|
| 256 | </div> |
---|
| 257 | <p>You can then copy the new ZOO-Kernel to <code class="docutils literal"><span class="pre">/usr/lib/cgi-bin</span></code> directory, as follow:</p> |
---|
| 258 | <div class="highlight-guess"><div class="highlight"><pre>cp zoo_loader.cgi /usr/lib/cgi-bin |
---|
| 259 | </pre></div> |
---|
| 260 | </div> |
---|
| 261 | </div> |
---|
| 262 | <div class="section" id="main-configuration-file"> |
---|
| 263 | <h3>Main configuration file<a class="headerlink" href="#main-configuration-file" title="Permalink to this headline">¶</a></h3> |
---|
| 264 | <p>Open and edit the <code class="docutils literal"><span class="pre">/usr/lib/cgi-bin/main.cfg</span></code> file, by adding the following content in the <code class="docutils literal"><span class="pre">[main]</span></code> section:</p> |
---|
| 265 | <div class="highlight-guess"><div class="highlight"><pre>dataPath = /var/www/temp/ |
---|
| 266 | mapserverAddress=http://localhost/cgi-bin/mapserv |
---|
| 267 | </pre></div> |
---|
| 268 | </div> |
---|
| 269 | <p>The <code class="docutils literal"><span class="pre">dataPath</span></code> directory is mandatory and must belong to the Apache user.</p> |
---|
| 270 | <div class="highlight-guess"><div class="highlight"><pre>mkdir /var/www/temp/ |
---|
| 271 | chown -r apache:apache /var/www/temp/ |
---|
| 272 | </pre></div> |
---|
| 273 | </div> |
---|
| 274 | <p>A <code class="docutils literal"><span class="pre">symbols.sym</span></code> file is required in this directory. Create it and add the following content in it:</p> |
---|
| 275 | <div class="highlight-guess"><div class="highlight"><pre>SYMBOLSET |
---|
| 276 | SYMBOL |
---|
| 277 | NAME "circle" |
---|
| 278 | TYPE ellipse |
---|
| 279 | FILLED true |
---|
| 280 | POINTS |
---|
| 281 | 1 1 |
---|
| 282 | END |
---|
| 283 | END |
---|
| 284 | END |
---|
| 285 | </pre></div> |
---|
| 286 | </div> |
---|
| 287 | <div class="admonition note"> |
---|
| 288 | <p class="first admonition-title">Note</p> |
---|
| 289 | <p class="last">Only one symbol definition is required (with any name) for the WMS service output.</p> |
---|
| 290 | </div> |
---|
| 291 | <p>The ZOO-Project optional MapServer support is activated at this step. Don’t forget to add the <code class="docutils literal"><span class="pre">mapserverAddress</span></code> and <code class="docutils literal"><span class="pre">msOgcVersion</span></code> parameters to the <code class="docutils literal"><span class="pre">main.cfg</span></code> file in order to to specify the path to MapServer and the OGC WebService version used by the Services.</p> |
---|
| 292 | <div class="admonition warning"> |
---|
| 293 | <p class="first admonition-title">Warning</p> |
---|
| 294 | <p class="last">ZOO-kernel will segfault (checking <code class="docutils literal"><span class="pre">NULL</span></code> value should correct this behavior) if the <code class="docutils literal"><span class="pre">mapserverAddress</span></code> parameter is not found</p> |
---|
| 295 | </div> |
---|
| 296 | </div> |
---|
| 297 | <div class="section" id="service-configuration-file"> |
---|
| 298 | <h3>Service configuration file<a class="headerlink" href="#service-configuration-file" title="Permalink to this headline">¶</a></h3> |
---|
| 299 | <div class="section" id="usemapserver"> |
---|
| 300 | <h4>useMapserver<a class="headerlink" href="#usemapserver" title="Permalink to this headline">¶</a></h4> |
---|
| 301 | <p>In order to activate the MapServer WMS/WFS/WCS output for a specific service, the <code class="docutils literal"><span class="pre">useMapserver</span></code> parameter must be added to the <code class="docutils literal"><span class="pre"><Default></span></code> or <code class="docutils literal"><span class="pre"><Supported></span></code> blocks of the Service <cite>services-zcfg</cite>. If <code class="docutils literal"><span class="pre">useMapserver=true</span></code>, this means that the output result of the Service is a GDAL compatible datasource and that you want it to be automatically published by MapServer as WMS,WFS or WCS.</p> |
---|
| 302 | <p>When the useMapserver option is used in a <code class="docutils literal"><span class="pre"><Default></span></code> or <code class="docutils literal"><span class="pre"><Supported></span></code> block, then you have to know what are the corresponding mimeType:</p> |
---|
| 303 | <blockquote> |
---|
| 304 | <div><ul class="simple"> |
---|
| 305 | <li>text/xml: Implies that the output data will be accessible through a WFS GetFeature request (default protocol version 1.1.0)</li> |
---|
| 306 | <li>image/tiff: Implies that the output data will be accessible through a WCS GetCoverage request (default protocol version 2.0.0)</li> |
---|
| 307 | <li>any other mimeType coupled with useMapserver option: Implies that the output data will be accessible through a WMS GetMap request (default protocol version 1.3.0). You can check the supported output mimeType by sending a GetCapabilities request to MapServer.</li> |
---|
| 308 | </ul> |
---|
| 309 | </div></blockquote> |
---|
| 310 | <p>You get the same optional parameter <code class="docutils literal"><span class="pre">msOgcVersion</span></code> as for the <code class="docutils literal"><span class="pre">main.cfg</span></code>. This will specify that this is the specific protocol version the service want to use (so you may set also locally to service rather than globally).</p> |
---|
| 311 | </div> |
---|
| 312 | <div class="section" id="styling"> |
---|
| 313 | <h4>Styling<a class="headerlink" href="#styling" title="Permalink to this headline">¶</a></h4> |
---|
| 314 | <p>The optional <code class="docutils literal"><span class="pre">msStyle</span></code> parameter can also be used to define a custom MapServer style block (used for vector datasource only), as follow:</p> |
---|
| 315 | <div class="highlight-guess"><div class="highlight"><pre>msStyle = STYLE COLOR 125 0 105 OUTLINECOLOR 0 0 0 WIDTH 3 END |
---|
| 316 | </pre></div> |
---|
| 317 | </div> |
---|
| 318 | <p>If a WPS service outputs a one band raster file, then it is possible to add a <code class="docutils literal"><span class="pre">msClassify</span></code> parameter and set it to <code class="docutils literal"><span class="pre">true</span></code> in the output ComplexData <code class="docutils literal"><span class="pre"><Default></span></code> or <code class="docutils literal"><span class="pre"><Supported></span></code> nodes of its <code class="docutils literal"><span class="pre">zcfg</span></code> file. This allows ZOO-Kernel to use its own default style definitions in order to classify the raster using equivalent intervals.</p> |
---|
| 319 | <div class="highlight-guess"><div class="highlight"><pre>msClassify = .... |
---|
| 320 | </pre></div> |
---|
| 321 | </div> |
---|
| 322 | </div> |
---|
| 323 | <div class="section" id="example"> |
---|
| 324 | <h4>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h4> |
---|
| 325 | <p>An example <a class="reference internal" href="../services/zcfg-reference.html#services-zcfg"><span>ZOO-Service configuration file</span></a> file configured for the optional MapServer support is shown bellow:</p> |
---|
| 326 | <div class="highlight-guess"><div class="highlight"><pre><span class="nt"><Default></span> |
---|
| 327 | mimeType = text/xml |
---|
| 328 | encoding = UTF-8 |
---|
| 329 | schema = http://schemas.opengis.net/gml/3.1.0/base/feature.xsd |
---|
| 330 | useMapserver = true |
---|
| 331 | <span class="nt"></Default></span> |
---|
| 332 | <span class="nt"><Supported></span> |
---|
| 333 | mimeType = image/png |
---|
| 334 | useMapserver = true |
---|
| 335 | asReference = true |
---|
| 336 | msStyle = STYLE COLOR 125 0 105 OUTLINECOLOR 0 0 0 WIDTH 3 END |
---|
| 337 | <span class="nt"></Supported></span> |
---|
| 338 | <span class="nt"><Supported></span> |
---|
| 339 | mimeType = application/vnd.google-earth.kmz |
---|
| 340 | useMapserver = true |
---|
| 341 | asReference = true |
---|
| 342 | msStyle = STYLE COLOR 125 0 105 OUTLINECOLOR 0 0 0 WIDTH 3 END |
---|
| 343 | <span class="nt"></Supported></span> |
---|
| 344 | <span class="nt"><Supported></span> |
---|
| 345 | mimeType = image/tif |
---|
| 346 | useMapserver = true |
---|
| 347 | asReference = true |
---|
| 348 | msClassify = .... |
---|
| 349 | <span class="nt"></Supported></span> |
---|
| 350 | </pre></div> |
---|
| 351 | </div> |
---|
| 352 | <p>In this example, the default output <code class="docutils literal"><span class="pre">mimeType</span></code> is <code class="docutils literal"><span class="pre">image/png</span></code>, so a WMS GetMap request will be returned, or the resulting <code class="docutils literal"><span class="pre">image/tiff</span></code> will be returned as WCS GetCoverage request.</p> |
---|
| 353 | </div> |
---|
| 354 | </div> |
---|
| 355 | </div> |
---|
| 356 | <div class="section" id="test-requests"> |
---|
| 357 | <h2>Test requests<a class="headerlink" href="#test-requests" title="Permalink to this headline">¶</a></h2> |
---|
| 358 | <p>The optional MapServer support can be tested using any service. The |
---|
| 359 | simple <em>HelloPy</em> Service is used in the following example requests.</p> |
---|
| 360 | <div class="admonition note"> |
---|
| 361 | <p class="first admonition-title">Note</p> |
---|
| 362 | <p class="last">The following examples require a zip file containing a Shapefile (<a class="reference external" href="http://localhost/data/data.zip">http://localhost/data/data.zip</a>) and a tif file (<a class="reference external" href="http://localhost/data/demo.tif">http://localhost/data/demo.tif</a>)</p> |
---|
| 363 | </div> |
---|
| 364 | <p>Accessing a remote Zipped Shapefile as WFS GetFeatures Request:</p> |
---|
| 365 | <div class="highlight-guess"><div class="highlight"><pre>http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=HelloPy&DataInputs=a=Reference@xlink:href=http://localhost/data/data.zip&ResponseDocument=Result@asReference=true@mimetype=text/xml |
---|
| 366 | </pre></div> |
---|
| 367 | </div> |
---|
| 368 | <p>Accessing a remote Zipped Shapefile as WMS GetMap Request:</p> |
---|
| 369 | <div class="highlight-guess"><div class="highlight"><pre>http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=HelloPy&DataInputs=a=Reference@xlink:href=http://localhost/data/data.zip&ResponseDocument=Result@asReference=true@mimetype=image/png |
---|
| 370 | </pre></div> |
---|
| 371 | </div> |
---|
| 372 | <p>Accessing a remote tiff as WMS GetMap Request:</p> |
---|
| 373 | <div class="highlight-guess"><div class="highlight"><pre>http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=HelloPy&DataInputs=a=Reference@xlink:href=http://localhost/data/data.tiff&ResponseDocument=Result@asReference=true@mimetype=image/png |
---|
| 374 | </pre></div> |
---|
| 375 | </div> |
---|
| 376 | <p>Accessing a remote tiff as WCS GetMap Request:</p> |
---|
| 377 | <div class="highlight-guess"><div class="highlight"><pre>http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=HelloPy&DataInputs=a=Reference@xlink:href=http://localhost/data/data.tiff&ResponseDocument=Result@asReference=true@mimetype=image/tiff |
---|
| 378 | </pre></div> |
---|
| 379 | </div> |
---|
| 380 | </div> |
---|
| 381 | </div> |
---|
| 382 | |
---|
| 383 | |
---|
| 384 | </div> |
---|
| 385 | <footer> |
---|
| 386 | |
---|
| 387 | <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
---|
| 388 | |
---|
| 389 | <a href="orfeotoolbox.html" class="btn btn-neutral float-right" title="Optional Orfeo Toolbox support">Next <span class="fa fa-arrow-circle-right"></span></a> |
---|
| 390 | |
---|
| 391 | |
---|
| 392 | <a href="configuration.html" class="btn btn-neutral" title="ZOO-Kernel configuration"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
---|
| 393 | |
---|
| 394 | </div> |
---|
| 395 | |
---|
| 396 | |
---|
| 397 | <hr/> |
---|
| 398 | <div class="pfoot"> |
---|
| 399 | <div role="contentinfo"> |
---|
| 400 | <p> |
---|
| 401 | © Copyright 2009-2015, ZOO-Project team. |
---|
| 402 | </p> |
---|
| 403 | </div> |
---|
| 404 | Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> inspired by <a href="https://readthedocs.org">Read the Docs</a>. |
---|
| 405 | </div> |
---|
| 406 | </footer> |
---|
| 407 | |
---|
| 408 | </div> |
---|
| 409 | </div> |
---|
| 410 | |
---|
| 411 | </section> |
---|
| 412 | |
---|
| 413 | </div> |
---|
| 414 | |
---|
| 415 | |
---|
| 416 | |
---|
| 417 | |
---|
| 418 | |
---|
| 419 | <script type="text/javascript"> |
---|
| 420 | var DOCUMENTATION_OPTIONS = { |
---|
| 421 | URL_ROOT:'../', |
---|
| 422 | VERSION:'1.4a0', |
---|
| 423 | COLLAPSE_INDEX:false, |
---|
| 424 | FILE_SUFFIX:'.html', |
---|
| 425 | HAS_SOURCE: true |
---|
| 426 | }; |
---|
| 427 | </script> |
---|
| 428 | <script type="text/javascript" src="../_static/jquery.js"></script> |
---|
| 429 | <script type="text/javascript" src="../_static/underscore.js"></script> |
---|
| 430 | <script type="text/javascript" src="../_static/doctools.js"></script> |
---|
| 431 | |
---|
| 432 | |
---|
| 433 | |
---|
| 434 | |
---|
| 435 | |
---|
| 436 | <script type="text/javascript" src="../_static/js/theme.js"></script> |
---|
| 437 | |
---|
| 438 | |
---|
| 439 | |
---|
| 440 | |
---|
| 441 | <script type="text/javascript"> |
---|
| 442 | jQuery(function () { |
---|
| 443 | SphinxRtdTheme.StickyNav.enable(); |
---|
| 444 | }); |
---|
| 445 | </script> |
---|
| 446 | |
---|
| 447 | |
---|
| 448 | </body> |
---|
| 449 | </html> |
---|