Changeset 917 for trunk/docs/kernel/mapserver.rst
- Timestamp:
- May 7, 2019, 2:17:08 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo
set to
False
/branches/prototype-v0 merged eligible
-
Property
svn:mergeinfo
set to
False
-
trunk/docs/kernel/mapserver.rst
r752 r917 73 73 * `MapServer <http://mapserver/org>`__ version >= 6.0.1 74 74 75 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 `` <PREV_SVN_CO>`` to design this directory).76 77 .. code-block:: guess 78 79 cd <PREV_SVN_CO>80 svn checkout http://svn.zoo-project.org/svn/trunk/zoo-kernel zoo-kernel-ms81 75 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 ``$PREV_SVN_CO`` to design this directory). 76 77 .. code-block:: guess 78 79 svn checkout http://svn.zoo-project.org/svn/trunk/ $PREV_SVN_CO 80 cd $PREV_SVN_CO 81 82 82 Then uncompress the MapServer archive (ie. ``mapserver-6.0.1.tar.bz2``) into ``/tmp/zoo-ms-src``, and compile it using the following command: 83 83 … … 92 92 cp mapserv /usr/lib/cgi-bin 93 93 94 Once done, compile ZOO-Kernel with MapServer support from the `` <PREV_SVN_CO>`` directory, using the following command:95 96 .. code-block:: guess 97 98 cd zoo-kernel -ms94 Once done, compile ZOO-Kernel with MapServer support from the ``$PREV_SVN_CO`` directory, using the following command: 95 96 .. code-block:: guess 97 98 cd zoo-kernel 99 99 autoconf 100 100 ./configure --with-python --with-mapserver=/tmp/zoo-ms-src/mapserver-6.0.1 101 101 make 102 103 You can then copy the new ZOO-Kernel to ``/usr/lib/cgi-bin`` directory, as follow: 104 105 .. code-block:: guess 106 107 cp zoo_loader.cgi /usr/lib/cgi-bin 102 sudo make install 108 103 109 104 … … 119 114 dataPath = /var/www/temp/ 120 115 mapserverAddress=http://localhost/cgi-bin/mapserv 116 117 You can also add the following lines to the ``[main]`` section, in case 118 you want to use a default style for Polygon, Lines and Points vector 119 layer. 120 121 .. code-block:: guess 122 123 msStylePoly=STYLE COLOR 202 109 19 OUTLINECOLOR 105 105 105 WIDTH 3 END 124 msStyleLine=STYLE OUTLINECOLOR 202 109 19 WIDTH 3 END 125 msStylePoint=STYLE COLOR 202 109 19 OUTLINECOLOR 105 105 105 SYMBOL 0 SIZE 14 END 121 126 122 127 The ``dataPath`` directory is mandatory and must belong to the Apache user. … … 175 180 ************* 176 181 182 You have different options to define the style of the layer created 183 using the data returned by your service. 184 185 msStyle 186 +++++++ 187 177 188 The optional ``msStyle`` parameter can also be used to define a custom MapServer style block (used for vector datasource only), as follow: 178 189 … … 181 192 msStyle = STYLE COLOR 125 0 105 OUTLINECOLOR 0 0 0 WIDTH 3 END 182 193 183 If a WPS service outputs a one band raster file, then it is possible to add a ``msClassify`` parameter and set it to ``true`` in the output ComplexData ``<Default>`` or ``<Supported>`` nodes of its ``zcfg`` file. This allows ZOO-Kernel to use its own default style definitions in order to classify the raster using equivalent intervals. 184 185 .. code-block:: guess 186 187 msClassify = .... 194 msClassify 195 ++++++++++ 196 197 If a WPS service outputs a one band raster file, then it is possible 198 to add a ``msClassify`` parameter and set it to ``true`` in the output 199 ComplexData ``<Default>`` or ``<Supported>`` nodes of its zcfg 200 file. This allows ZOO-Kernel to use its own default style definitions 201 in order to classify the raster using equivalent intervals. 202 203 .. code-block:: guess 204 205 msClassify = true 206 207 208 msInclude 209 +++++++++ 210 211 In case you want to use another layer which use the result of your 212 service, for instance to produce a `heatmap 213 <https://mapserver.org/output/kerneldensity.html>`_, then you can use 214 the 215 ``msInclude`` and ``msLayer`` options in the output ``ComplexData`` 216 ``<Default>`` or ``<Supported>`` nodes of its zcfg file. You can see below an 217 example of use of this two options with the associated mapfile. 218 219 .. code-block:: guess 220 221 msInclude = /var/data/template.map 222 msLayer = heatmap 223 224 You can find below a sample ``/var/data/template.map``: 225 226 .. code-block:: guess 227 228 MAP 229 SIZE 1000 500 230 EXTENT -180 -90 180 90 231 NAME "test heat" 232 IMAGETYPE "png" 233 234 WEB 235 METADATA 236 "ows_srs" "epsg:4326 epsg:3857 epsg:900913" 237 "ows_enable_request" "*" 238 END # METADATA 239 END # WEB 240 241 PROJECTION 242 "+init=epsg:4326" 243 END # PROJECTION 244 245 LAYER 246 NAME "heatmap" # Corresponding to the msLayer defined 247 TYPE raster 248 CONNECTIONTYPE kerneldensity 249 CONNECTION "Result" 250 STATUS on 251 PROCESSING "RANGE_COLORSPACE=HSL" 252 PROCESSING "KERNELDENSITY_RADIUS=20" 253 PROCESSING "KERNELDENSITY_COMPUTE_BORDERS=ON" 254 PROCESSING "KERNELDENSITY_NORMALIZATION=AUTO" 255 OFFSITE 0 0 0 256 CLASS 257 STYLE 258 COLORRANGE "#0000ff00" "#0000ffff" 259 DATARANGE 0 32 260 END # STYLE 261 STYLE 262 COLORRANGE "#0000ffff" "#ff0000ff" 263 DATARANGE 32 255 264 END # STYLE 265 END # CLASS 266 END # LAYER 267 268 LAYER 269 NAME "points" 270 STATUS on 271 TYPE POINT 272 #DATA "/Library/WebServer/cache//ef76ee6642c1ea704e847e28120ba1ca.zca" 273 END # LAYER 274 END # MAPFILE 275 276 277 188 278 189 279 Example … … 216 306 useMapserver = true 217 307 asReference = true 218 msClassify = ....308 msClassify = true 219 309 </Supported> 220 310
Note: See TracChangeset
for help on using the changeset viewer.