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

Compare with Current View Page History

« Previous Version 7 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
%
% It is assumed that the total oil will be spilled in the timespan of track length. 
% The speed over the track is assumed to be 30km/h.
%
% 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

  • No labels