GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71933
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
parser_wps.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <grass/config.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include "parser_local_proto.h"
Include dependency graph for parser_wps.c:

Go to the source code of this file.

Macros

#define TYPE_OTHER   -1
 
#define TYPE_RASTER   0
 
#define TYPE_VECTOR   1
 
#define TYPE_PLAIN_TEXT   2
 
#define TYPE_RANGE   3
 
#define TYPE_LIST   4
 
#define TYPE_STDS   5 /* Space time datasets of type raster, raster3d and vector */
 
#define TYPE_STRDS   6 /* Space time raster datasets */
 
#define TYPE_STVDS   7 /* Space time vector datasets */
 
#define WPS_INPUT   0
 
#define WPS_OUTPUT   1
 

Functions

void G__wps_print_process_description (void)
 Print the WPS 1.0.0 process description XML document to stdout. More...
 

Macro Definition Documentation

#define TYPE_LIST   4

Definition at line 27 of file parser_wps.c.

#define TYPE_OTHER   -1

Definition at line 22 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define TYPE_PLAIN_TEXT   2

Definition at line 25 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define TYPE_RANGE   3

Definition at line 26 of file parser_wps.c.

#define TYPE_RASTER   0

Definition at line 23 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define TYPE_STDS   5 /* Space time datasets of type raster, raster3d and vector */

Definition at line 28 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define TYPE_STRDS   6 /* Space time raster datasets */

Definition at line 29 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define TYPE_STVDS   7 /* Space time vector datasets */

Definition at line 30 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define TYPE_VECTOR   1

Definition at line 24 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define WPS_INPUT   0

Definition at line 31 of file parser_wps.c.

Referenced by G__wps_print_process_description().

#define WPS_OUTPUT   1

Definition at line 32 of file parser_wps.c.

Function Documentation

void G__wps_print_process_description ( void  )

Print the WPS 1.0.0 process description XML document to stdout.

A module started with the parameter "--wps-process-description" will write a process description XML document to stdout and exit.

Currently only raster and vector modules are supported, but the generation works with any module (more or less meaningful). Most of the input options are caught:

  • single and multiple raster and vector maps
  • single and multiple string, float and integer data with default values and value options (range is missing) Flags are supported as boolean values.

The mime types for vector maps are GML, KML, dgn, shape and zipped shape.

The mime types for raster maps are tiff, geotiff, hfa, netcdf, gif, jpeg and png.

Mime types for space time datasets are tar archives with gz, bzip or without compression

The mime types are reflecting the capabilities of grass and gdal and may be extended.

BoundignBox support is currently not available for inputs and outputs. Literal data output (string, float or integer) is currently not supported.

In case no output parameter was set (new raster of vector map) the stdout output is noticed as output parameter of mime type text/plain.

Multiple vector or raster map outputs marked as one option are not supported (wps 1.0.0 specification does not allow multiple outputs with only one identifier). Multiple outputs must be wrapped via a python script or created as group.

In future the following mimetypes may be supported mime type: application/grass-vector-ascii -> a text file generated with v.out.asci Example.: urn:file:///path/name mime type: application/grass-vector-binary -> the binary vectors must be addressed with a non standard urn: Example: urn:grass:vector:location/mapset/name

Definition at line 140 of file parser_wps.c.

References _, Option::def, Option::description, Flag::description, G__uses_new_gisprompt(), G_free(), G_program_name(), G_store(), G_warning(), Option::gisprompt, Option::key, Flag::key, Option::key_desc, Option::label, max, min, Option::multiple, Flag::next_flag, Option::next_opt, NULL, Option::options, Option::opts, Option::required, st, Option::type, TYPE_DOUBLE, TYPE_INTEGER, TYPE_OTHER, TYPE_PLAIN_TEXT, TYPE_RASTER, TYPE_STDS, TYPE_STRDS, TYPE_STRING, TYPE_STVDS, TYPE_VECTOR, WPS_INPUT, and YES.

Referenced by G_parser().