Ignore:
Timestamp:
May 7, 2019, 2:17:08 PM (5 years ago)
Author:
djay
Message:

Merge prototype-v0 branch in trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/docs/kernel/mapserver.rst

    r752 r917  
    7373   * `MapServer <http://mapserver/org>`__ version >= 6.0.1
    7474
    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-ms
    81 
     75First 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   
    8282Then uncompress the MapServer archive (ie. ``mapserver-6.0.1.tar.bz2``) into ``/tmp/zoo-ms-src``, and compile it using the following command:
    8383
     
    9292     cp mapserv /usr/lib/cgi-bin
    9393
    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-ms
     94Once 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
    9999     autoconf
    100100     ./configure --with-python --with-mapserver=/tmp/zoo-ms-src/mapserver-6.0.1
    101101     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
    108103
    109104
     
    119114      dataPath = /var/www/temp/
    120115      mapserverAddress=http://localhost/cgi-bin/mapserv
     116
     117You can also add the following lines to the ``[main]`` section, in case
     118you want to use a default style for Polygon, Lines and Points vector
     119layer.
     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
    121126
    122127The ``dataPath`` directory is mandatory and must belong to the Apache user.
     
    175180*************
    176181
     182You have different options to define the style of the layer created
     183using the data returned by your service.
     184
     185msStyle
     186+++++++
     187
    177188The optional ``msStyle`` parameter can also be used to define a custom MapServer style block (used for vector datasource only), as follow:
    178189
     
    181192     msStyle = STYLE COLOR 125 0 105 OUTLINECOLOR 0 0 0 WIDTH 3 END
    182193
    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 = ....
     194msClassify
     195++++++++++
     196
     197If a WPS service outputs a one band raster file, then it is possible
     198to add a ``msClassify`` parameter and set it to ``true`` in the output
     199ComplexData ``<Default>`` or ``<Supported>`` nodes of its zcfg
     200file. This allows ZOO-Kernel to use its own default style definitions
     201in order to classify the raster using equivalent intervals. 
     202
     203.. code-block:: guess
     204
     205     msClassify = true
     206
     207
     208msInclude
     209+++++++++
     210
     211In case you want to use another layer which use the result of your
     212service, for instance to produce a `heatmap
     213<https://mapserver.org/output/kerneldensity.html>`_, then you can use
     214the
     215``msInclude`` and ``msLayer`` options in the output ``ComplexData``
     216``<Default>`` or ``<Supported>`` nodes of its zcfg file. You can see below an
     217example 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
     224You 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
    188278
    189279Example
     
    216306     useMapserver = true
    217307     asReference = true
    218      msClassify = ....
     308     msClassify = true
    219309    </Supported>
    220310
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png