WPS: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
No edit summary
Line 8: Line 8:


Example:
Example:
  r.external --wps-process-description
r.grow --wps-process-description
      <?xml version="1.0" encoding="UTF-8"?>
 
      <wps:process_descriptions xmlns:wps="http://www.opengis.net/wps/1.0.0"
<?xml version="1.0" encoding="UTF-8"?>
      xmlns:ows="http://www.opengis.net/ows/1.1"
<wps:ProcessDescriptions xmlns:wps="http://www.opengis.net/wps/1.0.0"
      xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ows="http://www.opengis.net/ows/1.1"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
      xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd"
xsi:schemaLocation="http://www.opengis.net/wps/1.0.0
      service="WPS" version="1.0.0" xml:lang="en-US">
http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd"
        <process_description wps:processVersion="1" storeSupported="true" statusSupported="true">
service="WPS" version="1.0.0" xml:lang="en-US">  
                                <ows:Identifier>r.external</ows:Identifier>
<ProcessDescription wps:processVersion="1" storeSupported="true" statusSupported="true">
                                <ows:Title>Link GDAL supported raster file to a binary raster map layer.</ows:Title>
<ows:Identifier>r.grow</ows:Identifier>
                                <ows:Abstract>Link GDAL supported raster file to a binary raster map layer.</ows:Abstract>
<ows:Title>Generates a raster map layer with contiguous areas grown by one cell.</ows:Title>
                <ows:Metadata xlink:title="raster" />
<ows:Abstract>Generates a raster map layer with contiguous areas grown by one cell.</ows:Abstract>
                <ows:Metadata xlink:title="import" />
<ows:Metadata xlink:title="raster" />
                <data_inputs>
<DataInputs>
                        <Input minOccurs="0" maxOccurs="1">
<Input minOccurs="1" maxOccurs="1">
                                <ows:Identifier>input</ows:Identifier>
<ows:Identifier>input</ows:Identifier>
                                <ows:Title>Raster file to be linked</ows:Title>
<ows:Title>Name of input raster map</ows:Title>
                                <ows:Abstract>Raster file to be linked</ows:Abstract>
<ows:Abstract>Name of input raster map</ows:Abstract>
                                <LiteralData>
<ComplexData maximumMegabytes="2048">
                                        <ows:DataType ows:reference="xs:string">string</ows:DataType>
<Default>
                                        <ows:AnyValue/>
<Format>
                                </LiteralData>
<MimeType>image/tiff</MimeType>
                        </Input>
</Format>
                        <Input minOccurs="0" maxOccurs="1">
</Default>
              [...]
<Supported>
                                                <Format>
<Format>
                                                        <MimeType>application/grass-raster-binary</MimeType>
<MimeType>image/tiff</MimeType>
                                                </Format>
</Format>
                                        </Supported>
<Format>
                                </ComplexOutput>
<MimeType>image/png</MimeType>
                        </Output>
</Format>
                </process_outputs>
<Format>
        </process_description>
<MimeType>application/grass-raster-ascii</MimeType>
      </wps:process_descriptions>
</Format>
<Format>
<MimeType>application/grass-raster-binary</MimeType>
</Format>
</Supported>
</ComplexData>
</Input>
<Input minOccurs="0" maxOccurs="1">
<ows:Identifier>radius</ows:Identifier>
<ows:Title>Radius of buffer in raster cells</ows:Title>
<ows:Abstract>Radius of buffer in raster cells</ows:Abstract>
<LiteralData>
<ows:DataType ows:reference="xs:float">float</ows:DataType>
<ows:AnyValue/>
<DefaultValue>1.01</DefaultValue>
</LiteralData>
</Input>
<Input minOccurs="0" maxOccurs="1">
<ows:Identifier>metric</ows:Identifier>
<ows:Title>Metric</ows:Title>
<ows:Abstract>Metric</ows:Abstract>
<LiteralData>
<ows:DataType ows:reference="xs:string">string</ows:DataType>
<ows:AllowedValues>
<ows:Value>euclidean</ows:Value>
<ows:Value>maximum</ows:Value>
<ows:Value>manhattan</ows:Value>
</ows:AllowedValues>
<DefaultValue>euclidean</DefaultValue>
</LiteralData>
</Input>
<Input minOccurs="0" maxOccurs="1">
<ows:Identifier>old</ows:Identifier>
<ows:Title>Value to write for input cells which are non-NULL (-1 =&gt; NULL)</ows:Title>
<ows:Abstract>Value to write for input cells which are non-NULL (-1 =&gt; NULL)</ows:Abstract>
<LiteralData>
<ows:DataType ows:reference="xs:integer">integer</ows:DataType>
<ows:AnyValue/>
</LiteralData>
</Input>
<Input minOccurs="0" maxOccurs="1">
<ows:Identifier>new</ows:Identifier>
<ows:Title>Value to write for "grown" cells</ows:Title>
<ows:Abstract>Value to write for "grown" cells</ows:Abstract>
<LiteralData>
<ows:DataType ows:reference="xs:integer">integer</ows:DataType>
<ows:AnyValue/>
</LiteralData>
</Input>
<Input minOccurs="0" maxOccurs="1">
<ows:Identifier>-m</ows:Identifier>
<ows:Title>radius is in map units rather than cells</ows:Title>
<ows:Abstract>radius is in map units rather than cells</ows:Abstract>
<LiteralData>
<ows:DataType ows:reference="xs:boolean">boolean</ows:DataType>
<ows:AllowedValues>
<ows:Value>true</ows:Value>
<ows:Value>false</ows:Value>
</ows:AllowedValues>
<DefaultValue>false</DefaultValue>
</LiteralData>
</Input>
</DataInputs>
<ProcessOutputs>
<Output>
<ows:Identifier>output</ows:Identifier>
<ows:Title>Name for output raster map</ows:Title>
<ows:Abstract>Name for output raster map</ows:Abstract>
<ComplexOutput>
<Default>
<Format>
<MimeType>image/tiff</MimeType>
</Format>
</Default>
<Supported>
<Format>
<MimeType>image/tiff</MimeType>
</Format>
<Format>
<MimeType>image/png</MimeType>
</Format>
<Format>
<MimeType>application/grass-raster-ascii</MimeType>
</Format>
<Format>
<MimeType>application/grass-raster-binary</MimeType>
</Format>
</Supported>
</ComplexOutput>
</Output>
</ProcessOutputs>
</ProcessDescription>
</wps:ProcessDescriptions>
 
 


=== Linking to other software ===
=== Linking to other software ===
Line 51: Line 145:
** [http://pywps.wald.intevation.org/gallery/index.html Gallery] (live examples)
** [http://pywps.wald.intevation.org/gallery/index.html Gallery] (live examples)
* WPS by 52n: http://52north.org/maven/project-sites/wps/52n-wps-site/
* WPS by 52n: http://52north.org/maven/project-sites/wps/52n-wps-site/
* vtkGRASSBridge: [[GRASS_and_VTK]]
* ZOO project - Open OSW Platform: http://www.zoo-project.org/
* ZOO project - Open OSW Platform: http://www.zoo-project.org/


[[Category: Development]]
[[Category: Development]]
[[Category: OGC]]
[[Category: OGC]]

Revision as of 00:20, 28 November 2009

GRASS based OGC Web Processing Service (WPS) standard implementations

Inside GRASS 7

In GRASS7, the WPS process description can be automatically generated with the option '--wps-process-description'. See announcement.

Example: r.grow --wps-process-description

<?xml version="1.0" encoding="UTF-8"?> <wps:ProcessDescriptions xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0

http://schemas.opengis.net/wps/1.0.0/wpsDescribeProcess_response.xsd"
service="WPS" version="1.0.0" xml:lang="en-US"> 

<ProcessDescription wps:processVersion="1" storeSupported="true" statusSupported="true"> <ows:Identifier>r.grow</ows:Identifier> <ows:Title>Generates a raster map layer with contiguous areas grown by one cell.</ows:Title> <ows:Abstract>Generates a raster map layer with contiguous areas grown by one cell.</ows:Abstract> <ows:Metadata xlink:title="raster" /> <DataInputs> <Input minOccurs="1" maxOccurs="1"> <ows:Identifier>input</ows:Identifier> <ows:Title>Name of input raster map</ows:Title> <ows:Abstract>Name of input raster map</ows:Abstract> <ComplexData maximumMegabytes="2048"> <Default> <Format> <MimeType>image/tiff</MimeType> </Format> </Default> <Supported> <Format> <MimeType>image/tiff</MimeType> </Format> <Format> <MimeType>image/png</MimeType> </Format> <Format> <MimeType>application/grass-raster-ascii</MimeType> </Format> <Format> <MimeType>application/grass-raster-binary</MimeType> </Format> </Supported> </ComplexData> </Input> <Input minOccurs="0" maxOccurs="1"> <ows:Identifier>radius</ows:Identifier> <ows:Title>Radius of buffer in raster cells</ows:Title> <ows:Abstract>Radius of buffer in raster cells</ows:Abstract> <LiteralData> <ows:DataType ows:reference="xs:float">float</ows:DataType> <ows:AnyValue/> <DefaultValue>1.01</DefaultValue> </LiteralData> </Input> <Input minOccurs="0" maxOccurs="1"> <ows:Identifier>metric</ows:Identifier> <ows:Title>Metric</ows:Title> <ows:Abstract>Metric</ows:Abstract> <LiteralData> <ows:DataType ows:reference="xs:string">string</ows:DataType> <ows:AllowedValues> <ows:Value>euclidean</ows:Value> <ows:Value>maximum</ows:Value> <ows:Value>manhattan</ows:Value> </ows:AllowedValues> <DefaultValue>euclidean</DefaultValue> </LiteralData> </Input> <Input minOccurs="0" maxOccurs="1"> <ows:Identifier>old</ows:Identifier> <ows:Title>Value to write for input cells which are non-NULL (-1 => NULL)</ows:Title> <ows:Abstract>Value to write for input cells which are non-NULL (-1 => NULL)</ows:Abstract> <LiteralData> <ows:DataType ows:reference="xs:integer">integer</ows:DataType> <ows:AnyValue/> </LiteralData> </Input> <Input minOccurs="0" maxOccurs="1"> <ows:Identifier>new</ows:Identifier> <ows:Title>Value to write for "grown" cells</ows:Title> <ows:Abstract>Value to write for "grown" cells</ows:Abstract> <LiteralData> <ows:DataType ows:reference="xs:integer">integer</ows:DataType> <ows:AnyValue/> </LiteralData> </Input> <Input minOccurs="0" maxOccurs="1"> <ows:Identifier>-m</ows:Identifier> <ows:Title>radius is in map units rather than cells</ows:Title> <ows:Abstract>radius is in map units rather than cells</ows:Abstract> <LiteralData> <ows:DataType ows:reference="xs:boolean">boolean</ows:DataType> <ows:AllowedValues> <ows:Value>true</ows:Value> <ows:Value>false</ows:Value> </ows:AllowedValues> <DefaultValue>false</DefaultValue> </LiteralData> </Input> </DataInputs> <ProcessOutputs> <Output> <ows:Identifier>output</ows:Identifier> <ows:Title>Name for output raster map</ows:Title> <ows:Abstract>Name for output raster map</ows:Abstract> <ComplexOutput> <Default> <Format> <MimeType>image/tiff</MimeType> </Format> </Default> <Supported> <Format> <MimeType>image/tiff</MimeType> </Format> <Format> <MimeType>image/png</MimeType> </Format> <Format> <MimeType>application/grass-raster-ascii</MimeType> </Format> <Format> <MimeType>application/grass-raster-binary</MimeType> </Format> </Supported> </ComplexOutput> </Output> </ProcessOutputs> </ProcessDescription> </wps:ProcessDescriptions>


Linking to other software

There are currently several WPS implementations which use GRASS as GIS backbone: