You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

This page describes the convention for the PyWPS plugin to find and expose matlab processes.

Example

oil_spill.m
function [data] = oil_spill(track, volume)
% OIL_SPILL generate a dataset of an oil spill based on a track and total volume
%
% This is also part of the abstract
%
% input:
% track = linestring
% volume = double
%
% output:
% data = file.nc
%

Finding processes

Matlab functions can be exposed as WPS processes. The processes are found by putting matlab scripts in the directory that is exposed by the environment variable MATLAB_PROCESSES (analogue to PYWPS_PROCESSES). Matlab processes have the form of a matlab function, stored within a file with the name function.m.

WPS properties

The WPS properties can be specified according to the table below.

WPS property

Matlab implementation

example

identifier

function name, lower case

run_model -> run_model

title

function name, Title cased, _ replaced by spaces

run_model -> Run model

abstract

first comment line, after CAPITALIZED function name and following comment block

% FUNCTION some text -> some text

metadata

not supported

 

profile

not supported

 

wsdl

not supported

 

version

not supported

 

service

always WPS

WPS

language

always en-GB

 

DataInputs

list below % input:

see example

ProcessOutputs

list below % output:

see example

storeSupported

always false

 

statusSupported

always false

 

  • No labels