PyWPS Development restart

33
PyWPS 4 Development restart Jáchym ˇ Cepický 1 1 http://les-ejk.cz Geoinformatics, Prague 2013

description

Presentation about ideas of the new PyWPS. Geoinformatics FCI 2013, Prague

Transcript of PyWPS Development restart

Page 1: PyWPS Development restart

PyWPS 4Development restart

Jáchym Cepický1

1http://les-ejk.cz

Geoinformatics, Prague 2013

Page 2: PyWPS Development restart

TOC

1 PyWPS

2 PyWPS 4

Page 3: PyWPS Development restart

PyWPS

OGC WPS on the ServerSince 2006Pythonhttp://pywps.wald.intevation.org

http://github.org/geopython/pywps

Page 4: PyWPS Development restart

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

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

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

Keywords

Page 8: PyWPS Development restart

Keywords

rather bike, then a car

Page 9: PyWPS Development restart

Keywords

#small

Page 10: PyWPS Development restart

Keywords

#modular

Page 11: PyWPS Development restart

Keywords

#fast

Page 12: PyWPS Development restart

Keywords

#easy

Page 13: PyWPS Development restart

Keywords

#slick

Page 14: PyWPS Development restart

Keywords

#accessories (GRASS, GDAL, Shapely, #python)

Page 15: PyWPS Development restart

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

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

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

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

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

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

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

PyWPS 4

#geopython 2006

Page 23: PyWPS Development restart

PyWPS 4

#geopython 2013

Page 24: PyWPS Development restart

lxml http://lxml.orgGRASS-WPS, GRASS-PythonWerkzeug http://werkzeug.pocoo.org/

Python 3Django. . .

Page 25: PyWPS Development restart

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

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

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

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

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

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

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

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 33: PyWPS Development restart

thank [email protected]

http://github.org/jachym/pywps-4

questions?