pywps development restart
DESCRIPTION
Presentation about ideas of the new PyWPS. Geoinformatics FCI 2013, PragueTRANSCRIPT
![Page 1: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/1.jpg)
PyWPS 4Development restart
Jáchym Cepický1
1http://les-ejk.cz
Geoinformatics, Prague 2013
![Page 2: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/2.jpg)
TOC
1 PyWPS
2 PyWPS 4
![Page 3: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/3.jpg)
PyWPS
OGC WPS on the ServerSince 2006Pythonhttp://pywps.wald.intevation.org
http://github.org/geopython/pywps
![Page 4: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/4.jpg)
PyWPS - what it is NOT
PyWPS is no analytical tool or engine. It does not performany type of geospatial calculation.PyWPS is not special XML parser or generator. It does notvalidate your GMLs against given schemas (yet), it doesnot build GML from Python objects.It is not complicated
![Page 5: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/5.jpg)
PyWPS - what it is NOT
PyWPS is no analytical tool or engine. It does not performany type of geospatial calculation.PyWPS is not special XML parser or generator. It does notvalidate your GMLs against given schemas (yet), it doesnot build GML from Python objects.It is not complicated
![Page 6: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/6.jpg)
PyWPS - what it is NOT
PyWPS is no analytical tool or engine. It does not performany type of geospatial calculation.PyWPS is not special XML parser or generator. It does notvalidate your GMLs against given schemas (yet), it doesnot build GML from Python objects.It is not complicated
![Page 7: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/7.jpg)
Keywords
![Page 8: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/8.jpg)
Keywords
rather bike, then a car
![Page 9: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/9.jpg)
Keywords
#small
![Page 10: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/10.jpg)
Keywords
#modular
![Page 11: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/11.jpg)
Keywords
#fast
![Page 12: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/12.jpg)
Keywords
#easy
![Page 13: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/13.jpg)
Keywords
#slick
![Page 14: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/14.jpg)
Keywords
#accessories (GRASS, GDAL, Shapely, #python)
![Page 15: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/15.jpg)
PyWPS 4
Started from scratchUse Python 2.7 (for future 3.0 migration)Try different interpreters of Python (pypy)Easy parsing with lxmlPrepare for next WPS versionChange of the whole process concept
![Page 16: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/16.jpg)
PyWPS 4
Started from scratchUse Python 2.7 (for future 3.0 migration)Try different interpreters of Python (pypy)Easy parsing with lxmlPrepare for next WPS versionChange of the whole process concept
![Page 17: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/17.jpg)
PyWPS 4
Started from scratchUse Python 2.7 (for future 3.0 migration)Try different interpreters of Python (pypy)Easy parsing with lxmlPrepare for next WPS versionChange of the whole process concept
![Page 18: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/18.jpg)
PyWPS 4
Started from scratchUse Python 2.7 (for future 3.0 migration)Try different interpreters of Python (pypy)Easy parsing with lxmlPrepare for next WPS versionChange of the whole process concept
![Page 19: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/19.jpg)
PyWPS 4
Started from scratchUse Python 2.7 (for future 3.0 migration)Try different interpreters of Python (pypy)Easy parsing with lxmlPrepare for next WPS versionChange of the whole process concept
![Page 20: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/20.jpg)
PyWPS 4
Started from scratchUse Python 2.7 (for future 3.0 migration)Try different interpreters of Python (pypy)Easy parsing with lxmlPrepare for next WPS versionChange of the whole process concept
![Page 21: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/21.jpg)
PyWPS 4
Started from scratchUse Python 2.7 (for future 3.0 migration)Try different interpreters of Python (pypy)Easy parsing with lxmlPrepare for next WPS versionChange of the whole process concept
![Page 22: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/22.jpg)
PyWPS 4
#geopython 2006
![Page 23: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/23.jpg)
PyWPS 4
#geopython 2013
![Page 24: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/24.jpg)
lxml http://lxml.orgGRASS-WPS, GRASS-PythonWerkzeug http://werkzeug.pocoo.org/
Python 3Django. . .
![Page 25: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/25.jpg)
Process definition in PyWPS 3
class Buf fe r ( WPSProcess ) :def _ _ i n i t _ _ ( s e l f ) :
WPSProcess . _ _ i n i t _ _ ( s e l f , i d e n t i f i e r = " b u f f e r " , . . . )s e l f . addComplexInput ( i d e n t i f i e r = " i npu t " , . . . ). . .s e l f . addL i te ra lOutpu ( i d e n t i f i e r = " i npu t " , . . . ). . .
def execute ( s e l f ) :. . .return
![Page 26: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/26.jpg)
Process definition in PyWPS 4 (proposal)
2-level APIsProviding the low-level API (integration with GRASS,writing a compatibility api for PyWPS-3, and defining abunch of processes programatically if the user needs that.The process is just a callableInspired by DjangoUpper-level API for easy user-written processes
![Page 27: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/27.jpg)
PyWPS 4 - upper-level
class Buf fe r ( pywps . Process ) :class I npu t :
d is tance = pywps . L i t e r a l ( value_type=pywps . F loa t )l a ye r = pywps . Complex ( a s _ f i l e =True , max_occurs=None )
class Output :fea tu re_count = pywps . L i t e r a l ( value_type=pywps . I n tege r )f o r t une = pywps . L i t e r a l ( value_type
def execute ( s e l f ) :. . .
![Page 28: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/28.jpg)
PyWPS 4 - low-level
def make_buffer ( request ) :. . .
make_buffer_process = pywps . create_process (i d e n t i f i e r = ’ makebuffer ’ , t i t l e = . . .i npu ts =[
pywps . L i t e r a l ( i d e n t i f i e r = ’ d is tance ’ , value_type=pywps . F loa t ) ,pywps . BoundingBox ( i d e n t i f i e r = ’ c l i p ’ ) ,
] ,ou tputs =[
pywps . L i t e r a l ( i d e n t i f i e r = ’ fea tu re_count ’ , va lue_type=pywps . In tege r ) ,pywps . L i t e r a l ( i d e n t i f i e r = ’ f o r t une ’ , va lue_type=pywps . S t r i n g ) ,
] ,handler=make_buffer )
make_buffer_process ( )
![Page 29: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/29.jpg)
Where, what, how, who?
http://github.org/jachym/pywps-4
Tests, Basic request parsing, process definition, . . .Alex Morega @mgax, Jorge de Jesus, Jachym Cepickyhttp://lists.osgeo.org/cgi-bin/mailman/listinfo/pywps-dev
![Page 30: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/30.jpg)
Where, what, how, who?
http://github.org/jachym/pywps-4
Tests, Basic request parsing, process definition, . . .Alex Morega @mgax, Jorge de Jesus, Jachym Cepickyhttp://lists.osgeo.org/cgi-bin/mailman/listinfo/pywps-dev
![Page 31: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/31.jpg)
Where, what, how, who?
http://github.org/jachym/pywps-4
Tests, Basic request parsing, process definition, . . .Alex Morega @mgax, Jorge de Jesus, Jachym Cepickyhttp://lists.osgeo.org/cgi-bin/mailman/listinfo/pywps-dev
![Page 32: PyWPS Development restart](https://reader033.vdocuments.mx/reader033/viewer/2022052601/558ec7a21a28ab66628b4789/html5/thumbnails/32.jpg)
Where, what, how, who?
http://github.org/jachym/pywps-4
Tests, Basic request parsing, process definition, . . .Alex Morega @mgax, Jorge de Jesus, Jachym Cepickyhttp://lists.osgeo.org/cgi-bin/mailman/listinfo/pywps-dev