SlideShare a Scribd company logo
WPSClient - A client for assynchronous
interaction with WPS written in Python
Lu´ de Sousa, Christian Braun, Chris Eykamp, Ulrich Leopold,
ıs
Olivier Baume and Rui Martins
Public Research Centre Henri Tudor,
Esch-sur-Alzette, Luxembourg.

WPS technologies for
Integrated Assessment Modelling in Urban Areas Workshop
January, 22-24 2014, Belval, Luxembourg
www.tudor.lu
Requirements
A generic application
A seamless WPS client to be used by a Web Server;
A generic approach - unawere of databases or client
specificities;
Send assynchronous process requests;
Check process status;
Retrieve results;
Publish geospatial results to a MapServer instance:
Vector layers available as WMS and WFS;
Raster layers available as WMS and WCS;
All layers available in EPSG:3857 plus native CRS.

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
2
Design options

Python
GDAL/OGR library;
MapScrit library;
Results processing similar to inputs processing in PyWPS;
Performance not crucial.

Pre-configuarations (not available as application inputs):
MapServer setup;
Aditional CRS;
Fle system locations.

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
3
Difficulties

Sending requests through HTTP POST
Required to pass long URLs to WCS and WFS resources;
Thin documentation, few examples available;
Output names must be known in advance.

MapScript
No methods available to set up WFS or WCS;
Thinly documented;
Python library hard to read.

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
4
The Map file

A text based generator
Inelegant code.
Totally dependent on the Map file syntaxe.
First version developed in hours.
Easy to maintain and evolve.

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
5
Examples of usage

Starting a process
>>> import WPSClient
>>> myCli = WPSClient.WPSClient()
>>> myCli.init(
... "http://wps.iguess.tudor.lu/cgi-bin/pywps.cgi?",
... "slope_aspect",
... ["dem"],
... ["http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/RO_localOWS_test.map
&SERVICE=WCS&FORMAT=image/img&CRS=EPSG:28992&BBOX=92221,436692,92306,436769
&RESX=0.5&RESY=0.5&VERSION=1.0.0&REQUEST=getCoverage&COVERAGE=ro_dsm"],
... ["slope", "aspect"],
... ["slope_result", "aspect_result"])
>>> url = myCli.sendRequest()
>>> print url
http://wps.iguess.tudor.lu/wpsoutputs/pywps-020cc26a-7f92-11e3-a8a7-005056a52e0d.xml

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
6
Examples of usage
Checking process status
>>> myCli = WPSClient.WPSClient()
>>> myCli.initFromURL(url, ["slope", "aspect"], ["slope_result", "aspect_result"])
>>> status = myCli.checkStatus()
>>> print status
True
>>> print myCli.statusMessage
None

Retrieving results
>>> myCli = WPSClient.WPSClient()
>>> myCli.initFromURL(url, ["slope", "aspect"], ["slope_result", "aspect_result"])
>>> status = myCli.checkStatus()
>>> print status
True
>>> myCli.epsg = "3035"
>>> myCli.generateMapFile()
DEBUG:WPSClient:Generated layer slope of type raster.
DEBUG:WPSClient:Generated layer aspect of type raster.
INFO:WPSClient:Wrote map file to disk:
/var/www/tmp/pywps-4d87fa24-7f93-11e3-8b10-005056a52e0d.map

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
7
Future work

Test with other WPS servers.
Separate the Map file generator as a sub-module - reusable in
other projects.
Proper XML parsing?
WPS 2.0 ?

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
8
Thank you

Fork it!
https://github.com/iguess/wpsclient

WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg
WPSClient - A client for assynchronous interaction with WPS written in Python
9

More Related Content

Viewers also liked

Chronic pain australia disrupting the culture around people living with chr...
Chronic pain australia   disrupting the culture around people living with chr...Chronic pain australia   disrupting the culture around people living with chr...
Chronic pain australia disrupting the culture around people living with chr...
Anne-Marie Elias
 
KnowPR Night Program
KnowPR Night ProgramKnowPR Night Program
KnowPR Night Program
nicolefibarra
 
Pywps
PywpsPywps
WPS Orchestration in Taverna - Jorge Mendes de Jesus
WPS Orchestration in Taverna - Jorge Mendes de JesusWPS Orchestration in Taverna - Jorge Mendes de Jesus
WPS Orchestration in Taverna - Jorge Mendes de Jesus
Luis_de_Sousa
 
52ºNorth WPS Use Cases - Benjamin Proß
52ºNorth WPS Use Cases - Benjamin Proß52ºNorth WPS Use Cases - Benjamin Proß
52ºNorth WPS Use Cases - Benjamin Proß
Luis_de_Sousa
 
Igniting change fair work ombudsman dec 2015
Igniting change fair work ombudsman dec 2015Igniting change fair work ombudsman dec 2015
Igniting change fair work ombudsman dec 2015
Anne-Marie Elias
 
GRASS as a Temporal GIS - Sören Gebbert
GRASS as a Temporal GIS - Sören GebbertGRASS as a Temporal GIS - Sören Gebbert
GRASS as a Temporal GIS - Sören Gebbert
Luis_de_Sousa
 
Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015
Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015
Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015
Anne-Marie Elias
 
Front of leg
Front of legFront of leg
Front of leg
Ezhilarasi Damodharan
 
Disruptive social innovation
Disruptive social innovation   Disruptive social innovation
Disruptive social innovation
Anne-Marie Elias
 

Viewers also liked (11)

Chronic pain australia disrupting the culture around people living with chr...
Chronic pain australia   disrupting the culture around people living with chr...Chronic pain australia   disrupting the culture around people living with chr...
Chronic pain australia disrupting the culture around people living with chr...
 
KnowPR Night Program
KnowPR Night ProgramKnowPR Night Program
KnowPR Night Program
 
Pywps
PywpsPywps
Pywps
 
WPS Orchestration in Taverna - Jorge Mendes de Jesus
WPS Orchestration in Taverna - Jorge Mendes de JesusWPS Orchestration in Taverna - Jorge Mendes de Jesus
WPS Orchestration in Taverna - Jorge Mendes de Jesus
 
52ºNorth WPS Use Cases - Benjamin Proß
52ºNorth WPS Use Cases - Benjamin Proß52ºNorth WPS Use Cases - Benjamin Proß
52ºNorth WPS Use Cases - Benjamin Proß
 
Igniting change fair work ombudsman dec 2015
Igniting change fair work ombudsman dec 2015Igniting change fair work ombudsman dec 2015
Igniting change fair work ombudsman dec 2015
 
GRASS as a Temporal GIS - Sören Gebbert
GRASS as a Temporal GIS - Sören GebbertGRASS as a Temporal GIS - Sören Gebbert
GRASS as a Temporal GIS - Sören Gebbert
 
Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015
Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015
Breakfast with the Stars - Igniting change@ swaab attorneys dec 2015
 
elegxos3
elegxos3elegxos3
elegxos3
 
Front of leg
Front of legFront of leg
Front of leg
 
Disruptive social innovation
Disruptive social innovation   Disruptive social innovation
Disruptive social innovation
 

Similar to WPSClient - Luís de Sousa

Web Processing Service
Web Processing ServiceWeb Processing Service
Web Processing Service
Gasperi Jerome
 
PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...
PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...
PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...
OW2
 
Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...
Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...
Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...
Ashish Gupta
 
20100512 Workflow Ramage
20100512 Workflow Ramage20100512 Workflow Ramage
20100512 Workflow Ramage
Steven Ramage
 
Curriculum vitae
Curriculum vitaeCurriculum vitae
Curriculum vitae
Alexander Zhdanov
 
Cloud computing: highlights
Cloud computing: highlightsCloud computing: highlights
Cloud computing: highlights
Luís Bastião Silva
 
Kostiantyn Bokhan, N-iX. CD4ML based on Azure and Kubeflow
Kostiantyn Bokhan, N-iX. CD4ML based on Azure and KubeflowKostiantyn Bokhan, N-iX. CD4ML based on Azure and Kubeflow
Kostiantyn Bokhan, N-iX. CD4ML based on Azure and Kubeflow
IT Arena
 
Opportunities and Challenges for Running Scientific Workflows on the Cloud
Opportunities and Challenges for Running Scientific Workflows on the Cloud Opportunities and Challenges for Running Scientific Workflows on the Cloud
Opportunities and Challenges for Running Scientific Workflows on the Cloud
lyingcom
 
Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...
Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...
Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...
Mohammed MOUSSA
 
IMPACT Final Conference - Clemens Neudecker
IMPACT Final Conference - Clemens NeudeckerIMPACT Final Conference - Clemens Neudecker
IMPACT Final Conference - Clemens Neudecker
IMPACT Centre of Competence
 
Geo Monday 2016.1 Esri Campus Navigator
Geo Monday 2016.1   Esri Campus NavigatorGeo Monday 2016.1   Esri Campus Navigator
Geo Monday 2016.1 Esri Campus Navigator
Lars Schmitz
 
Keyur_Joshi_resume - Copy
Keyur_Joshi_resume - CopyKeyur_Joshi_resume - Copy
Keyur_Joshi_resume - Copy
Keyur Joshi
 
UberCloud HPC Experiment Introduction for Beginners
UberCloud HPC Experiment Introduction for BeginnersUberCloud HPC Experiment Introduction for Beginners
UberCloud HPC Experiment Introduction for Beginners
hpcexperiment
 
The IMPACT Interoperability Framework - Workflows for OCR and beyond
The IMPACT Interoperability Framework - Workflows for OCR and beyondThe IMPACT Interoperability Framework - Workflows for OCR and beyond
The IMPACT Interoperability Framework - Workflows for OCR and beyond
cneudecker
 
Hao Wang - Resume
Hao Wang - ResumeHao Wang - Resume
Hao Wang - Resume
Hao Wang
 
Service Engineering, ZHAW for CeBIT
Service Engineering, ZHAW for CeBITService Engineering, ZHAW for CeBIT
Service Engineering, ZHAW for CeBIT
Amrita Prasad
 
Capacity building, validation and repeatability
Capacity building, validation and repeatabilityCapacity building, validation and repeatability
Capacity building, validation and repeatability
Blue BRIDGE
 
Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...
Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...
Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...
IOSR Journals
 
F01113945
F01113945F01113945
F01113945
IOSR Journals
 
Containerization Principles Overview for app development and deployment
Containerization Principles Overview for app development and deploymentContainerization Principles Overview for app development and deployment
Containerization Principles Overview for app development and deployment
Dr Ganesh Iyer
 

Similar to WPSClient - Luís de Sousa (20)

Web Processing Service
Web Processing ServiceWeb Processing Service
Web Processing Service
 
PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...
PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...
PEPS: CNES Sentinel Satellite Image Analysis, On-Premises and in the Cloud wi...
 
Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...
Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...
Black Box Methods for Inferring Parallel Applications' Properties in Virtual ...
 
20100512 Workflow Ramage
20100512 Workflow Ramage20100512 Workflow Ramage
20100512 Workflow Ramage
 
Curriculum vitae
Curriculum vitaeCurriculum vitae
Curriculum vitae
 
Cloud computing: highlights
Cloud computing: highlightsCloud computing: highlights
Cloud computing: highlights
 
Kostiantyn Bokhan, N-iX. CD4ML based on Azure and Kubeflow
Kostiantyn Bokhan, N-iX. CD4ML based on Azure and KubeflowKostiantyn Bokhan, N-iX. CD4ML based on Azure and Kubeflow
Kostiantyn Bokhan, N-iX. CD4ML based on Azure and Kubeflow
 
Opportunities and Challenges for Running Scientific Workflows on the Cloud
Opportunities and Challenges for Running Scientific Workflows on the Cloud Opportunities and Challenges for Running Scientific Workflows on the Cloud
Opportunities and Challenges for Running Scientific Workflows on the Cloud
 
Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...
Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...
Work-in-Progress: A Smart Scheduling System for Shared Interactive Remote lab...
 
IMPACT Final Conference - Clemens Neudecker
IMPACT Final Conference - Clemens NeudeckerIMPACT Final Conference - Clemens Neudecker
IMPACT Final Conference - Clemens Neudecker
 
Geo Monday 2016.1 Esri Campus Navigator
Geo Monday 2016.1   Esri Campus NavigatorGeo Monday 2016.1   Esri Campus Navigator
Geo Monday 2016.1 Esri Campus Navigator
 
Keyur_Joshi_resume - Copy
Keyur_Joshi_resume - CopyKeyur_Joshi_resume - Copy
Keyur_Joshi_resume - Copy
 
UberCloud HPC Experiment Introduction for Beginners
UberCloud HPC Experiment Introduction for BeginnersUberCloud HPC Experiment Introduction for Beginners
UberCloud HPC Experiment Introduction for Beginners
 
The IMPACT Interoperability Framework - Workflows for OCR and beyond
The IMPACT Interoperability Framework - Workflows for OCR and beyondThe IMPACT Interoperability Framework - Workflows for OCR and beyond
The IMPACT Interoperability Framework - Workflows for OCR and beyond
 
Hao Wang - Resume
Hao Wang - ResumeHao Wang - Resume
Hao Wang - Resume
 
Service Engineering, ZHAW for CeBIT
Service Engineering, ZHAW for CeBITService Engineering, ZHAW for CeBIT
Service Engineering, ZHAW for CeBIT
 
Capacity building, validation and repeatability
Capacity building, validation and repeatabilityCapacity building, validation and repeatability
Capacity building, validation and repeatability
 
Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...
Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...
Public Verifiability in Cloud Computing Using Signcryption Based on Elliptic ...
 
F01113945
F01113945F01113945
F01113945
 
Containerization Principles Overview for app development and deployment
Containerization Principles Overview for app development and deploymentContainerization Principles Overview for app development and deployment
Containerization Principles Overview for app development and deployment
 

WPSClient - Luís de Sousa

  • 1. WPSClient - A client for assynchronous interaction with WPS written in Python Lu´ de Sousa, Christian Braun, Chris Eykamp, Ulrich Leopold, ıs Olivier Baume and Rui Martins Public Research Centre Henri Tudor, Esch-sur-Alzette, Luxembourg. WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg www.tudor.lu
  • 2. Requirements A generic application A seamless WPS client to be used by a Web Server; A generic approach - unawere of databases or client specificities; Send assynchronous process requests; Check process status; Retrieve results; Publish geospatial results to a MapServer instance: Vector layers available as WMS and WFS; Raster layers available as WMS and WCS; All layers available in EPSG:3857 plus native CRS. WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 2
  • 3. Design options Python GDAL/OGR library; MapScrit library; Results processing similar to inputs processing in PyWPS; Performance not crucial. Pre-configuarations (not available as application inputs): MapServer setup; Aditional CRS; Fle system locations. WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 3
  • 4. Difficulties Sending requests through HTTP POST Required to pass long URLs to WCS and WFS resources; Thin documentation, few examples available; Output names must be known in advance. MapScript No methods available to set up WFS or WCS; Thinly documented; Python library hard to read. WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 4
  • 5. The Map file A text based generator Inelegant code. Totally dependent on the Map file syntaxe. First version developed in hours. Easy to maintain and evolve. WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 5
  • 6. Examples of usage Starting a process >>> import WPSClient >>> myCli = WPSClient.WPSClient() >>> myCli.init( ... "http://wps.iguess.tudor.lu/cgi-bin/pywps.cgi?", ... "slope_aspect", ... ["dem"], ... ["http://maps.iguess.tudor.lu/cgi-bin/mapserv?map=/srv/mapserv/MapFiles/RO_localOWS_test.map &SERVICE=WCS&FORMAT=image/img&CRS=EPSG:28992&BBOX=92221,436692,92306,436769 &RESX=0.5&RESY=0.5&VERSION=1.0.0&REQUEST=getCoverage&COVERAGE=ro_dsm"], ... ["slope", "aspect"], ... ["slope_result", "aspect_result"]) >>> url = myCli.sendRequest() >>> print url http://wps.iguess.tudor.lu/wpsoutputs/pywps-020cc26a-7f92-11e3-a8a7-005056a52e0d.xml WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 6
  • 7. Examples of usage Checking process status >>> myCli = WPSClient.WPSClient() >>> myCli.initFromURL(url, ["slope", "aspect"], ["slope_result", "aspect_result"]) >>> status = myCli.checkStatus() >>> print status True >>> print myCli.statusMessage None Retrieving results >>> myCli = WPSClient.WPSClient() >>> myCli.initFromURL(url, ["slope", "aspect"], ["slope_result", "aspect_result"]) >>> status = myCli.checkStatus() >>> print status True >>> myCli.epsg = "3035" >>> myCli.generateMapFile() DEBUG:WPSClient:Generated layer slope of type raster. DEBUG:WPSClient:Generated layer aspect of type raster. INFO:WPSClient:Wrote map file to disk: /var/www/tmp/pywps-4d87fa24-7f93-11e3-8b10-005056a52e0d.map WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 7
  • 8. Future work Test with other WPS servers. Separate the Map file generator as a sub-module - reusable in other projects. Proper XML parsing? WPS 2.0 ? WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 8
  • 9. Thank you Fork it! https://github.com/iguess/wpsclient WPS technologies for Integrated Assessment Modelling in Urban Areas Workshop January, 22-24 2014, Belval, Luxembourg WPSClient - A client for assynchronous interaction with WPS written in Python 9