ZOO-Service configuration file¶
The ZOO-Service configuration file (.zcfg) describes a WPS service. It provides metadata information on a particular WPS Service and it is parsed by ZOO-Kernel when DescribeProcess and Execute request are sent.
The ZOO-Service configuration file is divided into three distinct sections :
Main Metadata information
List of Inputs metadata information (optional since rev. 469)
List of Outputs metadata information
Warning
The ZOO-Service configuration file is case sensitive.
Note
There are many example ZCFG files in the cgi-env
directory of the ZOO-Project svn.
Note
A ZCFG file can be converted to the YAML syntaxe by using the zcfg2yaml command line tool.
Main section¶
The fist part of the ZOO-Service configuration file is the main
section,
which contains general metadata information on the related WPS
Service.
Note that the “name of your service” between brackets on the first line has to be the exact same name
as the function you defined in your services provider code. In most cases, this name is also the name
of the ZCFG file without the “.zcfg
” extension.
An example of the main
section is given bellow as reference.
1[Name of WPS Service]
2Title = Title of the WPS Service
3Abstract = Description of the WPS Service
4processVersion = Version number of the WPS Service
5storeSupported = true/false
6statusSupported = true/false
7serviceType = Pprogramming language used to implement the service (C|Fortran|Python|Java|PHP|Ruby|Javascript)
8serviceProvider = Name of the Services provider (shared library|Python Module|Java Class|PHP Script|JavaScript Script)
9<MetaData>
10 title = Metadata title of the WPS Service
11</MetaData>
Warning
‘Name of WPS Service’ must be the exact same name as the function defined in the WPS Service source code.
Note
An extend
parameter may be used for the Process profile registry.
List of Inputs¶
The second part of the ZOO-Service configuration file is the <DataInputs>
section which lists the supported inputs. Each input is defined as :
Name (between brackets as for the name of the service before)
Various medata properties (
Title
,Abstract
,minOccurs
,maxOccurs
and, in case of ComplexData, the optionalmaximumMegabytes
)
A typical list of inputs (<DataInputs>
) looks like the following:
1<DataInputs>
2 [Name of the first input]
3 Title = Title of the first input
4 Abstract = Abstract describing the first input
5 minOccurs = Minimum occurence of the first input
6 maxOccurs = Maximum occurence of the first input
7 <Type Of Data Node />
8 [Name of the second input]
9 Title = Title of the second input
10 Abstract = Abstract describing the second input
11 minOccurs = Minimum occurence of the second input
12 maxOccurs = Maximum occurence of the second input
13 <Type Of Data Node />
14</DataInputs>
Note
A <MetaData>
node can also be added, as in the main metadata information.
List of Outputs¶
The third part of the ZOO Service configuration file is the <DataOutputs>
section, which lists the supported outputs and is is very similar to a
list of inputs.
A typical list of outputs (<DataOutputs>
) looks like the
following:
1<DataOutputs>
2 [Name of the output]
3 Title = Title of the output
4 Abstract = Description of the output
5 <Type Of Data Node />
6</DataOutputs>
Type Of Data Nodes¶
The Type Of Data Nodes describes data types for inputs and outputs. There are three different types which are described in this section.
Warning
Every BoundingBoxData and ComplexData must have at least one
<Default>
node (even empty like<Default />
)Warning
In WPS 2.0.0 version, it is possible to define nested inputs and outputs. So, from revision 790, you are allowed to use a new input/output definition here.
LiteralData node¶
A <LiteralData>
node contains:
one (optional)
AllowedValues
key containing all value allowed for this inputone (optional)
range
properties containing the range ([
,]
)one (optional)
rangeMin
(rangeMax
) properties containing the minimum (maximum) value of this rangeone (optional)
rangeSpacing
properties containing the regular distance or spacing between value in this rangeone (optional)
rangeClosure
properties containing the closure type (c
,o
,oc
,co
)one
<Default>
node,zero or more
<Supported>
nodes depending on the existence or the number of supported Units Of Measure (UOM), anda
dataType
property. ThedataType
property defines the type of literal data, such as a string, an interger and so on (consult the complete list of supported data types).
<Default>
and <Supported>
nodes can contain the uom
property to define which UOM has to be used for
this input value.
For input <LiteralData>
nodes, you can add the value
property to the <Default>
node to define a default
value for this input. This means that, when your Service will be run, even if the input wasn’t defined, this default
value will be set as the current value for this input.
A typical <LiteralData>
node, defining a float
data type using meters or degrees for its UOM, looks like the
following:
1<LiteralData>
2 dataType = float
3 <Default>
4 uom = meters
5 </Default>
6 <Supported>
7 uom = feet
8 </Supported>
9</LiteralData>
A typical <LiteralData>
node, defining a float
data type which
should take values contained in [0.0,100.0]
, looks like the following:
1<LiteralData>
2 dataType = float
3 rangeMin = 0.0
4 rangeMax = 100.0
5 rangeClosure = c
6 <Default />
7</LiteralData>
Or more simply:
1<LiteralData>
2 dataType = float
3 range = [0.0,100.0]
4 <Default />
5</LiteralData>
A typical <LiteralData>
node, defining a string
data type which
support values hillshade
, slope
, aspect
, TRI
, TPI
and roughness
, looks like the following:
1<LiteralData>
2 dataType = string
3 AllowedValues = hillshade,slope,aspect,TRI,TPI,roughness
4 <Default />
5</LiteralData>
Properties AllowedValues
and range*
can be conbined with both <Default>
and
<Supported>
nodes in the same was as <LiteralData>
node. For
instance, the following is supported:
1<LiteralData>
2 dataType = int
3 <Default>
4 value = 11
5 AllowedValues = -10,-8,-7,-5,-1
6 rangeMin = 0
7 rangeMax = 100
8 rangeClosure = co
9 </Default>
10 <Supported>
11 rangeMin = 200
12 rangeMax = 600
13 rangeClosure = co
14 </Supported>
15 <Supported>
16 rangeMin = 750
17 rangeMax = 990
18 rangeClosure = co
19 rangeSpacing = 10
20 </Supported>
21</LiteralData>
BoundingBoxData node¶
A <BoundingBoxData>
node contains:
one
<Default>
node with a CRS property defining the default Coordinate Reference Systems (CRS), andone or more
<Supported>
nodes depending on the number of CRS your service supports (note that you can alternatively use a single<Supported>
node with a comma-separated list of supported CRS).
A typical <BoundingBoxData>
node, for two supported CRS (EPSG:4326
and EPSG:3785),
looks like the following:
1<BoundingBoxData>
2 <Default>
3 CRS = urn:ogc:def:crs:EPSG:6.6:4326
4 </Default>
5 <Supported>
6 CRS = urn:ogc:def:crs:EPSG:6.6:4326
7 </Supported>
8 <Supported>
9 CRS = urn:ogc:def:crs:EPSG:6.6:3785
10 </Supported>
11</BoundingBoxData>
ComplexData node¶
A ComplexData node contains:
a
<Default>
node andone or more
<Supported>
nodes depending on the number of supported formats. A format is made up of this set of properties :mimeType
,encoding
and optionalyschema
.
For output ComplexData nodes, you can add the extension
property to define what extension to use to name
the file when storing the result is required. Obviously, you’ll have to add the extension
property to each
supported format (for the <Default>
and <Supported>
nodes).
You can also add the asReference
property to the <Default>
node to define if the output should be
stored on server side per default.
Note
the client can always modify this behavior by setting asReference
attribute to true
or false
for this output in the request ResponseDocument
parameter.
You can see below a sample ComplexData node for default application/json
and text/xml
(encoded in UTF-8
or base64) mimeTypes support:
1<ComplexData>
2 <Default>
3 mimeType = application/json
4 encoding = UTF-8
5 </Default>
6 <Supported>
7 mimeType = text/xml
8 encoding = base64
9 schema = http://fooa/gml/3.1.0/polygon.xsd
10 </Supported>
11 <Supported>
12 mimeType = text/xml
13 encoding = UTF-8
14 schema = http://fooa/gml/3.1.0/polygon.xsd
15 </Supported>
16</ComplexData>