-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathL0.py
32 lines (27 loc) · 1022 Bytes
/
L0.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from pywps import Format, ComplexOutput, Process, ComplexInput
from pywps.app.Common import Metadata
class L0(Process):
def __init__(self):
inputs = [
ComplexInput('crude', 'Crude Data', [Format('image/tiff; subtype=geotiff')])
]
outputs = [
ComplexOutput('RAW', 'RAW output', [Format('image/tiff; subtype=geotiff')])
]
super(L0, self).__init__(
self._handler,
identifier='L0',
version='0.1',
title='L0 Processor',
abstract='L0 Processor, which generates the RAW product',
profile='',
metadata=[Metadata('Level L0'), Metadata('Processor')],
inputs=inputs,
outputs=outputs,
store_supported=True,
status_supported=True
)
def _handler(self, request, response):
response.outputs['RAW'].file = request.inputs['crude'][0].file
response.outputs['RAW'].as_reference = True
return response