Changeset 917 for trunk/docs


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

Merge prototype-v0 branch in trunk

Location:
trunk
Files:
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/docs/install/installation.rst

    r809 r917  
    147147    <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel/sql/schema.sql#L34>`_.
    148148
     149Metadata Database (Optional)
     150*****************************
     151
     152.. _zoo_create_metadb:
     153
     154It is possible to use a PostgreSQL database to store metadata
     155information about WPS Services. This support is optional and require
     156to be activated by using the ``--with-metadb=yes`` option.
     157
     158To create the database for storing the metadata informations about the
     159WPS Services, you may use the following command:
     160
     161.. code::
     162
     163    createdb zoo_metadb
     164    psql zoo_metadb -f zoo-project/zoo-kernel/sql/zoo_collectiondb.sql
     165
     166In case you want to convert an existing zcfg file then, you can use
     167the ``zcfg2sql`` tool from the command line. It can be found in
     168``thirds/zcfg2sql`` and can be build simply by running the ``make``
     169command. After compilation you only need to give it the path of the
     170zcfg file you want to obtain the SQL queries required to store the
     171metadata informations in the database rather than in zcfg file.
     172
     173For instance you may use the following command:
     174
     175.. code::
     176
     177    #Direct import in the zoo_metadb database
     178    ./zcfg2sql /Path/To/MyZCFGs/myService.zcfg | psql zoo_metadb
     179    #Create a SQL file for a futur import
     180    ./zcfg2sql /Path/To/MyZCFGs/myService.zcfg > myService.sql
     181
    149182
    150183
     
    154187If ``yaml.h`` file is not found in your ``/usr/include`` directory and
    155188``libyaml.so`` is not found in ``/usr/lib``, a ``--with-yaml`` option
    156 can be used to specify its location. For instance, if the headeer file
     189can be used to specify its location. For instance, if the header file
    157190lies in ``/usr/local/include`` and the shared library is located in
    158191``/usr/local/lib``, you may use the following command:
  • trunk/docs/kernel/configuration.rst

    r817 r917  
    9494   service providers, e.g., shared libraries with service implementations
    9595   (the ``serviceProvider`` parameter in the service configuration (.zcfg) file).   
     96 * ``memory``: (Optional) can take the value ``load`` to ensure that
     97   the value field of the inputs data will be filled by the ZOO-Kernel
     98   or ``protected`` to have only the ``cache_file`` filled.
     99
    96100
    97101.. warning::
    98102  The ``libPath`` parameter is currently only recognized by services implemented
    99103  in C/C++ or PHP, and may be moved to another section in future versions.
    100  
     104
     105
     106.. warning::
     107  Depending on the ``memory`` parameter the WPS Service will receive
     108  different fields (``value`` or ``cache_file``).
     109   
    101110In case you have activated the MapServer support, please refer to
    102111:ref:`this specific section <kernel-mapserver-main.cfg>`.
     
    264273    hosts=localhost,127.0.0.1
    265274
     275Optionaly, you can also define the shared url(s), meaning that even if
     276the ressource requires authentication to be accessed, this
     277authentifcation won't be used to define the name for storing the
     278file. Hence, two user with different authentication will use the same
     279file as it is considerated as shared. You can find bellow a sample
     280security section containing the shared parameter. In this example,
     281every requests to access the coverage using the url defined in the
     282shared parameter (``myHost/cgi-bin/WCS_Server``) will be shared
     283between users.
     284
     285.. code::
     286
     287    [security]
     288    attributes=Authorization,Cookie,User-Agent
     289    hosts=localhost,127.0.0.1
     290    shared=myHost/cgi-bin/WCS_Server
    266291
    267292.. _zoo_activate_db_backend:
     
    300325to setup the database.
    301326
     327
     328Database section
     329...............................
     330
     331The database section allows to configure the ZOO-Kernel to access the
     332metadata information about WPS Services by using a PostgreSQL database
     333in addition to the zcfg files.
     334
     335.. code-block:: guess
     336
     337        [metadb]
     338        dbname=zoo_metadb
     339        port=5432
     340        user=username
     341        host=127.0.0.1
     342        type=PG
     343
     344This will generate strings to be passed to GDAL to connect the
     345database server:
     346
     347.. code-block:: guess
     348   
     349    <type>:host=<host> port=<port>  user=<user> dbname=<dbname>
     350
     351
     352With the previous database section, it will give the following:
     353
     354.. code-block:: guess
     355
     356    PG:"dbname=zoo_metadb host=127.0.0.1 port=5432 user=username"
     357
     358Please refer to this `section <zoo_create_metadb>`_ to learn how
     359to setup the database.
     360
    302361Include section
    303362...............................
  • trunk/docs/kernel/index.rst

    r725 r917  
    1414   orfeotoolbox
    1515   sagagis
    16 
     16   hpc
  • 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
  • trunk/docs/kernel/sagagis.rst

    r725 r917  
    44======================
    55
    6 `SAGA GIS <http://orfeo-toolbox.org/otb/>`_ provides a comprehensive set of geoscientific methods and spatial algorithms. The optional SAGA GIS support is available since `ZOO-Project 1.5 <http://zoo-project.org>`__. It allows to execute the `SAGA Modules <http://www.saga-gis.org/saga_module_doc/2.1.4/index.html>`_ directly as ZOO WPS Services thanks to a :ref:`kernel_index` specific internal mechanism which is detailed in this section.
     6`SAGA GIS <http://www.saga-gis.org/>`_ provides a comprehensive set of geoscientific methods and spatial algorithms. The optional SAGA GIS support is available since `ZOO-Project 1.5 <http://zoo-project.org>`__. It allows to execute the `SAGA Modules <http://www.saga-gis.org/saga_module_doc/2.1.4/index.html>`_ directly as ZOO WPS Services thanks to a :ref:`kernel_index` specific internal mechanism which is detailed in this section.
    77
    88.. note::
    99
    10    |saga| `SAGA GIS <https://www.orfeo-toolbox.org>`__ is the System for Automated Geoscientific Analyses. Learn more on official `website <http://www.saga-gis.org/en/index.html>`__.
     10   |saga| `SAGA GIS <http://www.saga-gis.org/>`__ is the System for Automated Geoscientific Analyses. Learn more on official `website <http://www.saga-gis.org/en/index.html>`__.
    1111 
    1212
     
    2727
    2828   * latest `ZOO-Kernel <http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel>`_ trunk version
    29    * SAGA GIS (`SAGA-GIS 2.1.4  <http://saga-gis.org>`_ )
    30    * libLAS-1.2 (`LibLAS-1.2  <https://github.com/libLAS/libLAS-1.2>`_ )
     29   * `SAGA GIS  <http://saga-gis.org>`_  (7.2.0)
    3130
    3231Installation steps
    3332...........................
    3433
    35 .. Note:: These installation steps were successfully tested on Ubuntu 14.4 LTS
    36 
    37 Download lastest ZOO-Kernel code from SVN.
    38 
    39 .. code-block:: guess
    40 
    41     svn checkout http://svn.zoo-project.org/svn/trunk/zoo-kernel zoo-kernel
    42 
    43 Then compile ZOO-Kernel using the needed configuration options as shown bellow:
     34Compile ZOO-Kernel using the configuration options as shown bellow:
    4435
    4536.. code-block:: guess
     
    4738     cd zoo-kernel
    4839     autoconf
    49      ./configure  --with-saga=/usr/local/
     40     ./configure  --with-saga=/usr/local/ --with-saga-version=7
    5041     make
    5142
    52 And copy the newly created zoo_loader.cgi to ``/usr/lib/cgi-bin`` :
    53 
     43And copy the newly created zoo_loader.cgi to ``/usr/lib/cgi-bin``.
     44     
     45.. note::
     46   
     47    The ``--with-saga-version`` option let you set the major
     48    version number of SAGA-GIS. 
     49     
    5450.. code-block:: guess
    5551
     
    6258****************************
    6359
    64 Building the `saga2zcfg
    65 <http://zoo-project.org/trac/browser/trunk/thirds/otb2zcfg >`_ utility is required to activate the available SAGA-GIS Modules as WPS Services. This can be done using the following command:
     60Building the
     61`saga2zcfg <http://zoo-project.org/trac/browser/trunk/thirds/saga2zcfg>`_
     62utility is required to activate the available SAGA-GIS Modules as WPS
     63Services. This can be done using the following command:
    6664
    6765.. code-block:: guess
  • trunk/docs/services/howtos.rst

    r794 r917  
    439439  }
    440440
     441
     442R
     443----------
     444
     445ZOO API
     446*********
     447
     448For using the R language from the ZOO-Project, you have first to copy
     449``minimal.r`` in the same directory as the ZOO-Kernel.
     450
     451The ZOO-API is available from a R script and provide access to a
     452global zoo environment which contains both static variables and also
     453the dictionaries for outputs and conf:
     454
     455:int zoo[["SERVICE_SUCCEEDED"]]:
     456   Value to return in case your service end successfully.
     457:int zoo[["SERVICE_FAILED"]]:
     458   Value to retrun in case of failure.
     459
     460The ZOO-API provides the following functions:
     461
     462:string ZOOTranslate(String s):
     463   This function call the internal ZOO-Kernel function responsible for
     464   searching a translation of ``s`` in the zoo-services dictionary.
     465
     466:void ZOOUpdateStatus(ZMaps conf,String pourcent):
     467   This function call the updateStatus ZOO-Kernel function responsible
     468   for updating the status of the running service (only usefull when
     469   the service has been called asynchronously).
     470
     471
     472R ZCFG requirements
     473**********************************
     474
     475.. Note:: For each Service provided by your ZOO R Services Provider,
     476          the ZCFG File must be named the same as the R function name
     477          (it is case-sensitive).
     478
     479The ZCFG file should contain the following :
     480
     481serviceType
     482   R
     483serviceProvider
     484    The name of the R file to use as a ZOO Service Provider. For instance, if your
     485    script, located in the same directory as your ZOO Kernel, was named ``my_module.r`` then
     486    you should use ``my_module.r``.
     487
     488
     489R Data Structure used
     490********************************
     491
     492The three parameters of the function are passed to the R function as
     493R dictionaries.
     494
     495The specificity of the R language make that it was easier to use
     496global variales than passing parameters by reference as we do in
     497other progamming languages. It is the reason why you will have to
     498access outpus by using the global variable as for the main
     499configuration dictionary.
     500
     501Sample ZOO R Services Provider
     502******************************************
     503
     504.. code-block:: javascript
     505
     506    source("minimal.r")
     507               
     508    hellor <- function(a,b,c) {
     509        # Set the result
     510        zoo[["outputs"]][["Result"]][["value"]] <<- ZOOTranslate(paste("Hello",b[["S"]][["value"]],"from the R World!",sep=" "))
     511        # Return SERVICE_SUCCEEDEED
     512        return(zoo[["SERVICE_SUCCEEDEED"]])
     513    }
     514
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