PyWPS Development restart

Post on 27-Jun-2015

1.781 views 0 download

Tags:

description

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

Transcript of PyWPS Development restart

PyWPS 4Development restart

Jáchym Cepický1

1http://les-ejk.cz

Geoinformatics, Prague 2013

TOC

1 PyWPS

2 PyWPS 4

PyWPS

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

http://github.org/geopython/pywps

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

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

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

Keywords

Keywords

rather bike, then a car

Keywords

#small

Keywords

#modular

Keywords

#fast

Keywords

#easy

Keywords

#slick

Keywords

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

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

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

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

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

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

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

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

PyWPS 4

#geopython 2006

PyWPS 4

#geopython 2013

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

Python 3Django. . .

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

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

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 ) :. . .

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 ( )

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

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

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

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

thank you!jachym@les-ejk.cz

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

questions?