def __init__(self): WPSProcess.__init__(self, identifier = 'r.stats', title = 'Generates area statistics for raster map.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'statistics'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/r.stats.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of raster map(s) to report on', minOccurs = 1, maxOccurs = 1024, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'separator', title = 'Field separator', abstract = 'Special characters: newline, space, comma, tab', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "space") self.addLiteralInput(identifier = 'nv', title = 'String representing no data cell value', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "*") self.addLiteralInput(identifier = 'nsteps', title = 'Number of floating-point subranges to collect stats from', minOccurs = 0, maxOccurs = 1, type = type(0), default = 255) self.addLiteralInput(identifier = 'sort', title = 'Sort output statistics by cell counts', abstract = 'Default: sorted by categories or intervals', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = ['asc', 'desc']) self.addLiteralInput(identifier = '-a', title = 'Print area totals in square meters', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-c', title = 'Print cell counts (sortable)', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-p', title = 'Print approximate (total percent may not be 100%) percents', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-l', title = 'Print category labels', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-1', title = 'One cell (range) per line', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-g', title = 'Print grid coordinates (east and north)', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-x', title = 'Print x and y (column and row)', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-A', title = 'Print averaged values instead of intervals (floating-point maps only)', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-r', title = 'Print raw indexes of floating-point ranges (floating-point maps only)', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-n', title = 'Do not report no data value', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-N', title = 'Do not report cells where all maps have no data', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-C', title = 'Report for cats floating-point ranges (floating-point maps only)', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-i', title = 'Read floating-point map as integer (use maps quant rules)', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output file (if omitted or "-" output to stdout)', formats = [{'mimeType': 'text/plain'}])
def __init__(self): WPSProcess.__init__(self, identifier="fetch", title="Download Resources", version = "0.1", abstract="This process downloads resources (limited to 50GB) \ to the local file system of the birdhouse compute provider", statusSupported=True, storeSupported=True) self.resource = self.addComplexInput( identifier="resource", title="NetCDF File", abstract="NetCDF File", minOccurs=1, maxOccurs=100, maxmegabites=5000, formats=[{"mimeType":"application/x-netcdf"}], ) self.output = self.addComplexOutput( identifier="output", title="Fetched Files", abstract="File containing the local pathes to downloades files", formats=[{"mimeType":"text/plain"}], asReference=True, )
def __init__(self): WPSProcess.__init__(self, identifier = "reducer", title="Geotiff sizer reducer", version = "0.1", abstract="GDAL and Numpy code that will reduze the dimension of a satelite image by using a mean calculation of values", storeSupported = "true", statusSupported = "true") self.reductionFactor=self.addLiteralInput(identifier = "reductionFactor", title = "Reduction factor (fraction)", abstract="Reduction factor between 0 and 1.0 that will be use do reducec the image", minOccurs=1, type=types.FloatType, allowedValues=("*") ) # default=0.5) self.imageIn=self.addComplexInput(identifier="imageInput", title="Geotiff input", abstract="Image that will be reduced", formats=[{"mimeType": "image/tiff"}] ) self.imageOut=self.addComplexOutput(identifier="imageOutput", title="Geotiff output", abstract="Reduced image", formats=[{"mimeType": "image/tiff"}] )
def __init__(self): # init process WPSProcess.__init__(self, identifier = "pgbuffer", title="Buffer process using GRASS-Python interface", version = "0.1", storeSupported = "true", statusSupported = "true", abstract="""Process demonstrating how to work with GRASS-Python interface inside PyWPS""", grassLocation=True) self.data = self.addComplexInput(identifier = "data", title = "Input vector file", formats=[{"mimeType":"text/xml"}] ) self.size = self.addLiteralInput(identifier="size", title="Buffer area size", allowedValues = [[-10000,10000]], type=types.FloatType) self.output =self.addComplexOutput(identifier="buffer", title="Buffered data", formats=[{"mimeType":"text/xml"}, {"mimeType":"application/wfs-collection-1.1"}], useMapscript=True)
def __init__(self): WPSProcess.__init__( self, identifier="simple_plot", title="Simple NetCDF Plotter", version="0.2", abstract="Simple NetCDF Plotter", statusSupported=True, storeSupported=True ) self.dataset = self.addComplexInput( identifier="dataset", title="Dataset (NetCDF)", minOccurs=1, maxOccurs=1, maxmegabites=5000, formats=[{"mimeType": "application/x-netcdf"}], ) # self.variable = self.addLiteralInput( # identifier="variable", # title="Variable", # abstract="Variable to plot", # type=type(''), # minOccurs=1, # maxOccurs=1, # ) self.output = self.addComplexOutput( identifier="output", title="Plot", formats=[{"mimeType": "image/png"}], asReference=True, )
def __init__(self): """Process initialization""" WPSProcess.__init__(self, identifier=os.path.split(__file__)[-1].split('.')[0], title='averager', version=0.1, abstract='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'}])
def __init__(self): WPSProcess.__init__(self, identifier="analogs_viewer", title="Analogs -- Viewer", version = "0.1", abstract="Visualisation of text output of analogue process", statusSupported=True, storeSupported=True) self.resource = self.addComplexInput( identifier="resource", title="Analogues", abstract="Analogues text file", minOccurs=1, maxOccurs=1, #maxmegabites=5000, formats=[{"mimeType":"text/plain"}], ) self.output_html = self.addComplexOutput( identifier="output_html", title="html viewer", abstract="web browser compatible hmtl file", formats=[{"mimeType":"text/html"}], asReference=True, ) self.output_txt = self.addLiteralOutput( identifier="output_txt", title="modified analogs txt file", abstract="txt file for analog viewer", default=None, type=type(''), )
def __init__(self): ## # Process initialization WPSProcess.__init__(self, identifier = "returner", title="Return process", abstract="""This is demonstration process of PyWPS, returns the same file, it gets on input, as the output.""", version = "1.0", storeSupported = True, statusSupported = True) ## # Adding process inputs self.dataIn = self.addComplexInput(identifier="data", title="Input vector data", formats = [{'mimeType':'text/xml'}]) self.textIn = self.addLiteralInput(identifier="text", title = "Some width") ## # Adding process outputs self.dataOut = self.addComplexOutput(identifier="output", title="Output vector data", formats = [{'mimeType':'text/xml'}]) self.textOut = self.addLiteralOutput(identifier = "text", title="Output literal data")
def __init__(self): """Process initialization""" WPSProcess.__init__(self, identifier=os.path.split(__file__)[-1].split('.')[0], title='timeseries', version=0.1, abstract='Extract a timeseries at a spatial location', storeSupported='true', statusSupported='true') self.domain = self.addComplexInput(identifier='domain', title='spatial location of timeseries', 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.result = self.addLiteralOutput( identifier='result', title='timeseries data', type=types.StringType )
def __init__(self): WPSProcess.__init__(self, identifier = 'r.slope.aspect', title = 'Aspect is calculated counterclockwise from east.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'terrain'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/r.slope.aspect.html') # Literal and complex inputs self.addComplexInput(identifier = 'elevation', title = 'Name of input elevation raster map', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'format', title = 'Format for reporting the slope', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "degrees", allowedValues = ['degrees', 'percent']) self.addLiteralInput(identifier = 'precision', title = 'Type of output aspect and slope maps', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "FCELL", allowedValues = ['CELL', 'FCELL', 'DCELL']) self.addLiteralInput(identifier = 'zfactor', title = 'Multiplicative factor to convert elevation units to meters', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1.0) self.addLiteralInput(identifier = 'min_slp_allowed', title = 'Minimum slope val. (in percent) for which aspect is computed', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.0) self.addLiteralInput(identifier = '-a', title = 'Do not align the current region to the elevation layer', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'slope', title = 'Name for output slope raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'aspect', title = 'Name for output aspect raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'pcurv', title = 'Name for output profile curvature raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'tcurv', title = 'Name for output tangential curvature raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'dx', title = 'Name for output first order partial derivative dx (E-W slope) raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'dy', title = 'Name for output first order partial derivative dy (N-S slope) raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'dxx', title = 'Name for output second order partial derivative dxx raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'dyy', title = 'Name for output second order partial derivative dyy raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'dxy', title = 'Name for output second order partial derivative dxy raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self): # init process WPSProcess.__init__( self, identifier="seriouslyDeterioratedIndicator", #the same as the file name version = "1.0", title="Seriously deteriorated patients", storeSupported = "false", statusSupported = "false", abstract="Number of patients with (actual health) less than (health at the beginning - 50)", grassLocation = False) self.ICMMworldstateURL = self.addLiteralInput (identifier = "ICMMworldstateURL", type = type(""), title = "ICMM WorldState id") self.ooi=self.addLiteralOutput(identifier = "OOIindicatorURL", type = type (""), title = "URL to access indicator from OOI") self.icmmRef=self.addLiteralOutput(identifier = "ICMMindicatorRefURL", type = type (""), title = "URL to access indicator reference from ICMM") self.icmmVal=self.addLiteralOutput(identifier = "ICMMindicatorValueURL", type = type (""), title = "URL to access indicator value from ICMM") self.value=self.addLiteralOutput(identifier = "value", type = type (""), title = "indicator value") # for ICMM and OOI self.indicatorPropertyId = 62 # Seriously Deteriorated self.doUpdate = 1 # 1: recalculate existing indicator; 0: use existing value self.ICMMworldstate = None # Access-object for ICMM WorldState self.OOIworldstate = None # Access-object for OOI WorldState
def __init__(self): logging.debug("init"); # init process WPSProcess.__init__(self, identifier="WCS_subsetting", #the same as the file name title="SpatialSelection", version = "1.0", storeSupported = True, statusSupported = True, abstract="Spatial extraction/subsetting.", grassLocation =False) self.resource = self.addLiteralInput(identifier="resource",title = "Input file(s)",abstract="application/netcdf",type=type("S"), default="http://opendap.knmi.nl/knmi/thredds/dodsC/IS-ENES/TESTSETS/tasmax_day_EC-EARTH_rcp26_r8i1p1_20760101-21001231.nc",minOccurs=0,maxOccurs=1024) self.outputFileName = self.addLiteralInput(identifier="outputFileName",title = "Output file name",type="String",default="wcs.nc") self.coverage = self.addLiteralInput(identifier = "coverage",title = "Coverage",type="String",default="tasmax") self.bbox = self.addLiteralInput(identifier = "bbox",title = "Bounding box in defined coordinate system",type="String",minOccurs=4,maxOccurs=4,default="-180,-90,180,90") self.crs = self.addLiteralInput(identifier = "crs",title = "Coordinate reference system",type="String",default="EPSG:4326") self.dates = self.addLiteralInput(identifier = "dates",title = "Start/stop/resolution in ISO8601 format",type="String",default="2076-01-01T12:00:00Z/2076-02-01T12:00:00Z/P1D") self.resx = self.addLiteralInput(identifier = "resx",title = "X resolution",type="String",default="1") self.resy = self.addLiteralInput(identifier = "resy",title = "Y resolution",type="String",default="1") self.tags = self.addLiteralInput(identifier = "tags",title = "Your tag for this process",type="String",default="provenance_research_knmi"); self.opendapURL = self.addLiteralOutput(identifier = "opendapURL",title = "opendapURL"); self.outputFormat = self.addLiteralInput(identifier = 'outputFormat', title = 'outputFormat', type="String", default = 'netcdf') self.outputFormat.values = ["netcdf","geotiff","aaigrid"]#,"gtiff","aaigrid"]
def __init__(self,Identifier,Title,Abstract): # Call of WPSProcess constructor WPSProcess.__init__(self, identifier = Identifier, title = Title, abstract = Abstract, version = "1.0", storeSupported = True, statusSupported = True) # Initialization of structure for form widgets self.IOFields = dict() self.IOFields["input"] = dict() self.IOFields["input"]["wfs"] = dict() self.IOFields["input"]["wcs"] = dict() self.IOFields["input"]["param"] = dict() self.IOFields["input"]["scroll"] = dict() self.IOFields["input"]["checkbox"] = dict() self.IOFields["input"]["gml"] = dict() self.IOFields["input"]["coordxy"] = dict() self.IOFields["input"]["workspace"] = dict() self.IOFields["output"] = dict() self.IOFields["output"]["param"] = dict() self.IOFields["output"]["wms"] = dict()
def __init__(self): WPSProcess.__init__(self, identifier = "complexprocessows", title="Complex process", storeSupported=True) self.vectorin = self.addComplexInput(identifier="vectorin", title="Vector file", formats =[{"mimeType":"application/xml"}]) self.rasterin = self.addComplexInput(identifier="rasterin", title="Raster file", formats = [{"mimeType":"image/tiff"}]) self.pausein = self.addLiteralInput(identifier="pause", title="Pause the process", abstract="Pause the process for several seconds, so that status=true can be tested", default = False, type = type(True)) self.vectorout = self.addComplexOutput(identifier="vectorout", title="Vector file", formats =[{"mimeType":"application/xml"}], useMapscript=True) self.rasterout = self.addComplexOutput(identifier="rasterout", title="Raster file", formats = [{"mimeType":"image/tiff"}], useMapscript=True)
def __init__(self, identifier, version, title, abstract): # init process WPSProcess.__init__( self, identifier=identifier, version = version, title=title, storeSupported = "false", statusSupported = "false", abstract=abstract, grassLocation = False) self.ICMMworldstateURL = self.addLiteralInput (identifier = "ICMMworldstateURL", type = type(""), title = "ICMM WorldState id") self.icmmRef=self.addLiteralOutput(identifier = "ICMMindicatorRefURL", type = type (""), title = "URL to access indicator reference from ICMM") self.icmmVal=self.addLiteralOutput(identifier = "ICMMindicatorValueURL", type = type (""), title = "URL to access indicator value from ICMM") self.value=self.addLiteralOutput(identifier = "value", type = type (""), title = "indicator value") # for ICMM and OOI self.doUpdate = 1 # 1: recalculate existing indicator; 0: use existing value self.ICMMworldstate = None # Access-object for ICMM WorldState self.worldstateDescription = None # description of WorldState: ICMMname, ICMMdescription, ICMMworldstateURL, OOIworldstateURL
def __init__(self): WPSProcess.__init__(self, identifier = 'v.surf.bspline', title = 'Performs bicubic or bilinear spline interpolation with Tykhonov regularization.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'surface'}, {'type': 'simple', 'title': 'interpolation'}, {'type': 'simple', 'title': 'LIDAR'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.surf.bspline.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of input vector point map', abstract = 'Or data source for direct OGR access', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'layer', title = 'Layer number or name', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1") self.addComplexInput(identifier = 'sparse_input', title = 'Name of input vector map with sparse points', abstract = 'Or data source for direct OGR access', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addComplexInput(identifier = 'mask', title = 'Raster map to use for masking (applies to raster output only)', abstract = 'Only cells that are not NULL and not zero are interpolated', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'sie', title = 'Length of each spline step in the east-west direction', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 4.0) self.addLiteralInput(identifier = 'sin', title = 'Length of each spline step in the north-south direction', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 4.0) self.addLiteralInput(identifier = 'method', title = 'Spline interpolation algorithm', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "linear", allowedValues = ['linear', 'cubic']) self.addLiteralInput(identifier = 'lambda_i', title = 'Tykhonov regularization parameter (affects smoothing)', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.01) self.addLiteralInput(identifier = 'column', title = 'Name of the attribute column with values to be used for approximation', abstract = 'If not given and input is 3D vector map then z-coordinates are used.', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'solver', title = 'The type of solver which should solve the symmetric linear equation system', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "cholesky", allowedValues = ['cholesky', 'cg']) self.addLiteralInput(identifier = 'maxit', title = 'Maximum number of iteration used to solve the linear equation system', minOccurs = 0, maxOccurs = 1, type = type(0), default = 10000) self.addLiteralInput(identifier = 'error', title = 'Error break criteria for iterative solver', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1e-06) self.addLiteralInput(identifier = 'memory', title = 'Maximum memory to be used for raster output (in MB)', minOccurs = 0, maxOccurs = 1, type = type(0), default = 300) self.addLiteralInput(identifier = '-c', title = 'Find the best Tykhonov regularizing parameter using a "leave-one-out" cross validation method', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-e', title = 'Estimate point density and distance for the input vector points within the current region extends and quit', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output vector map', formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}]) self.addComplexOutput(identifier = 'raster_output', title = 'Name for output raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self, identifier, description, location='subdayprecip'): WPSProcess.__init__(self, identifier=identifier, version="0.1", title="Subday design precipitation. " + description, abstract="Computes subday design precipitation series using GRASS GIS. " "See http://grass.osgeo.org/grass70/manuals/addons/r.subdayprecip.design.html for details.", grassLocation=location, storeSupported = True, statusSupported = True) self.input = self.addComplexInput(identifier = "input", title = "Input vector data", formats = [ {"mimeType":"text/xml", "encoding":"utf-8", "schema":"http://schemas.opengis.net/gml/3.2.1/gml.xsd"} ], minOccurs=0) self.raster = self.addLiteralInput(identifier = "raster", title = "Name of repetition periods raster map(s)", type = types.StringType, default = "H_002,H_005,H_010,H_020,H_050,H_100") self.rainlength = self.addLiteralInput(identifier = "rainlength", title = "Rain length value in minutes", type = types.IntType) self.output = None # to be defined by descendant self.output_dir = None os.environ['GRASS_SKIP_MAPSET_OWNER_CHECK'] = '1' os.environ['HOME'] = '/tmp' # needed by G_home()
def __init__(self): WPSProcess.__init__(self, identifier = 'r.sunmask', title = 'Either exact sun position (A) is specified, or date/time to calculate the sun position (B) by r.sunmask itself.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'solar'}, {'type': 'simple', 'title': 'sun position'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/r.sunmask.html') # Literal and complex inputs self.addComplexInput(identifier = 'elevation', title = 'Name of input elevation raster map', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'altitude', title = 'Altitude of the sun above horizon, degrees (A)', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'azimuth', title = 'Azimuth of the sun from the north, degrees (A)', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'year', title = 'Year (B)', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'month', title = 'Month (B)', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'day', title = 'Day (B)', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'hour', title = 'Hour (B)', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'minute', title = 'Minutes (B)', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'second', title = 'Seconds (B)', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'timezone', title = 'Timezone', abstract = 'East positive, offset from GMT, also use to adjust daylight savings', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'east', title = 'Easting coordinate (point of interest)', abstract = 'Default: map center', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'north', title = 'Northing coordinate (point of interest)', abstract = 'Default: map center', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = '-z', title = 'Dont ignore zero elevation', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-s', title = 'Calculate sun position only and exit', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-g', title = 'Print the sun position output in shell script style', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self): WPSProcess.__init__(self, identifier = "complexprocess", title="Complex process", storeSupported=True) self.vectorin = self.addComplexInput(identifier="vectorin", title="Vector file", formats = [{"mimeType":"application/xml"}]) self.rasterin = self.addComplexInput(identifier="rasterin", title="Raster file", formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.pausein = self.addLiteralInput(identifier="pause", title="Pause the process", abstract="Pause the process for several seconds, so that status=true can be tested", default = False, type = type(True)) self.vectorout = self.addComplexOutput(identifier="vectorout", title="Vector file", formats = [{"mimeType":"application/xml"},{"mimeType":"text/plain"},{"mimeType":"text/xml"}]) self.rasterout = self.addComplexOutput(identifier="rasterout", title="Raster file", formats = [{"mimeType":"image/tiff"}])
def __init__(self): # init process WPSProcess.__init__( self, identifier="improvedIndicator", #the same as the file name version = "1.0", title="Improved patients", storeSupported = "false", statusSupported = "false", abstract="Number of patients with actual health better or equal as at the beginning", grassLocation = False) self.ICMMworldstateURL = self.addLiteralInput (identifier = "ICMMworldstateURL", type = type(""), title = "ICMM WorldState id") self.ooi=self.addLiteralOutput(identifier = "OOIindicatorURL", type = type (""), title = "URL to access indicator from OOI") self.icmmRef=self.addLiteralOutput(identifier = "ICMMindicatorRefURL", type = type (""), title = "URL to access indicator reference from ICMM") self.icmmVal=self.addLiteralOutput(identifier = "ICMMindicatorValueURL", type = type (""), title = "URL to access indicator value from ICMM") self.value=self.addLiteralOutput(identifier = "value", type = type (""), title = "indicator value") # for ICMM and OOI self.indicatorPropertyId = 63 # improvedIndicator self.doUpdate = 1 # 1: recalculate existing indicator; 0: use existing value self.ICMMworldstate = None # Access-object for ICMM WorldState self.OOIworldstate = None # Access-object for OOI WorldState self.worldstateDescription = None # description of WorldState: ICMMname, ICMMdescription, ICMMworldstateURL, OOIworldstateURL
def __init__(self): WPSProcess.__init__( self, identifier="literalprocess", title="Literal process", metadata=[ {"title": "Foobar", "href": "http://foo/bar"}, {"title": "Barfoo", "href": "http://bar/foo"}, {"title": "Literal process"}, {"href": "http://foobar/"}, ], ) self.intIn = self.addLiteralInput(identifier="int", title="Integer data in") self.stringIn = self.addLiteralInput(identifier="string", title="String data in", type=type("")) self.floatIn = self.addLiteralInput(identifier="float", title="Float data in", type=type(0.0)) self.zeroInDefault = self.addLiteralInput( identifier="zerodefault", title="Zero data input", default=0.0, type=type(0.0) ) self.zeroInSet = self.addLiteralInput(identifier="zeroset", title="Zero data input", type=type(0.0)) self.boolIn = self.addLiteralInput( identifier="bool", title="Boolean input", type=type(False), allowedValues=[True, False] ) self.intOut = self.addLiteralOutput(identifier="int", title="Integer data out") self.stringOut = self.addLiteralOutput(identifier="string", title="String data out", type=type("")) self.floatOut = self.addLiteralOutput(identifier="float", title="Float data out", type=type(0.0)) self.boolOut = self.addLiteralOutput(identifier="bool", title="Boolean data out", type=type(False))
def __init__(self): # init process WPSProcess.__init__(self, identifier = "osm", title="GIS_precomp", version = "0.1", storeSupported = "true", statusSupported = "true", abstract="Compare 2 vectors from input", grassLocation ="/home/user/grassdata/location") self.dbtr = self.addComplexInput(identifier="input1",title="Input vector data 1",formats =[{'mimeType':'text/xml'}]) self.osm = self.addComplexInput(identifier="input2",title="Input vector data 2",formats =[{'mimeType':'text/xml'}]) self.mask = self.addComplexInput(identifier="mask",title="Mask to restrict the area", minOccurs=0, formats =[{'mimeType':'text/xml'}]) self.buffer = self.addLiteralInput(identifier = "buffer", title = "Buffer size", type = type(""), default="15") self.Output=self.addLiteralOutput(identifier="output",title="result")
def __init__(self): WPSProcess.__init__(self, identifier = 'r.cost', title = 'Creates a raster map showing the cumulative cost of moving between different geographic locations on an input raster map whose cell category values represent cost.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'cost surface'}, {'type': 'simple', 'title': 'cumulative costs'}, {'type': 'simple', 'title': 'cost allocation'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/r.cost.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of input raster map containing grid cell cost information', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'start_points', title = 'Name of starting vector points map', abstract = 'Or data source for direct OGR access', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addComplexInput(identifier = 'stop_points', title = 'Name of stopping vector points map', abstract = 'Or data source for direct OGR access', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addComplexInput(identifier = 'start_rast', title = 'Name of starting raster points map', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'start_coordinates', title = 'Coordinates of starting point(s) (E,N)', minOccurs = 0, maxOccurs = 1024, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'stop_coordinates', title = 'Coordinates of stopping point(s) (E,N)', minOccurs = 0, maxOccurs = 1024, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'max_cost', title = 'Maximum cumulative cost', minOccurs = 0, maxOccurs = 1, type = type(0), default = 0) self.addLiteralInput(identifier = 'null_cost', title = 'Cost assigned to null cells. By default, null cells are excluded', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'percent_memory', title = 'Percent of map to keep in memory', minOccurs = 0, maxOccurs = 1, type = type(0), default = 40) self.addLiteralInput(identifier = '-k', title = 'Use the Knights move; slower, but more accurate', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-n', title = 'Keep null values in output raster map', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-r', title = 'Start with values in raster map', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-i', title = 'Print info about disk space and memory requirements and exit', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output raster map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'nearest', title = 'Name for output raster map with nearest start point', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'outdir', title = 'Name for output raster map to contain movement directions', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self): WPSProcess.__init__(self, identifier = 'r.spread', title = 'It optionally produces raster maps to contain backlink UTM coordinates for tracing spread paths.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'fire'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/r.spread.html') # Literal and complex inputs self.addComplexInput(identifier = 'max', title = 'Name of raster map containing MAX rate of spread (ROS) (cm/min)', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'dir', title = 'Name of raster map containing DIRections of max ROS (degree)', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'base', title = 'Name of raster map containing BASE ROS (cm/min)', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'start', title = 'Name of raster map containing STARTing sources', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'spot_dist', title = 'Name of raster map containing max SPOTting DISTance (m) (required w/ -s)', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'w_speed', title = 'Name of raster map containing midflame Wind SPEED (ft/min) (required w/ -s)', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'f_mois', title = 'Name of raster map containing fine Fuel MOISture of the cell receiving a spotting firebrand (%) (required w/ -s)', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'least_size', title = 'Basic sampling window SIZE needed to meet certain accuracy (3)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = ['3', '5', '7', '9', '11', '13', '15']) self.addLiteralInput(identifier = 'comp_dens', title = 'Sampling DENSity for additional COMPutin (range: 0.0 - 1.0 (0.5))', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'init_time', title = 'INITial TIME for current simulation (0) (min)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'lag', title = 'Simulating time duration LAG (fill the region) (min)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addComplexInput(identifier = 'backdrop', title = 'Name of raster map as a display backdrop', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = '-d', title = 'Live display - currently DISABLED', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-s', title = 'For wildfires: consider SPOTTING effect', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name of raster map to contain OUTPUT spread time (min)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'x_output', title = 'Name of raster map to contain X_BACK coordinates', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'y_output', title = 'Name of raster map to contain Y_BACK coordinates', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self): WPSProcess.__init__(self, identifier = 'r.resamp.rst', title = 'Reinterpolates and optionally computes topographic analysis from input raster map to a new raster map (possibly with different resolution) using regularized spline with tension and smoothing.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'resample'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/r.resamp.rst.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of input raster map', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'ew_res', title = 'Desired east-west resolution', minOccurs = 1, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'ns_res', title = 'Desired north-south resolution', minOccurs = 1, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addComplexInput(identifier = 'smooth', title = 'Name of raster map containing smoothing', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'maskmap', title = 'Name of raster map to be used as mask', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'overlap', title = 'Rows/columns overlap for segmentation', minOccurs = 0, maxOccurs = 1, type = type(0), default = 3) self.addLiteralInput(identifier = 'zmult', title = 'Multiplier for z-values', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1.0) self.addLiteralInput(identifier = 'tension', title = 'Spline tension value', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 40.0) self.addLiteralInput(identifier = 'theta', title = 'Anisotropy angle (in degrees)', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'scalex', title = 'Anisotropy scaling factor', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = '-t', title = 'Use dnorm independent tension', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-d', title = 'Output partial derivatives instead of topographic parameters', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'elev', title = 'Output z-file (elevation) map', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'slope', title = 'Output slope map (or fx)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'aspect', title = 'Output aspect map (or fy)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'pcurv', title = 'Output profile curvature map (or fxx)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'tcurv', title = 'Output tangential curvature map (or fyy)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'mcurv', title = 'Output mean curvature map (or fxy)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self): """Process initialization""" # init process WPSProcess.__init__(self, identifier = "Walkshed_Transit_Centralized", # must be same, as filename title="Walkshed WPS", version = "0.1", storeSupported = "true", statusSupported = "true", abstract="Process for generating walkshed") self.fromPlace = self.addLiteralInput(identifier="StartPoint", title = "Walking start point", type=StringType) self.walkTime = self.addLiteralInput(identifier="WalkingPeriod", title = "Walking time period", type=StringType) self.walkSpeed = self.addLiteralInput(identifier="WalkingSpeed", title = "Walking speed", type=StringType) self.output = self.addLiteralInput(identifier="WalkshedOutput", title = "Walkshed ouput", allowedValues=["SHED","EDGES","POINTS"], type=StringType) self.walkshedResult = self.addLiteralOutput(identifier="WalkshedResult", title="Walkshed result", type=StringType)
def __init__(self): WPSProcess.__init__( self, identifier="wordcount", title="Word Counter", version = "1.0", metadata = [], abstract="Counts words in a given text ...", storeSupported = True, statusSupported = True, ) self.text = self.addComplexInput( identifier = "text", title = "Text document", abstract = "URL of text document", minOccurs=1, maxOccurs=1, formats=[{"mimeType":"text/plain"}], maxmegabites=2, ) self.output = self.addComplexOutput( identifier = "output", title = "Word count result", formats=[{"mimeType":"text/plain"}], asReference=True, )
def __init__(self): # init process WPSProcess.__init__(self, identifier = "ogrbuffer", # must be same, as filename title="Buffer process using OGR", version = "0.1", storeSupported = "true", statusSupported = "true", metadata=[{'title':'buffer' ,'href':"http://foo/bar"}], abstract="Process demonstrating how to work with OGR inside PyWPS: e.g: http%3A//localhost/wps.cgi%3Frequest%3DExecute%26service%3Dwps%26version%3D1.0.0%26identifier%3Dogrbuffer%26datainputs%3D%5Bdata%3Dhttp%3A//openlayers.org/dev/examples/gml/line.xml%3Bsize%3D0.1%5D%26responsedocument%3D%5Bbuffer%3D%40asreference%3Dtrue%5D") self.data = self.addComplexInput(identifier = "data", title = "Input vector file", formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}], metadata=[{'title':'buffer' ,'href':"http://foo/bar"}]) self.size = self.addLiteralInput(identifier="size", title="Buffer area size", type=type(0.0), allowedValues = [[0,10000]], metadata=[{'title':'number','href':'http://integer'}]) self.output =self.addComplexOutput(identifier="buffer", title="Buffered data", formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}], metadata=[{'title':'bufferOut','href':'http://buffer/out'}], useMapscript=True)
def __init__(self): """Process initialization""" # init process WPSProcess.__init__(self, identifier = "Management_Transit", # must be same, as filename title="Management WPS", version = "0.1", storeSupported = "true", statusSupported = "true", abstract="Process for generating walkshed") self.start_point = self.addLiteralInput(identifier="StartPoint", title = "Walking start point", type=StringType) self.start_time = self.addLiteralInput(identifier="StartTime", title = "Walking start time", type=StringType) self.walking_time_period = self.addLiteralInput(identifier="WalkingTimePeriod", title = "Walking time period", type=StringType) self.walking_speed = self.addLiteralInput(identifier="WalkingSpeed", title = "Walking speed", type=StringType) self.bus_waiting_time = self.addLiteralInput(identifier="BusWaitingTime", title = "bus waiting time", type=StringType) self.bus_ride_time = self.addLiteralInput(identifier="BusRideTime", title = "bus ride time", type=StringType) self.distance_decay_function = self.addLiteralInput(identifier="DistanceDecayFunction", title = "use distance decay function or not", type=StringType) self.walkScore = self.addLiteralOutput(identifier="AccessiblityScore", title="accessiblity score", type=StringType)
def __init__(self, identifier, description, location='subdayprecip', skip=[]): WPSProcess.__init__(self, identifier=identifier, version="0.1", title="Návrhová srážka pro zvolenou lokalitu. " + description, abstract="Počítá návrhovou srážku pro zvolenou lokalitu s využitím nástroje GRASS GIS r.subdayprecip.design. " "Více informací na http://rain.fsv.cvut.cz/nastroje/r.subdayprecip.design", grassLocation=location, storeSupported = True, statusSupported = True) if 'input' not in skip: self.input = self.addComplexInput(identifier = "input", title = "Vstupní bodová nebo polygonová vektorová data", formats = [ {"mimeType":"text/xml", "encoding":"utf-8", "schema":"http://schemas.opengis.net/gml/3.2.1/gml.xsd"} ], minOccurs=0) self.return_period = self.addLiteralInput(identifier = "return_period", title = "Doby opakování", type = types.StringType, default = "N2,N5,N10,N20,N50,N100") self.rainlength_value = None if 'rainlength' not in skip: self.rainlength = self.addLiteralInput(identifier = "rainlength", title = "Délka srážky v minutách", type = types.IntType) self.output = None # to be defined by descendant self.output_dir = None os.environ['GRASS_SKIP_MAPSET_OWNER_CHECK'] = '1' os.environ['HOME'] = '/tmp' # needed by G_home()
def __init__(self): WPSProcess.__init__(self, identifier = 'v.univar', title = 'Variance and standard deviation is calculated only for points if specified.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'statistics'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.univar.html') # Literal and complex inputs self.addComplexInput(identifier = 'map', title = 'Name of vector map', abstract = 'Or data source for direct OGR access', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'layer', title = 'Layer number or name', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1") self.addLiteralInput(identifier = 'type', title = 'Feature type', minOccurs = 0, maxOccurs = 1024, type = type("string"), default = "point,line,area", allowedValues = ['point', 'line', 'boundary', 'centroid', 'area']) self.addLiteralInput(identifier = 'column', title = 'Name of attribute column', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'where', title = 'WHERE conditions of SQL statement without where keyword', abstract = 'Example: income < 1000 and inhab >= 10000', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'percentile', title = 'Percentile to calculate (requires extended statistics flag)', minOccurs = 0, maxOccurs = 1, type = type(0), default = 90) self.addLiteralInput(identifier = '-g', title = 'Print the stats in shell script style', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-e', title = 'Calculate extended statistics', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-w', title = 'Weigh by line length or area size', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-d', title = 'Calculate geometry distances instead of table data.', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) # complex outputs self.addComplexOutput(identifier = 'stdout', title = 'Module output on stdout', abstract = 'The output of the module written to stdout', formats = [{'mimeType': 'text/plain'}])
def __init__(self): WPSProcess.__init__(self, identifier="complexRasterMapscript", title="Second Process") self.indata = self.addComplexInput(identifier="indata", title="Complex in", formats=[{ "mimeType": "image/tiff" }], maxmegabites=2) self.outdata = self.addComplexOutput(identifier="outdata", title="Complex out", formats=[{ "mimeType": "image/tiff" }], useMapscript=True)
def __init__(self): WPSProcess.__init__(self, identifier = 'v.net.iso', title = 'Splits net to bands between cost isolines (direction from centre). Centre node must be opened (costs >= 0). Costs of centre node are used in calculation.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'network'}, {'type': 'simple', 'title': 'isolines'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.net.iso.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of input vector map', abstract = 'Or data source for direct OGR access', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'type', title = 'Arc type', abstract = 'Feature type', minOccurs = 0, maxOccurs = 1024, type = type("string"), default = "line,boundary", allowedValues = ['line', 'boundary']) self.addLiteralInput(identifier = 'alayer', title = 'Arc layer', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1") self.addLiteralInput(identifier = 'nlayer', title = 'Node layer', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "2") self.addLiteralInput(identifier = 'afcolumn', title = 'Arc forward/both direction(s) cost column (number)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'abcolumn', title = 'Arc backward direction cost column (number)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'ncolumn', title = 'Node cost column (number)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'ccats', title = 'Category values', abstract = 'Categories of centres (points on nodes) to which net will be allocated. Layer for this categories is given by nlayer option.', minOccurs = 1, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'costs', title = 'Costs for isolines', minOccurs = 1, maxOccurs = 1024, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = '-g', title = 'Use geodesic calculation for longitude-latitude locations', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output vector map', formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}])
def __init__(self): WPSProcess.__init__(self, identifier = "literalprocess", title="Literal process", storeSupported=True, metadata=[{"title":"Foobar","href":"http://foo/bar"}, {"title":"Barfoo","href":"http://bar/foo"}, {"title":"Literal process"}, {"href":"http://foobar/"}]) self.intIn = self.addLiteralInput(identifier="int", title="Integer data in") self.stringIn = self.addLiteralInput(identifier="string", title="String data in", type = type("")) self.floatIn = self.addLiteralInput(identifier="float", title="Float data in", type = type(0.0)) self.zeroInDefault = self.addLiteralInput(identifier="zerodefault", title="Zero data input", default=0.0, type = type(0.0)) self.zeroInSet = self.addLiteralInput(identifier="zeroset", title="Zero data input", type = type(0.0)) self.boolIn = self.addLiteralInput(identifier="bool", title="Boolean input", type = type(False), allowedValues = [True, False]) self.intOut = self.addLiteralOutput(identifier="int", title="Integer data out") self.stringOut = self.addLiteralOutput(identifier="string", title="String data out", type = type("")) self.floatOut = self.addLiteralOutput(identifier="float", title="Float data out", type = type(0.0)) self.boolOut = self.addLiteralOutput(identifier="bool", title="Boolean data out", type = type(False))
def __init__(self): WPSProcess.__init__(self, identifier = 'v.overlay', title = 'Overlays two vector maps.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'geometry'}, {'type': 'simple', 'title': 'spatial query'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.overlay.html') # Literal and complex inputs self.addComplexInput(identifier = 'ainput', title = 'Name of input vector map (A)', abstract = 'Or data source for direct OGR access', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'alayer', title = 'Layer number or name (vector map A)', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1") self.addLiteralInput(identifier = 'atype', title = 'Feature type (vector map A)', abstract = 'Feature type', minOccurs = 0, maxOccurs = 1024, type = type("string"), default = "area", allowedValues = ['line', 'area']) self.addComplexInput(identifier = 'binput', title = 'Name of input vector map (B)', abstract = 'Or data source for direct OGR access', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'blayer', title = 'Layer number or name (vector map B)', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1") self.addLiteralInput(identifier = 'btype', title = 'Feature type (vector map B)', abstract = 'Feature type', minOccurs = 0, maxOccurs = 1024, type = type("string"), default = "area", allowedValues = ['area']) self.addLiteralInput(identifier = 'operator', title = 'Operator defines features written to output vector map', abstract = 'Feature is written to output if the result of operation ainput operator binput is true. Input feature is considered to be true, if category of given layer is defined.', minOccurs = 1, maxOccurs = 1, type = type("string"), allowedValues = ['and', 'or', 'not', 'xor']) self.addLiteralInput(identifier = 'olayer', title = 'Output layer for new category, ainput and binput', abstract = 'If 0 or not given, the category is not written', minOccurs = 0, maxOccurs = 1024, type = type("string"), default = "1,0,0") self.addLiteralInput(identifier = 'snap', title = 'Snapping threshold for boundaries', abstract = 'Disable snapping with snap <= 0', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1e-08) self.addLiteralInput(identifier = '-t', title = 'Do not create attribute table', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output vector map', formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}])
def __init__(self): WPSProcess.__init__(self, identifier = 'r.sun', title = 'Computes direct (beam), diffuse and reflected solar irradiation raster maps for given day, latitude, surface and atmospheric conditions. Solar parameters (e.g. sunrise, sunset times, declination, extraterrestrial irradiance, daylight length) are saved in the map history file. Alternatively, a local time can be specified to compute solar incidence angle and/or irradiance raster maps. The shadowing effect of the topography is optionally incorporated.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'solar'}, {'type': 'simple', 'title': 'sun energy'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/r.sun.html') # Literal and complex inputs self.addComplexInput(identifier = 'elev_in', title = 'Name of the input elevation raster map [meters]', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'asp_in', title = 'Name of the input aspect map (terrain aspect or azimuth of the solar panel) [decimal degrees]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'aspect', title = 'A single value of the orientation (aspect), 270 is south', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 270.0) self.addComplexInput(identifier = 'slope_in', title = 'Name of the input slope raster map (terrain slope or solar panel inclination) [decimal degrees]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'slope', title = 'A single value of inclination (slope)', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.0) self.addComplexInput(identifier = 'linke_in', title = 'Name of the Linke atmospheric turbidity coefficient input raster map [-]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'lin', title = 'A single value of the Linke atmospheric turbidity coefficient [-]', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 3.0) self.addComplexInput(identifier = 'albedo', title = 'Name of the ground albedo coefficient input raster map [-]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'alb', title = 'A single value of the ground albedo coefficient [-]', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.2) self.addComplexInput(identifier = 'lat_in', title = 'Name of input raster map containing latitudes [decimal degrees]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'long_in', title = 'Name of input raster map containing longitudes [decimal degrees]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'coef_bh', title = 'Name of real-sky beam radiation coefficient (thick cloud) input raster map [0-1]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'coef_dh', title = 'Name of real-sky diffuse radiation coefficient (haze) input raster map [0-1]', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexInput(identifier = 'horizon', title = 'The horizon information input map prefix', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'horizon_step', title = 'Angle step size for multidirectional horizon [degrees]', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'day', title = 'No. of day of the year (1-365)', minOccurs = 1, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'step', title = 'Time step when computing all-day radiation sums [decimal hours]', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.5) self.addLiteralInput(identifier = 'declination', title = 'Declination value (overriding the internally computed value) [radians]', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'time', title = 'Local (solar) time (to be set for mode 1 only) [decimal hours]', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'distance_step', title = 'Sampling distance step coefficient (0.5-1.5)', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1.0) self.addLiteralInput(identifier = 'num_partitions', title = 'Read the input files in this number of chunks', minOccurs = 0, maxOccurs = 1, type = type(0), default = 1) self.addLiteralInput(identifier = 'civil_time', title = 'Civil time zone value, if none, the time will be local solar time', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = '-p', title = 'Do not incorporate the shadowing effect of terrain', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-m', title = 'Use the low-memory version of the program', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'incidout', title = 'Output incidence angle raster map (mode 1 only)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'beam_rad', title = 'Output beam irradiance [W.m-2] (mode 1) or irradiation raster map [Wh.m-2.day-1] (mode 2)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'diff_rad', title = 'Output diffuse irradiance [W.m-2] (mode 1) or irradiation raster map [Wh.m-2.day-1] (mode 2)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'refl_rad', title = 'Output ground reflected irradiance [W.m-2] (mode 1) or irradiation raster map [Wh.m-2.day-1] (mode 2)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'glob_rad', title = 'Output global (total) irradiance/irradiation [W.m-2] (mode 1) or irradiance/irradiation raster map [Wh.m-2.day-1] (mode 2)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'insol_time', title = 'Output insolation time raster map [h] (mode 2 only)', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self): WPSProcess.__init__( self, identifier="anomaly", title="***---*** Anomaly Computation ***---***", version="1", storeSupported="true", statusSupported="false", abstract= "This service provide access to compute the absolute or standardized anomaly including exponentially-weighted moving average" ) #self.input = self.addLiteralInput(identifier = "input_ts", # title = "Input time series to reconstruct", # type = FloatType) self.sign1 = self.addComplexInput( identifier="AnomalyInputNDVI", title="Input time series NDVI anomaly", formats=[{ 'mimeType': 'text/xml' }]) self.windo = self.addLiteralInput( identifier="AnomalyWindowSize", title="Window size for exp. weighted moving average") self.stand = self.addLiteralInput( identifier="AnomalyStandardization", title="Compute absolute or standardized anomaly") self.resu1 = self.addComplexOutput( identifier="AnomalyNDVI", title="Output NDVI anomaly data", formats=[{ 'mimeType': 'text/xml' }]) #xml/application ||application/json self.resu2 = self.addComplexOutput( identifier="AnomalyNDVI_ewma", title="Output NDVI anomaly expx. weighted moving average", formats=[{ 'mimeType': 'text/xml' }]) #xml/application ||application/json
def __init__(self): WPSProcess.__init__(self, identifier="complexprocessows", title="Complex process", storeSupported=True) self.vectorin = self.addComplexInput(identifier="vectorin", title="Vector file", formats=[{ "mimeType": "application/xml" }]) self.rasterin = self.addComplexInput(identifier="rasterin", title="Raster file", formats=[{ "mimeType": "image/tiff" }]) self.pausein = self.addLiteralInput( identifier="pause", title="Pause the process", abstract= "Pause the process for several seconds, so that status=true can be tested", default=False, type=type(True)) self.vectorout = self.addComplexOutput(identifier="vectorout", title="Vector file", formats=[{ "mimeType": "application/xml" }], useMapscript=True) self.rasterout = self.addComplexOutput(identifier="rasterout", title="Raster file", formats=[{ "mimeType": "image/tiff" }], useMapscript=True)
def __init__(self): WPSProcess.__init__(self, identifier = 'v.drape', title = 'Converts 2D vector features to 3D by sampling of elevation raster map.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'geometry'}, {'type': 'simple', 'title': 'sampling'}, {'type': 'simple', 'title': '3D'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.drape.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of input vector map', abstract = 'Or data source for direct OGR access', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'layer', title = 'Layer number or name (-1 for all layers)', abstract = 'A single vector map can be connected to multiple database tables. This number determines which table to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "-1") self.addLiteralInput(identifier = 'cats', title = 'Category values', abstract = 'Example: 1,3,7-9,13', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'where', title = 'WHERE conditions of SQL statement without where keyword', abstract = 'Example: income < 1000 and inhab >= 10000', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'type', title = 'Feature type', minOccurs = 0, maxOccurs = 1024, type = type("string"), default = "point,line,boundary,centroid", allowedValues = ['point', 'line', 'boundary', 'centroid']) self.addComplexInput(identifier = 'elevation', title = 'Elevation raster map for height extraction', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'image/png'}, {'mimeType': 'image/gif'}, {'mimeType': 'image/jpeg'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addLiteralInput(identifier = 'method', title = 'Sampling interpolation method', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "nearest", allowedValues = ['nearest', 'linear', 'cubic']) self.addLiteralInput(identifier = 'scale', title = 'Scale factor sampled raster values', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1.0) self.addLiteralInput(identifier = 'null_value', title = 'Height for sampled raster NULL values', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_band_number', title = 'Band to select for processing (default is all bands)', abstract = 'This parameter defines band number of the input raster files which should be processed. As default all bands are processed and used as single and multiple inputs for raster modules.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output vector map', formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}])
def __init__(self): WPSProcess.__init__(self, identifier = 'v.net.timetable', title = 'Finds shortest path using timetables.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'network'}, {'type': 'simple', 'title': 'shortest path'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.net.timetable.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of input vector map', abstract = 'Or data source for direct OGR access', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'layer', title = 'Layer number or name', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1") self.addLiteralInput(identifier = 'alayer', title = 'Arc layer', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1") self.addLiteralInput(identifier = 'nlayer', title = 'Node layer', abstract = 'Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "2") self.addLiteralInput(identifier = 'afcolumn', title = 'Arc forward/both direction(s) cost column (number)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'abcolumn', title = 'Arc backward direction cost column (number)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'ncolumn', title = 'Node cost column (number)', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'walk_layer', title = 'Layer number or name with walking connections or -1', abstract = 'A single vector map can be connected to multiple database tables. This number determines which table to use. When used with direct OGR access this is the layer name.', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "-1") self.addLiteralInput(identifier = 'route_id', title = 'Name of column with route ids', minOccurs = 1, maxOccurs = 1, type = type("string"), default = "route_id") self.addLiteralInput(identifier = 'stop_time', title = 'Name of column with stop timestamps', minOccurs = 1, maxOccurs = 1, type = type("string"), default = "stop_time") self.addLiteralInput(identifier = 'to_stop', title = 'Name of column with stop ids', minOccurs = 1, maxOccurs = 1, type = type("string"), default = "to_stop") self.addLiteralInput(identifier = 'walk_length', title = 'Name of column with walk lengths', minOccurs = 1, maxOccurs = 1, type = type("string"), default = "length") # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output vector map', formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}])
def __init__(self): WPSProcess.__init__(self, identifier = 'v.krige', title = 'Performs ordinary or block kriging for vector maps.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'interpolation'}, {'type': 'simple', 'title': 'raster'}, {'type': 'simple', 'title': 'kriging'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.krige.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of input vector map', abstract = 'Name of point vector map containing sample data', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/3.1.1/base/gml.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/xml', 'schema': 'http://schemas.opengis.net/gml/2.1.2/feature.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'text/xml', 'schema': 'http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd', 'encoding': 'UTF-8'}, {'mimeType': 'application/dgn', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/shp', 'schema': 'None', 'encoding': 'None'}, {'mimeType': 'application/x-zipped-shp', 'schema': 'None', 'encoding': 'None'}]) self.addLiteralInput(identifier = 'column', title = 'Name of attribute column with numerical value to be interpolated', minOccurs = 1, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'package', title = 'R package to use', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "gstat", allowedValues = ['gstat']) self.addLiteralInput(identifier = 'model', title = 'Variogram model(s)', abstract = 'Leave empty to test all models (requires automap)', minOccurs = 0, maxOccurs = 1024, type = type("string"), allowedValues = ['Nug', 'Exp', 'Sph', 'Gau', 'Exc', 'Mat', 'Ste', 'Cir', 'Lin', 'Bes', 'Pen', 'Per', 'Hol', 'Log', 'Pow', 'Spl', 'Leg', 'Err', 'Int']) self.addLiteralInput(identifier = 'block', title = 'Block size (square block)', abstract = 'Block size. Used by block kriging.', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'range', title = 'Range value', abstract = 'Automatically fixed if not set', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'nugget', title = 'Nugget value', abstract = 'Automatically fixed if not set', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'sill', title = 'Sill value', abstract = 'Automatically fixed if not set', minOccurs = 0, maxOccurs = 1, type = type(0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name for output raster map', abstract = 'If omitted, will be <input name>_kriging', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}]) self.addComplexOutput(identifier = 'output_var', title = 'Name for output variance raster map', abstract = 'If omitted, will be <input name>_kriging.var', formats = [{'mimeType': 'image/tiff'}, {'mimeType': 'image/geotiff'}, {'mimeType': 'application/geotiff'}, {'mimeType': 'application/x-geotiff'}, {'mimeType': 'application/x-erdas-hfa'}, {'mimeType': 'application/netcdf'}, {'mimeType': 'application/x-netcdf'}])
def __init__(self): ## # Process initialization WPSProcess.__init__( self, identifier="WPS_PRECIP_DI_CAL_TS", title="Compute PAP TIMESERIES", abstract="""Module to compute PAP TimeSeries based on GPCP data""", version="1.0", storeSupported=True, statusSupported=True) ## # Adding process inputs self.lonIn = self.addLiteralInput(identifier="pap_lon", title="Longitude", type=type('')) self.latIn = self.addLiteralInput(identifier="pap_lat", title="Latitude", type=type('')) self.fromDateIn = self.addLiteralInput( identifier="from_date", title="The start date to be calcualted", type=type('')) self.toDateIn = self.addLiteralInput( identifier="to_date", title="The final date to be calcualted", type=type('')) ## # Adding process outputs self.papOut = self.addComplexOutput( identifier="pap_ts", title="Pap Timeseries", formats=[{ 'mimeType': 'text/xml' }]) #xml/application ||application/json
def __init__(self): # init process WPSProcess.__init__( self, identifier="esmvaltool-clouds", # the same as the file name version="1.0", title="Clouds Diagnostics", storeSupported="True", statusSupported="True", abstract= "Create Cloud diagnostics using ESMValTool (takes about 2 minutes).", grassLocation=False) self.startYear = self.addLiteralInput( identifier="startYear", title="First year data used in plot", type="Integer", default=2003, minOccurs=1, maxOccurs=1) self.endYear = self.addLiteralInput( identifier="endYear", title="Last year data used in plot", type="Integer", default=2005, minOccurs=1, maxOccurs=1) # self.opendapURL = self.addLiteralOutput(identifier="opendapURL", # title="opendapURL", # type="String", ) self.plots = [] for i in range(0, 8): self.plots.append( self.addComplexOutput(identifier="plot%d" % i, title="Plot", formats=[{ "mimeType": "image/png" }]))
def __init__(self): WPSProcess.__init__(self, identifier = "subset_points", title="Subset Points", version = "0.9", metadata= [ {"title": "LSCE", "href": "http://www.lsce.ipsl.fr/en/index.php"}, {"title": "Documentation", "href": "http://flyingpigeon.readthedocs.io/en/latest/"}, ], abstract="Extract timeseries for specified coordinates from gridded datasets", statusSupported=True, storeSupported=True ) self.netcdf_file = self.addComplexInput( identifier="netcdf_file", title="NetCDF File", abstract="NetCDF File", minOccurs=1, maxOccurs=1000, maxmegabites=5000, formats=[{"mimeType":"application/x-netcdf"}], ) self.coords = self.addLiteralInput( identifier="coords", title="Coordinates", abstract="a comma-seperated tuple of WGS85 lon,lat decimal coordinates", default="2.356138, 48.846450", type=type(''), minOccurs=1, maxOccurs=100, ) self.tarout = self.addComplexOutput( identifier="tarout", title="Tarfile", abstract="tar archive containing the value tables", formats=[{"mimeType":"application/x-tar"}], asReference=True, )
def __init__(self): WPSProcess.__init__(self, identifier = "nomimetypesprocess", title="Complex process without mimetypes", storeSupported=True) self.vectorin = self.addComplexInput(identifier="vectorin", title="Vector file") self.rasterin = self.addComplexInput(identifier="rasterin", title="Raster file") self.pausein = self.addLiteralInput(identifier="pause", title="Pause the process", abstract="Pause the process for several seconds, so that status=true can be tested", default = False, type = type(True)) self.vectorout = self.addComplexOutput(identifier="vectorout", title="Vector file") self.rasterout = self.addComplexOutput(identifier="rasterout", title="Raster file")
def __init__(self): ## # Process initialization WPSProcess.__init__( self, identifier="WPS_PRECIP_DI_CAL", title="Precipitation based Drought Index", abstract= """This process intend to Calculate precipitation based drought index.""", version="1.0", storeSupported=True, statusSupported=True) ## # Adding process inputs self.boxIn = self.addBBoxInput(identifier="bbox", title="Spatial region") self.dateIn = self.addLiteralInput(identifier="date", title="The date to be calcualted", type=type('')) ## # Adding process outputs self.dataOut = self.addComplexOutput( identifier="map", title="Output PAP image", useMapscript=True, formats=[ { 'mimeType': 'image/tiff' }, { 'mimeType': 'image/png' } # ADDED: 07-08-2015 CHECK IF IT RESOLVE ISSUE ])
def __init__(self): WPSProcess.__init__( self, identifier="referencedefault", title= "Returns ouputs as references, unless defined by the user in the request", storeSupported=True, statusSupported=True) self.vectorOut = self.addComplexOutput(identifier="vectorout", title="Vector file", formats=[{ "mimeType": "application/xml" }], asReference=True) self.stringOut = self.addLiteralOutput(identifier="string", title="String data out", type=type(""), asReference=True) self.bboxOut = self.addBBoxOutput(identifier="bboxout", title="BBox out", asReference=True)
def __init__(self): WPSProcess.__init__(self, identifier = "impact_query", # must be same, as filename title="Impact Query WPS", version = "0.1", storeSupported = "true", statusSupported = "true", abstract="Returns json dump of values of the performed query.") self.indata = self.addComplexInput(identifier = "indata", maxmegabites=20, title = "Input data values as query in JSON format", formats = [ {'mimeType': 'text/plain', 'encoding': 'UTF-8'}, {'mimeType': 'application/json'} ]) self.outjson = self.addComplexOutput(identifier="outjson", title="Output result in JSON format", abstract="""Query results returned per row""", formats=[{"mimeType": "text/plain"}, # 1st is default {'mimeType': "application/json"}])
def __init__(self): # init process WPSProcess.__init__(self, identifier = "dummyprocess", # must be same, as filename title="Dummy Process", version = "1.0", storeSupported = "true", statusSupported = "true", abstract="The Dummy process is used for testing the WPS structure. The process will accept 2 input numbers and will return the XML result with an add one and subtract one operation", grassLocation =False) self.Input1 = self.addLiteralInput(identifier = "input1", title = "Input1 number", type=types.IntType, default="100") self.Input2= self.addLiteralInput(identifier="input2", title="Input2 number", type=types.IntType, default="200") self.Output1=self.addLiteralOutput(identifier="output1", title="Output1 add 1 result") self.Output2=self.addLiteralOutput(identifier="output2",title="Output2 subtract 1 result" )
def __init__(self): ## # Process initialization WPSProcess.__init__( self, identifier="WPS_VCI_CAL3", title="VCI calculation process", abstract= """This process intend to calculate the Vegetation Condition index (VCI) for a specific area..""", version="1.0", storeSupported=True, statusSupported=True) ## # Adding process inputs self.boxIn = self.addBBoxInput(identifier="bbox", title="Spatial region") self.dateIn = self.addLiteralInput(identifier="date", title="The date to be calcualted", type=type('')) ## # Adding process outputs self.dataOut = self.addComplexOutput(identifier="image", title="Output VCI image", formats=[{ 'mimeType': 'image/png' }]) self.rowOut = self.addLiteralOutput(identifier="row", title="Output no. rows") self.colOut = self.addLiteralOutput(identifier="col", title="Output no. cols")
def __init__(self, identifier, version, title, abstract, hasOOI=True): # init process WPSProcess.__init__(self, identifier=identifier, version=version, title=title, storeSupported="false", statusSupported="false", abstract=abstract, grassLocation=False) self.ICMMworldstateURL = self.addLiteralInput( identifier="ICMMworldstateURL", type=type(""), title="ICMM WorldState id") self.indicatorRef = self.addLiteralOutput( identifier="ICMMindicatorValueURL", type=type(""), title="URL to access indicator value from ICMM") self.kpiRef = self.addLiteralOutput( identifier="ICMMkpiValueURL", type=type(""), title="URL to access indicator value from ICMM") self.indicator = self.addLiteralOutput(identifier="indicator", type=type(""), title="indicator value") self.kpi = self.addLiteralOutput(identifier="kpi", type=type(""), title="kpi value") self.statusmessage = self.addLiteralOutput(identifier="statusmessage", type=type(""), title="execution status") # for ICMM and OOI self.doUpdate = 1 # 1: recalculate existing indicator; 0: use existing value self.ICMMworldstate = None # Access-object for ICMM WorldState self.worldstateDescription = None # description of WorldState: ICMMname, ICMMdescription, ICMMworldstateURL, OOIworldstateURL self.hasOOI = hasOOI # Provide access to OOI self.OOIworldstate = None # Access-object for OOI-WSR WorldState self.result = None # to be filled from calcualteIndicators(self)
def __init__(self): WPSProcess.__init__( self, identifier="helloworld", title="Hello World", version = "1.2", metadata = [{"title":"Documentation","href":"http://emu.readthedocs.org/en/latest/"}], abstract="Welcome user and say hello ...", statusSupported=True, storeSupported=True ) self.user = self.addLiteralInput( identifier = "user", title = "Your name", abstract = "Please enter your name", type = type(''), ) self.output = self.addLiteralOutput( identifier = "output", title = "Welcome message", type = type(''))
def __init__(self): ## # Process initialization WPSProcess.__init__( self, identifier="WPS_METADATA_EXTERNAL", title="Metadata of the available coverage", abstract= """Module to get all metadata of the coverages included in the system""", version="1.0", storeSupported=True, statusSupported=True) ## # Adding process inputs ## ## # Adding process outputs self.gpcp_Out = self.addLiteralOutput(identifier="gpcp", title="metadata gpcp")
def __init__(self): # init process WPSProcess.__init__( self, identifier="ultimatequestionprocess", #the same as the file name title="Answer to Life, the Universe and Everything", version="2.1", abstract= "Numerical solution that is the answer to Life, Universe and Everything. The process is an improvement to Deep Tought computer (therefore version 2.0) since it no longer takes 7.5 milion years, but only a few seconds to give a response, with an update of status every 10 seconds.", statusSupported=True, storeSupported=True) self.delay = self.addLiteralInput( identifier="delay", title="Delay", abstract="Delay in Seconds. Default: 1 second.", default=1, type=(1), ) self.answer = self.addLiteralOutput( identifier="answer", title="The numerical answer to Life, Universe and Everything")
def __init__(self): ## # Process initialization WPSProcess.__init__( self, identifier="returner", title="Return process", abstract= """This is demonstration process of PyWPS, returns the same file, it gets on input, as the output.""", version="1.0", storeSupported=True, statusSupported=True) ## # Adding process inputs self.dataIn = self.addComplexInput(identifier="data", title="Input vector data", formats=[{ 'mimeType': 'text/xml' }]) self.textIn = self.addLiteralInput(identifier="text", title="Some width") ## # Adding process outputs self.dataOut = self.addComplexOutput(identifier="output", title="Output vector data", formats=[{ 'mimeType': 'text/xml' }]) self.textOut = self.addLiteralOutput(identifier="text", title="Output literal data")
def __init__(self): WPSProcess.__init__(self, identifier="simple_plot", title="Simple NetCDF Plotter", version="0.2", abstract="Simple NetCDF Plotter", statusSupported=True, storeSupported=True) self.dataset = self.addComplexInput( identifier="dataset", title="Dataset (NetCDF)", minOccurs=1, maxOccurs=1, maxmegabites=5000, formats=[{ "mimeType": "application/x-netcdf" }], ) # self.variable = self.addLiteralInput( # identifier="variable", # title="Variable", # abstract="Variable to plot", # type=type(''), # minOccurs=1, # maxOccurs=1, # ) self.output = self.addComplexOutput( identifier="output", title="Plot", formats=[{ "mimeType": "image/png" }], asReference=True, )
def __init__(self): WPSProcess.__init__( self, identifier="multiplesources", title="Multiple Sources", version = "0.3", abstract="Process with multiple different sources ...", statusSupported=True, storeSupported=True ) self.model_data = self.addComplexInput( identifier = "model", title = "Model data", abstract = "URL of NetCDF model data file", minOccurs=0, maxOccurs=100, formats=[{"mimeType":"application/netcdf"}], maxmegabites=100, ) self.obs_data = self.addComplexInput( identifier = "obs", title = "Observational data", abstract = "URL of NetCDF observational data file", minOccurs=0, maxOccurs=100, formats=[{"mimeType":"application/netcdf"}], maxmegabites=100, ) self.output = self.addComplexOutput( identifier = "output", title = "Model comparison result", formats=[{"mimeType":"text/plain"}], asReference=True, )
def __init__(self): WPSProcess.__init__( self, identifier="bundler", title="File Bundler", version="0.1", storeSupported="true", statusSupported="true", abstract= '''This process will accept a list of URIs and will return a link to a zip file containing them bundled together.''', grassLocation=False) # TODO: unicode type? String types? list type? self.inputfiles = self.addLiteralInput(identifier='inputfiles', title='Input URIs', type=types.StringType, minOccurs=1, maxOccurs=50) self.userid = self.addLiteralInput(identifier='userid', title='User ID', type=types.StringType, minOccurs=1, maxOccurs=1) self.useremail = self.addLiteralInput(identifier='useremail', title='User email', type=types.StringType, minOccurs=1, maxOccurs=1) self.useridout = self.addLiteralOutput(identifier="useridout", title="User ID return", type=types.StringType) self.useremailout = self.addLiteralOutput(identifier="useremailout", title="User email return", type=types.StringType)
def __init__(self): ## # Process initialization WPSProcess.__init__( self, identifier="gipong", title="gipong process", abstract= """This is demonstration process of PyWPS, convert geojson to kml.""", version="1.0", storeSupported=True, statusSupported=True) ## # Adding process inputs self.dataIn = self.addComplexInput(identifier="data", title="Input geojson data", formats=[{ 'mimeType': 'text/plain', 'encoding': 'iso-8859-2', 'schema': None }]) #self.textIn = self.addLiteralInput(identifier="text", # title = "Some width") ## # Adding process outputs self.dataOut = self.addComplexOutput(identifier="output", title="Output geojson data", formats=[{ 'mimeType': 'text/xml' }])
def __init__(self): WPSProcess.__init__(self, identifier = 't.rast.accumulate', title = 'Compute cyclic accumulations of a space time raster dataset', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'temporal'}, {'type': 'simple', 'title': 'accumulation'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/t.rast.accumulate.html') # Literal and complex inputs self.addComplexInput(identifier = 'input', title = 'Name of the input space time raster dataset', minOccurs = 1, maxOccurs = 1, formats = [{'mimeType': 'application/x-grass-strds-tar'}, {'mimeType': 'application/x-grass-strds-tar-gz'}, {'mimeType': 'application/x-grass-strds-tar-bzip'}]) self.addComplexInput(identifier = 'lower', title = 'Input space time raster dataset that defines the lower threshold, values lower this threshold are excluded from accumulation', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'application/x-grass-strds-tar'}, {'mimeType': 'application/x-grass-strds-tar-gz'}, {'mimeType': 'application/x-grass-strds-tar-bzip'}]) self.addComplexInput(identifier = 'upper', title = 'Input space time raster dataset that defines the upper threshold, values upper this threshold are excluded from accumulation', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'application/x-grass-strds-tar'}, {'mimeType': 'application/x-grass-strds-tar-gz'}, {'mimeType': 'application/x-grass-strds-tar-bzip'}]) self.addLiteralInput(identifier = 'start', title = 'The temporal starting point to begin the accumulation, eg 2001-01-01', minOccurs = 1, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'stop', title = 'The temporal date to stop the accumulation, eg 2009-01-01', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'cycle', title = 'The temporal cycle to restart the accumulation, eg 12 months', minOccurs = 1, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'offset', title = 'The temporal offset to the begin of the next cycle, eg 6 months', minOccurs = 0, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'granularity', title = 'The granularity for accumulation 1 day', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "1 day") self.addLiteralInput(identifier = 'basename', title = 'Base name of the new generated output maps"', abstract = 'A numerical suffix separated by an underscore will be attached to create a unique identifier', minOccurs = 1, maxOccurs = 1, type = type("string"), allowedValues = '*') self.addLiteralInput(identifier = 'limits', title = 'Use these limits in case lower and/or upper input space time raster datasets are not defined', minOccurs = 0, maxOccurs = 2, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'shift', title = 'Scale factor for input space time raster dataset', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'scale', title = 'Shift factor for input space time raster dataset', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'method', title = 'This method will be applied to compute the accumulative values from the input maps', minOccurs = 0, maxOccurs = 1, type = type("string"), default = "mean", allowedValues = ['mean', 'gdd', 'bedd', 'huglin']) self.addLiteralInput(identifier = '-n', title = 'Register empty maps in the output space time raster dataset, otherwise they will be deleted', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = '-r', title = 'Reverse time direction in cyclic accumulation', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False]) self.addLiteralInput(identifier = 'grass_resolution_ns', title = 'Resolution of the mapset in north-south direction in meters or degrees', abstract = 'This parameter defines the north-south resolution of the mapset in meter or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') self.addLiteralInput(identifier = 'grass_resolution_ew', title = 'Resolution of the mapset in east-west direction in meters or degrees', abstract = 'This parameter defines the east-west resolution of the mapset in meters or degrees, which should be used to process the input and output raster data. To enable this setting, you need to specify north-south and east-west resolution.', minOccurs = 0, maxOccurs = 1, type = type(0.0), allowedValues = '*') # complex outputs self.addComplexOutput(identifier = 'output', title = 'Name of the output space time raster dataset', formats = [{'mimeType': 'application/x-grass-strds-tar'}, {'mimeType': 'application/x-grass-strds-tar-gz'}, {'mimeType': 'application/x-grass-strds-tar-bzip'}])