How to use the pywps.Process.WPSProcess function in pywps

To help you get started, we’ve selected a few pywps examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ESGF / esgf-compute-wps / compute / wps / processes / slurm_averager.py View on Github external
def __init__(self):
        
        """Process initialization"""
        WPSProcess.__init__(self, 
                            identifier=os.path.split(__file__)[-1].split('.')[0], 
                            title='slurm_averager', 
                            version=1.0, abstract='Slurm Average a variable over a (many) dimension', 
                            storeSupported=True, 
                            statusSupported=True)
        self.domain = self.addComplexInput(identifier='domain', title='domain over which to average', formats=[{'mimeType': 'text/json', 'encoding': 'utf-8', 'schema': None}])
        self.download = self.addLiteralInput(identifier='download', type=bool, title='download output', default=False)
        self.dataIn = self.addComplexInput(identifier='variable', title='variable to average', formats=[{'mimeType': 'text/json'}], minOccurs=1, maxOccurs=1)
        self.average = self.addComplexOutput(identifier='average', title='averaged variable', formats=[{'mimeType': 'text/json'}])
        self.operation = self.addLiteralInput(identifier='operation', type=str, title='download output', default="FooBar")
        self.result = None
github ESGF / esgf-compute-wps / compute / wps / processes / cdas.py View on Github external
def __init__(self):
        """Process initialization"""
        WPSProcess.__init__(self, identifier=os.path.split(__file__)[-1].split('.')[0], title='CDAS', version=0.1, abstract='Climate Data Analytic Services', storeSupported='true', statusSupported='true')
        self.region = self.addComplexInput(identifier='domain', title='Spatial location of timeseries', formats=[{'mimeType': 'text/json', 'encoding': 'utf-8', 'schema': None}], minOccurs=0, maxOccurs=1 )
        self.data = self.addComplexInput(identifier='variable', title='Variables to process', formats=[{'mimeType': 'text/json', 'encoding': 'utf-8', 'schema': None}], minOccurs=1, maxOccurs=1)
        self.operation = self.addComplexInput(identifier='operation', title='Analysis operation', formats=[{'mimeType': 'text/json', 'encoding': 'utf-8', 'schema': None}], minOccurs=0, maxOccurs=1)
        self.async = self.addLiteralInput(identifier='async', title='Async operation', default='true', type=types.StringType, minOccurs=0, maxOccurs=1)
        self.embedded = self.addLiteralInput(identifier='embedded', title='Embedded result', default='false', type=types.StringType, minOccurs=0, maxOccurs=1)
        self.result = self.addLiteralOutput( identifier='result', title='timeseries data', type=types.StringType )
github halestudio / hale / cst / cst-wps / trunk / src / main / webapp / ioBridge.py View on Github external
def createIOBridgeProcess():

    class IOBridgeProcess(WPSProcess):
        def __init__(self):
            WPSProcess.__init__(self, identifier="iobridge",
                    title = "Humboldt CST IOBridge",
                    abstract = """IOBridge process for the Humbold CST.
                    Process acceptes schema file, oml file and input gml
                    file and provides the transformation""",
                    storeSupported = True,
                    statusSupported = True)

            self.schema = self.addComplexInput(identifier="schema",
                            title="Schema file",
                            formats = [{"mimeType":"text/xml"}])
            self.oml = self.addComplexInput(identifier="oml",
                            title="Ontology mapping file",
                            formats = [{"mimeType":"text/xml"}])
            self.gmlin = self.addComplexInput(identifier="gml",
github bird-house / flyingpigeon / flyingpigeon / processes / wps_time_aggregation.py View on Github external
def __init__(self):
        WPSProcess.__init__(self, 
            identifier = "time_aggregation",
            title="aggregate the time frequency",
            version = "0.2",
            metadata= [ {"title": "LSCE" , "href": "http://www.lsce.ipsl.fr/"} ],
            abstract="Calculates the mean over a given time frequence for one input data experiment",
            statusSupported=True,
            storeSupported=True
            )

        # input arguments    
        self.resource = self.addComplexInput(
            identifier="resource",
            title="NetCDF Files",
            abstract="NetCDF Files",
            minOccurs=1,
            maxOccurs=100,
github bird-house / flyingpigeon / flyingpigeon / processes / wps_analogs_detection.py View on Github external
def __init__(self):
        # definition of this process
        WPSProcess.__init__(
            self,
            identifier="analogs_detection",
            title="Analogues of circulation (based on reanalyses data)",
            version="0.9",
            metadata=[
                  {"title": "LSCE",
                   "href": "http://www.lsce.ipsl.fr/en/index.php"},
                  {"title": "Doc",
                   "href": "http://flyingpigeon.readthedocs.io/en/latest/\
                    descriptions/analogues.html#analogues-of-circulation"}
                  ],
            abstract="Search for days with analogue pressure pattern for reanalyses data sets",
            statusSupported=True,
            storeSupported=True
            )
github geopython / pywps / webservices / tomcat / PywpsServlet.py View on Github external
def getProcesses(self):
        """Create temporary Process with literal input and output"""

        from  pywps.Process import WPSProcess

        process = WPSProcess(identifier="servletProcess",
                            title="Java Servlet process")
        process.addLiteralInput(identifier="input",
                            title="Literal input")
        process.addLiteralOutput(identifier="output",
                            title="Literal output")

        def execute():
            self.outputs["output"].setValue(self.inputs["input"].getValue())

        process.execute = execute()

        return process
github bird-house / flyingpigeon / flyingpigeon / processes / wps_gam.py View on Github external
from datetime import datetime, date

from netCDF4 import Dataset
import os 
import numpy as np
from cdo import Cdo
import datetime
import string

from flyingpigeon import tools

from pywps.Process import WPSProcess


class GAMProcess(WPSProcess):
    
    def __init__(self):
        WPSProcess.__init__(
            self,
            identifier = "gam",
            title = "Species destribution model",
            version = "0.2",
            metadata=[
                {"title":"GAM"},
                ],
            abstract="Species destribution model based on PA - Data",
            statusSupported=True,
            storeSupported=True
            )
github bird-house / flyingpigeon / flyingpigeon / processes / wps_eobs2cordex.py View on Github external
import os
import datetime as dt

from flyingpigeon.get_eobs_as_cordex import get_data
from flyingpigeon.get_eobs_as_cordex import EOBS_VARIABLES
from flyingpigeon.subset import countries, countries_longname 

from pywps.Process import WPSProcess

import logging

class EobsToCordexProcess(WPSProcess):
  
  def __init__(self):
    WPSProcess.__init__(self, 
      identifier = "eobs_to_cordex",
      title="EOBS to CORDEX",
      version = "0.4",
      metadata= [
              {"title": "Institut Pierre Simon Laplace", "href": "https://www.ipsl.fr/en/"}
              ],
      abstract="downloads EOBS data in adaped CORDEX format",
      statusSupported=True,
      storeSupported=True
      )

    self.netcdf_file = self.addComplexInput(
      identifier="netcdf_file",
github bird-house / flyingpigeon / flyingpigeon / processes / wps_vbd.py View on Github external
import os
import numpy as np
from cdo import Cdo
import datetime 
#from math import *
from ocgis.util.shp_process import ShpProcess
#from ocgis.util.shp_cabinet import ShpCabinetIterator
import ocgis

from flyingpigeon import config

from pywps.Process import WPSProcess

import logging

class VBDProcess(WPSProcess):
    """
    Process for Anopheles Gambiae population dynamics 
    """

    def __init__(self):
        WPSProcess.__init__(self, 
            identifier = "vbd",
            title="Vector born diseases",
            version = "0.2",
            metadata= [
                {"title": "Climate Service Center", "href": "http://www.climate-service-center.de/"}
                ],
            abstract="Collection of models to calculate variables related to vector born diseases",
            statusSupported=True,
            storeSupported=True
            )