Exemplo n.º 1
0
    def __init__(self):
        WPSProcess.__init__(self, identifier="bboxprocess",
                            title="BBox process")

        self.bboxin = self.addBBoxInput(identifier="bboxin", title="BBox in")
        self.bboxout = self.addBBoxOutput(
            identifier="bboxout", title="BBox out")
Exemplo n.º 2
0
    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,
            )
Exemplo n.º 3
0
  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'}])
Exemplo n.º 4
0
 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, 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()
Exemplo n.º 6
0
    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))
Exemplo n.º 7
0
    def __init__(self):
        ##
        # Process initialization
        WPSProcess.__init__(
            self,
            identifier="wordcount",
            title="Word Counter",
            abstract="""Counts words in text document.""",
        )

        ##
        # Adding process inputs

        self.text = self.addComplexInput(identifier="text",
                                         title="Text Document",
                                         formats=[{
                                             'mimeType': 'text/plain'
                                         }])

        ##
        # Adding process outputs

        self.output = self.addComplexOutput(identifier="output",
                                            title="Word count result")

        ##
        # Execution part of the process
        def execute(self):

            # count words and save result
            self.output.setValue(count_words(self.text.getValue()))

            return
  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'}])
Exemplo n.º 9
0
    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(''),
            )
Exemplo n.º 10
0
 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"}]
                                          )
Exemplo n.º 11
0
    def __init__(self):
        WPSProcess.__init__(self,
                            identifier="zonal_mean",
                            title="Zonal Mean",
                            version="0.4",
                            abstract="zonal mean in NetCDF File.",
                            statusSupported=True,
                            storeSupported=True)

        self.dataset = self.addComplexInput(
            identifier="dataset",
            title="Dataset (NetCDF)",
            minOccurs=1,
            maxOccurs=100,
            maxmegabites=5000,
            formats=[{
                "mimeType": "application/x-netcdf"
            }],
        )

        self.output = self.addComplexOutput(
            identifier="output",
            title="Output",
            abstract="Output",
            formats=[{
                "mimeType": "text/plain"
            }],
            asReference=True,
        )
Exemplo n.º 12
0
 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
Exemplo n.º 13
0
    def __init__(self):

        ##
        # Process initialization
        WPSProcess.__init__(
            self,
            identifier="mapserver_test",
            title="Test PyWPS Process MapServer",
            abstract=
            "Extensive test, whether it is possible to output WMS/WCS URL using MapServer",
            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=types.StringType,
                                           default='"2015-01-02"')
        ##
        # Adding process outputs
        self.outputMap = self.addComplexOutput(
            identifier="map",
            title="Resulting output map",
            useMapscript=True,
            formats=[
                #{"mimeType":"image/tiff"},
                {
                    "mimeType": "image/png"
                }
            ])
Exemplo n.º 14
0
  def __init__(self):
    WPSProcess.__init__(self, identifier = 'v.generalize', title = 'Performs vector based generalization.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'generalization'}, {'type': 'simple', 'title': 'simplification'}, {'type': 'simple', 'title': 'smoothing'}, {'type': 'simple', 'title': 'displacement'}, {'type': 'simple', 'title': 'network generalization'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.generalize.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 = 'type', title = 'Feature type', minOccurs = 0, maxOccurs = 1024, type = type("string"), default = "line,boundary,area", allowedValues = ['line', 'boundary', 'area'])
    self.addLiteralInput(identifier = 'method', title = 'Generalization algorithm', minOccurs = 1, maxOccurs = 1, type = type("string"), allowedValues = ['douglas', 'douglas_reduction', 'lang', 'reduction', 'reumann', 'boyle', 'sliding_averaging', 'distance_weighting', 'chaiken', 'hermite', 'snakes', 'network', 'displacement'])
    self.addLiteralInput(identifier = 'threshold', title = 'Maximal tolerance value', minOccurs = 1, maxOccurs = 1, type = type(0.0), allowedValues = '*')
    self.addLiteralInput(identifier = 'look_ahead', title = 'Look-ahead parameter', minOccurs = 0, maxOccurs = 1, type = type(0), default = 7)
    self.addLiteralInput(identifier = 'reduction', title = 'Percentage of the points in the output of douglas_reduction algorithm', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 50.0)
    self.addLiteralInput(identifier = 'slide', title = 'Slide of computed point toward the original point', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.5)
    self.addLiteralInput(identifier = 'angle_thresh', title = 'Minimum angle between two consecutive segments in Hermite method', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 3.0)
    self.addLiteralInput(identifier = 'degree_thresh', title = 'Degree threshold in network generalization', minOccurs = 0, maxOccurs = 1, type = type(0), default = 0)
    self.addLiteralInput(identifier = 'closeness_thresh', title = 'Closeness threshold in network generalization', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.0)
    self.addLiteralInput(identifier = 'betweeness_thresh', title = 'Betweeness threshold in network generalization', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 0.0)
    self.addLiteralInput(identifier = 'alpha', title = 'Snakes alpha parameter', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1.0)
    self.addLiteralInput(identifier = 'beta', title = 'Snakes beta parameter', minOccurs = 0, maxOccurs = 1, type = type(0.0), default = 1.0)
    self.addLiteralInput(identifier = 'iterations', title = 'Number of iterations', minOccurs = 0, maxOccurs = 1, type = type(0), 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 = '-l', title = 'Do not modify end points of lines forming a closed loop', minOccurs = 0, maxOccurs = 1, type = type(True), default = False, allowedValues = [True, False])
    self.addLiteralInput(identifier = '-t', title = 'Do not copy attributes', 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'}])
Exemplo n.º 15
0
 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"]
Exemplo n.º 16
0
 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):
          # 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):

        ##
        # Process initialization
        WPSProcess.__init__(
            self,
            identifier="WPS_GETHTML",
            title="Get HTML to be ingested into the drought monitoring viewer",
            abstract="Module to get list of all images as HTML",
            version="1.0",
            storeSupported=True,
            statusSupported=True)

        ##
        #        # Adding process inputs
        #        self.process_input = self.addLiteralInput(identifier="input",
        #                                                  title="Chinese Province",
        #                                                  type=type(''))
        ##
        # Adding process outputs

        self.flsHTML = self.addComplexOutput(
            identifier="filesHTML",
            title="HTML to be loaded into the viewer",
            formats=[{
                'mimeType': 'text/xml'
            }])
        self.slideID = self.addLiteralOutput(
            identifier="slideID",
            title="slideID of the most recent observation")
Exemplo n.º 19
0
    def __init__(self):

        ##
        # Process initialization
        WPSProcess.__init__(
            self,
            identifier="china_geojson",
            title="Extract GeoJSON boundary",
            abstract=
            "Extract and transform county data from OGC GeoPackage to GeoJSON for OL",
            version="1.0",
            storeSupported=True,
            statusSupported=True)
        ##
        # Adding process inputs

        self.NAME_1 = self.addLiteralInput(identifier="Province",
                                           title="Province",
                                           type=types.StringType)

        self.NAME_2 = self.addLiteralInput(identifier="Prefecture",
                                           title="Region",
                                           type=types.StringType)

        self.NAME_3 = self.addLiteralInput(identifier="County",
                                           title="County",
                                           type=types.StringType)
        ##
        # Adding process outputs
        self.GeoJSON = self.addComplexOutput(
            identifier="Bound_GeoJSON",
            title="Resulting Country Boundary",
            formats=[{
                "mimeType": "application/json"
            }])
Exemplo n.º 20
0
  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'}])
Exemplo n.º 21
0
    def __init__(self):

        ##
        # Process initialization
        WPSProcess.__init__(
            self,
            identifier="WPS_HANTS_RECON_BATCH",
            title="HANTS regional processing",
            abstract=
            """This process intend to reconstruct regional EO data-set using HANTS.""",
            version="1.0",
            storeSupported=True,
            statusSupported=True)

        ##
        # Adding process inputs

        self.settingIn = self.addLiteralInput(
            identifier="ps_xml",
            title="Parameter settings xml file",
            type=type(''))

        ##
        # Adding process outputs

        self.dataLinkOut = self.addLiteralOutput(identifier="result_dirlink",
                                                 title="Result files location",
                                                 type=type(''))
Exemplo n.º 22
0
    def __init__(self):

        ##
        # Process initialization
        WPSProcess.__init__(
            self,
            identifier="WPS_METADATA_INTERNAL",
            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.LST_MOD11C2005_Out = self.addLiteralOutput(
            identifier="LST_MOD11C2005", title="metadata LST_MOD11C2005")

        self.NDVI_MOD13C1005_Out = self.addLiteralOutput(
            identifier="NDVI_MOD13C1005", title="metadata NDVI_MOD13C1005")

        self.NDAI_1km_Out = self.addLiteralOutput(identifier="NDAI_1km",
                                                  title="metadata NDAI_1km")
Exemplo n.º 23
0
    def __init__(self):
        WPSProcess.__init__(
            self,
            identifier="complexVector",
            title="First Process",
            abstract="Get vector imput and return it to output",
            statusSupported=True,
            storeSupported=True)

        self.indata = self.addComplexInput(identifier="indata",
                                           title="Complex in",
                                           formats=[{
                                               "mimeType": "text/xml"
                                           }, {
                                               "mimeType":
                                               "application/xml"
                                           }],
                                           minOccurs=0,
                                           maxOccurs=1024)
        self.outdata = self.addComplexOutput(identifier="outdata",
                                             title="Complex out",
                                             formats=[{
                                                 "mimeType": "text/xml"
                                             }])
        self.outdata2 = self.addComplexOutput(identifier="outdata2",
                                              title="Complex out",
                                              formats=[{
                                                  "mimeType":
                                                  "application/xml"
                                              }])
    def __init__(self):

        ##
        # Process initialization
        WPSProcess.__init__(self,
            identifier = "WPS_METADATA",
            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.modis_13c1_cov_Out = self.addLiteralOutput(identifier="modis_13c1_cov",
                title="metadata modis_13c1_cov")

        self.modis_11c2_cov_Out = self.addLiteralOutput(identifier="modis_11c2_cov",
                title="metadata modis_11c2_cov")
        
        self.trmm_3b42_coverage_1_Out = self.addLiteralOutput(identifier="trmm_3b42_coverage_1",
                title="metadata trmm_3b42_coverage_1")
        
        self.gpcp_Out = self.addLiteralOutput(identifier="gpcp",
                title="metadata gpcp")        
Exemplo n.º 25
0
 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):
     # 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
Exemplo n.º 27
0
  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
        WPSProcess.__init__(self,
                            identifier="WPS_ORDER",
                            title="Compute the order",
                            abstract="""Module to order data""",
                            version="1.0",
                            storeSupported=True,
                            statusSupported=True)

        ##
        # Adding process inputs

        self.fromDateIn = self.addLiteralInput(
            identifier="from_date_order",
            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(''))

        self.bboxIn = self.addLiteralInput(identifier="bbox_order",
                                           title="spatial area",
                                           type=type(''))

        self.arrayIn = self.addLiteralInput(identifier="array_order",
                                            title="client selection",
                                            type=type(''))

        self.infoIn = self.addLiteralInput(identifier="info_order",
                                           title="client info",
                                           type=type(''))
    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)
Exemplo n.º 30
0
 def __init__(self):
     WPSProcess.__init__(self,
                         identifier="lineagereturn",
                         title="Dummy process with flags as InputOutput",
                         storeSupported=False,
                         statusSupported=False)
     self.vectorIn = self.addComplexInput(identifier="vectorin",
                                          title="Vector file",
                                          formats=[{
                                              "mimeType":
                                              "application/xml"
                                          }, {
                                              "mimeType": "text/xml"
                                          }],
                                          minOccurs=1,
                                          maxOccurs=1)
     self.rasterIn = self.addComplexInput(identifier="rasterin",
                                          title="Vector file",
                                          formats=[{
                                              "mimeType": "image/png"
                                          }, {
                                              "mimeType": "image/bmp"
                                          }],
                                          minOccurs=1,
                                          maxOccurs=1)
     self.bboxin = self.addBBoxInput(identifier="bboxin", title="BBox in")
Exemplo n.º 31
0
    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,
            )
Exemplo n.º 32
0
    def __init__(self):
        WPSProcess.__init__(self,
                            identifier="chomsky",
                            title="Chomsky text generator",
                            version="0.2",
                            abstract=" Generates a random chomsky text ...",
                            statusSupported=True,
                            storeSupported=True)

        self.times = self.addLiteralInput(
            identifier="times",
            title="Times",
            abstract="Number of sentences to generate.",
            default="5",
            type=type(1),
            minOccurs=0,
            maxOccurs=1,
        )

        self.output = self.addComplexOutput(
            identifier="output",
            title="Chomsky text",
            metadata=[],
            formats=[{
                "mimeType": "text/plain"
            }],
            asReference=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)
Exemplo n.º 34
0
    def __init__(self):

        # init process
        WPSProcess.__init__(self,
            identifier = "Renerfor_CDP_Report_browser",
            title="Renerfor_CDP_Report_browser",
            version = "0.1",
            storeSupported = "true",
            statusSupported = "true",
            abstract="RENERFOR CDP Report",
            grassLocation = "WGS84-UTM32N_32632")

        # PROCESS INPUT/OUTPUT

        # Input
        self.vectorbacino=self.addComplexInput(identifier="vectorbacino",
                                                 title="Shapefile bacino",
                                                 formats=[{'mimeType':'text/xml'}])
                                
        self.namebacino = self.addLiteralInput(identifier = "namebacino",
                                           title = "Nome dell bacino",
                                           type = StringType)

        #self.GRASSregionin= self.addLiteralInput(identifier="GRASSregionin",
        #                                   title="GRASS region extent (xmin,xmax,ymin,ymax). Leave blank to use min covering extent",
        #                                   type = StringType)
        # Output

        self.urlPDF=self.addLiteralOutput(identifier="urlPDF",
                                            title="url_Report_PDF",
                                            type= StringType)
Exemplo n.º 35
0
    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 )
Exemplo n.º 36
0
    def __init__(self):
        # init process
        WPSProcess.__init__(
            self,
            identifier="dummyprocess",  # must be same, as filename
            title="Dummy Process",
            version="0.1",
            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")
Exemplo n.º 37
0
    def __init__(self):
        WPSProcess.__init__(
            self,
            identifier="bbox",
            title="Bounding Box",
            version="0.1",
            metadata=[
                {
                    "title": "home",
                    "href": "http://emu.readthedocs.org/en/latest/index.html"
                },
            ],
            abstract="Testing BoundingBox Input/Output Parameter",
            statusSupported=True,
            storeSupported=True)

        self.bboxIn = self.addBBoxInput(
            identifier="bbox",
            title="Bounding Box",
            minOccurs=1,
            maxOccurs=1,
            crss=["EPSG:4326", "EPSG:3035"],
        )

        self.bboxOut = self.addBBoxOutput(
            identifier="bbox",
            title="Bounding Box",
            dimensions=2,
            crs="EPSG:4326",
            asReference=False,
        )
Exemplo n.º 38
0
  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()
Exemplo n.º 39
0
    def __init__(self):
        WPSProcess.__init__(self,
                            identifier="TiffToPNG",
                            title="TIFF to PNG",
                            version="1.0",
                            storeSupported=True,
                            statusSupported=True,
                            abstract="Conversion of a 3-band TIFF file to PNG",
                            grassLocation=True)

        self.inputTIFF = self.addComplexInput(identifier='input',
                                              maxmegabites=100,
                                              title="input image",
                                              minOccurs=1,
                                              maxOccurs=1,
                                              formats=[{
                                                  'mimeType': 'image/tiff'
                                              }, {
                                                  'mimeType':
                                                  'image/geotiff'
                                              }, {
                                                  'mimeType':
                                                  'application/geotiff'
                                              }, {
                                                  'mimeType':
                                                  'application/x-geotiff'
                                              }])
        self.outputPNG = self.addComplexOutput(identifier="output",
                                               title="output PNG",
                                               formats=[{
                                                   'mimeType': 'image/png'
                                               }])
    def __init__(self):
        # init process
        WPSProcess.__init__(self,
                            identifier = "scanCSVProcess", # must be same, as filename
                            title="Scan CSV process",
                            version = "0.1",
                            storeSupported = "true",
                            statusSupported = "true",
                            abstract=("The scan process accepts the relative path of a CSV file "
                                      "in the basket, as well as a relative path to the metadata "
                                      "description of the CSV file and a description of the process."
                                      "The result of the process is a meta data file that is"
                                      "of the same format as a CF NetCDF file."),
                            grassLocation =False)

        self.inputCSVPath = self.addLiteralInput(identifier = "inputCSVPath",
                                                 title = "The path/URL to the input CSV file which needs to be wrangled",
                                                 type="String")

        self.descCSVPath = self.addLiteralInput(identifier="descCSVPath",
                                                title="The path to the metadata describing the CSV file in JSON format",
                                                type="String")

        self.outputURL = self.addLiteralOutput(identifier="outputURL",
                                               title="The url to the output CSV file",
                                               type="String")
        self.percentComplete = 0
Exemplo n.º 41
0
    def __init__(self):
        WPSProcess.__init__(self,
                            identifier="wordcount",
                            title="Word Counter",
                            version="0.3",
                            abstract="Counts words in a given text ...",
                            statusSupported=True,
                            storeSupported=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,
        )
Exemplo n.º 42
0
  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):
     # 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
Exemplo n.º 44
0
    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="lon",
                    title="Longitude")

        self.latIn = self.addLiteralInput(identifier="lat",
                    title="Latitude")        

        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   
Exemplo n.º 45
0
    def __init__(self):
        WPSProcess.__init__(
            self,
            identifier="fetch",
            title="Download Resources",
            version="0.9",
            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,
        )
Exemplo n.º 46
0
    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"}])
Exemplo n.º 47
0
     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()
Exemplo n.º 48
0
    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)
Exemplo n.º 49
0
    def __init__(self):

        WPSProcess.__init__(
            self,
            identifier='costpath',
            version="1.0",
            title="Nalezeni optimalni trasy cesty",
            abstract=
            "Viz. http://training.gismentors.eu/grass-gis-zacatecnik/rastrova_data/analyza-nakladu.html",
            grassLocation='gismentors_pywps',
            storeSupported=True,
            statusSupported=True)

        self.start = self.addLiteralInput(identifier="start",
                                          title="Souradnice pocatku (X,Y)",
                                          type=types.StringType)

        self.end = self.addLiteralInput(identifier="end",
                                        title="Souradnice konce (X,Y)",
                                        type=types.StringType)

        self.output = self.addComplexOutput(
            identifier="output",
            title="Vysledna cesta ve formatu ESRI Shapefile",
            formats=[{
                "mimeType": "application/x-zipped-shp"
            }],
            asReference=True)

        self.output_file = 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()
Exemplo n.º 50
0
    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,
        )
Exemplo n.º 51
0
  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'}])
Exemplo n.º 52
0
  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'}])
Exemplo n.º 53
0
    def __init__(self):

        ##
        # Process initialization
        WPSProcess.__init__(self,
            identifier = "WPS_VCI_DI_CAL",
            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="map",
                title="Output VCI image",
                useMapscript= True,
                formats =  [{'mimeType':'image/tiff'}])
Exemplo n.º 54
0
    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")
Exemplo n.º 55
0
    def __init__(self):
        WPSProcess.__init__(self, identifier="bboxprocess3D",
                            title="BBox process", storeSupported=True, statusSupported=True)

        self.bboxin = self.addBBoxInput(identifier="bboxin", title="BBox in", crs=[
                                        'EPSG:5714'], dimensions=2)
        self.bboxout = self.addBBoxOutput(identifier="bboxout", title="BBox out", crs=[
                                          'EPSG:5714'], dimensions=2)
Exemplo n.º 56
0
    def __init__(self):
        WPSProcess.__init__(self, identifier="complexRaster",
                            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"}])
Exemplo n.º 57
0
    def __init__(self):
        # definition of this process
        WPSProcess.__init__(
            self,
            identifier="plot_timeseries",
            title="Plots -- timeseries",
            version="0.9",
            metadata=[
                    {"title": 'Plots timeseries'}
                    ],
            abstract="Outputs some timeseries of the file field means. Spaghetti and uncertainty plot",
            statusSupported=True,
            storeSupported=True
            )

        self.resource = self.addComplexInput(
            identifier="resource",
            title="NetCDF Files",
            abstract="NetCDF Files",
            minOccurs=1,
            maxOccurs=100,
            maxmegabites=5000,
            formats=[{"mimeType": "application/x-netcdf"}],
            )

        self.variableIn = self.addLiteralInput(
            identifier="variable",
            title="Variable",
            abstract="Variable to be expected in the input files (variable will be detected if not set)",
            default=None,
            type=type(''),
            minOccurs=0,
            maxOccurs=1,
            )

        self.plotout_spagetti = self.addComplexOutput(
            identifier="plotout_spagetti",
            title="Visualisation, Spaghetti plot",
            abstract="Visualisation of single variables as a spaghetti plot",
            formats=[{"mimeType": "image/png"}],
            asReference=True,
            )

        self.plotout_uncertainty = self.addComplexOutput(
            identifier="plotout_uncertainty",
            title="Visualisation, Uncertainty plot",
            abstract="Visualisation of single variables ensemble mean with uncertainty",
            formats=[{"mimeType": "image/png"}],
            asReference=True,
            )

        self.output_log = self.addComplexOutput(
            identifier="output_log",
            title="Logging information",
            abstract="Collected logs during process run.",
            formats=[{"mimeType": "text/plain"}],
            asReference=True,
        )
Exemplo n.º 58
0
  def __init__(self):
    WPSProcess.__init__(self, identifier = 'v.segment', title = 'Creates points/segments from input vector lines and positions.', version = 1, statusSupported = True, storeSupported = True, metadata = [{'type': 'simple', 'title': 'vector'}, {'type': 'simple', 'title': 'geometry'}], abstract = 'http://grass.osgeo.org/grass70/manuals/html70_user/v.segment.html')

    # Literal and complex inputs
    self.addComplexInput(identifier = 'input', title = 'Name of input vector lines 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 = 'file', title = 'Name of file containing segment rules', abstract = '- for standard input', minOccurs = 0, maxOccurs = 1, formats = [{'mimeType': 'text/plain'}])

    # 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'}])