WPS/pl: Difference between revisions

From GRASS-Wiki
< WPS
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 230: Line 230:
   qgis /srv/gisoutput/warm.tif
   qgis /srv/gisoutput/warm.tif


== Linking to WPS server ==
== Linkowanie do serwera WPS ==


A framework has been developed to make the integration of GRASS GIS 7 in WPS server as easy as possible. The
Aby integracja GRASS GIS 7 z serwerem WPS była najłatwiejsza, jak to możliwe, został napisany framework. Nazywa się on '''wps-grass-bridge''' i jest dostępny pod adresem:  
framework is called '''wps-grass-bridge''' and is available here:  
* wps-grass-bridge: http://code.google.com/p/wps-grass-bridge/
* wps-grass-bridge: http://code.google.com/p/wps-grass-bridge/
This framework support currently PyWPS, ZOO WPS and is used by 52North WPS server. Many GRASS GIS 7
Framework ten wspiera obecnie PyWPS, ZOO WPS oraz jest używany przez serwer 52North WPS. Wiele modułów GRASS GIS 7 może być tu bezpośrednio wykorzystanych.  
modules can be attached out of the box.


There are currently several other WPS implementations which use GRASS as GIS backbone:
Jest jeszcze kilka innych implementacji WPS używających GRASS jako GIS backbone:
* PyWPS: http://pywps.wald.intevation.org/
* PyWPS: http://pywps.wald.intevation.org/
** PyWPS and wps-grass-bridge connector: http://code.google.com/p/wps-grass-bridge/wiki/PyWPS_Integration
** Łącznik PyWPS i wps-grass-bridge: http://code.google.com/p/wps-grass-bridge/wiki/PyWPS_Integration
** [http://pywps.wald.intevation.org/gallery/index.html Gallery] (live examples)
** [http://pywps.wald.intevation.org/gallery/index.html Galeria] (przykłady na żywo)
** PyWPS and GRASS Wiki: http://pywps.wikispaces.com/GRASS
** Wiki PyWPS i GRASS: http://pywps.wikispaces.com/GRASS
* WPS by 52N: http://52north.org/maven/project-sites/wps/52n-wps-site/
* WPS przez 52N: http://52north.org/maven/project-sites/wps/52n-wps-site/
** Connecting to GRASS out of the box: http://52north.org/maven/project-sites/wps/52n-wps-webapp/
** Łączenie z GRASS out of the box: http://52north.org/maven/project-sites/wps/52n-wps-webapp/
** 52N-WPS-GRASS [http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService?REQUEST=GetCapabilities&SERVICE=WPS&VERSION=1.0.0 Demo]
** 52N-WPS-GRASS [http://geoprocessing.demo.52north.org:8080/wps/WebProcessingService?REQUEST=GetCapabilities&SERVICE=WPS&VERSION=1.0.0 Demo]
* ZOO project - Open OSW Platform: http://www.zoo-project.org/
* Projekt ZOO - Otwarta Platforma WPS: http://www.zoo-project.org/
** [http://zoo-project.org/trac/wiki/ZooWebSite/QGIS_WPS_Client ZOO-WPS with GRASS and QGIS]
** [http://zoo-project.org/trac/wiki/ZooWebSite/QGIS_WPS_Client ZOO-WPS z GRASS i QGIS]


== Referencje ==
== Referencje ==
Line 253: Line 251:
* Lista [http://scholar.google.com/scholar?hl=en&q=%2Bgrass+%2Bgis+%2Bwps&as_sdt=2001&as_ylo=&as_vis=0 artykułów GRASS-WPS]
* Lista [http://scholar.google.com/scholar?hl=en&q=%2Bgrass+%2Bgis+%2Bwps&as_sdt=2001&as_ylo=&as_vis=0 artykułów GRASS-WPS]
* [http://www.youtube.com/watch?v=zCnax9w1bCs PyWPS GRASS GIS 7 i QGIS z wtyczką WPS w akcji]
* [http://www.youtube.com/watch?v=zCnax9w1bCs PyWPS GRASS GIS 7 i QGIS z wtyczką WPS w akcji]
* [http://code.google.com/p/wps-grass-bridge/wiki/PyWPS_Integration  integracja PyWPS]
* [http://code.google.com/p/wps-grass-bridge/wiki/PyWPS_Integration  Integracja PyWPS]


{{Trans|Polish|English}}
{{Trans|Polish|English}}

Latest revision as of 23:35, 30 January 2011

OGC Web Processing Service (WPS) w GRASS standardowe implementacje

W GRASS 7

W GRASS7, opis procesu WPS może być automatycznie wygenerowany z opcją '--wps-process-description'. Zobacz announcement.

Przykład:

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>The manual page of this module is available here: http://grass.osgeo.org/grass70/manuals/html70_user/r.grow.html</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>
                                <ComplexData maximumMegabytes="2048">
                                        <Default>
                                                <Format>
                                                        <MimeType>image/tiff</MimeType>
                                                </Format>
                                        </Default>
                                        <Supported>
                                                <Format>
                                                        <MimeType>image/tiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>image/geotiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/geotiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/x-geotiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>image/png</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>image/gif</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>image/jpeg</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/x-erdas-hfa</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/netcdf</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/x-netcdf</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>
                                <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>
                                <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>
                                <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>
                                <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>
                                <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>
                        <Input minOccurs="0" maxOccurs="1">
                                <ows:Identifier>grass_resolution_ns</ows:Identifier>
                                <ows:Title>Resolution of the mapset in north-south direction in meters or degrees</ows:Title>
                                <ows:Abstract>This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.</ows:Abstract>
                                <LiteralData>
                                        <ows:DataType ows:reference="xs:float">float</ows:DataType>
                                        <UOMs>
                                                <Default>
                                                        <ows:UOM>meters</ows:UOM>
                                                </Default>
                                                <Supported>
                                                        <ows:UOM>meters</ows:UOM>
                                                        <ows:UOM>degrees</ows:UOM>
                                                </Supported>
                                        </UOMs>
                                        <ows:AnyValue/>
                                        <DefaultValue>25</DefaultValue>
                                </LiteralData>
                        </Input>
                        <Input minOccurs="0" maxOccurs="1">
                                <ows:Identifier>grass_resolution_ew</ows:Identifier>
                                <ows:Title>Resolution of the mapset in east-west direction in meters or degrees</ows:Title>
                                <ows:Abstract>This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data.  To enable this setting, you need to specify north-south and east-west resolution.</ows:Abstract>
                                <LiteralData>
                                        <ows:DataType ows:reference="xs:float">float</ows:DataType>
                                        <UOMs>
                                                <Default>
                                                        <ows:UOM>meters</ows:UOM>
                                                </Default>
                                                <Supported>
                                                        <ows:UOM>meters</ows:UOM>
                                                        <ows:UOM>degrees</ows:UOM>
                                                </Supported>
                                        </UOMs>
                                        <ows:AnyValue/>
                                        <DefaultValue>25</DefaultValue>
                                </LiteralData>
                        </Input>
                        <Input minOccurs="0" maxOccurs="1">
                                <ows:Identifier>grass_band_number</ows:Identifier>
                                <ows:Title>Band to select for processing (default is all bands)</ows:Title>
                                <ows:Abstract>This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.</ows:Abstract>
                                <LiteralData>
                                        <ows:DataType ows:reference="xs:integer">integer</ows:DataType>
                                        <ows:AnyValue/>
                                </LiteralData>
                        </Input>
                </DataInputs>
                <ProcessOutputs>
                        <Output>
                                <ows:Identifier>output</ows:Identifier>
                                <ows:Title>Name for output raster map</ows:Title>
                                <ComplexOutput>
                                        <Default>
                                                <Format>
                                                        <MimeType>image/tiff</MimeType>
                                                </Format>
                                        </Default>
                                        <Supported>
                                                <Format>
                                                        <MimeType>image/tiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>image/geotiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/geotiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/x-geotiff</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/x-erdas-hfa</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/netcdf</MimeType>
                                                </Format>
                                                <Format>
                                                        <MimeType>application/x-netcdf</MimeType>
                                                </Format>
                                        </Supported>
                                </ComplexOutput>
                        </Output>
                </ProcessOutputs>
        </ProcessDescription>
</wps:ProcessDescriptions>

WPS workflow idea

Zewnętrzne mapy rastrowe mogą być zlinkowane do GRASS-a za pomocą r.external. Oszczędza to czas i przestrzeń dyskową. Dodatkowo, nie ma już potrzeby przechowywania wyniku w wewnętrznym formacie GRASS-a; z r.external.out mapy wynikowe są bezpośrednio zapisywane w formacie obsługiwanym przez bibliotekę GDAL.

Prygotowania

GRASS może być użyty w sposób automatyczny poprzez zdefiniowanie zestawu zmiennych. Zobacz tu GRASS and Shell ustawienia i GRASS and Python.

Przykład przepływu danych

Skrypt może wyglądać jak poniżej:

 # rejestrowanie pliku GeoTIFF w bazie GRASS:
 r.external terra_lst1km20030314.LST_Day_1km.rst.tif out=modis_celsius

 # definowoanie katalogu wyjściowego dla obliczeń GRASS:
 r.external.out /srv/gisoutput/

 # wykonywanie czegoś (tu: wybieranie pikseli > 20°C), zapisywanie wyniku bezpośrednio jako GeoTIFF:
 r.mapcalc "warm.tif = if(modis_celsius > 20, modis_celsius, null() )"

 # użycie wyniku gdzie indziej
 qgis /srv/gisoutput/warm.tif

Linkowanie do serwera WPS

Aby integracja GRASS GIS 7 z serwerem WPS była najłatwiejsza, jak to możliwe, został napisany framework. Nazywa się on wps-grass-bridge i jest dostępny pod adresem:

Framework ten wspiera obecnie PyWPS, ZOO WPS oraz jest używany przez serwer 52North WPS. Wiele modułów GRASS GIS 7 może być tu bezpośrednio wykorzystanych.

Jest jeszcze kilka innych implementacji WPS używających GRASS jako GIS backbone:

Referencje

This page is in progress of translating to Polish from English.