image_service_register.py
1.1 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# coding=utf-8
#author: 4N
#createtime: 2021/7/19
#email: nheweijun@sina.com
from osgeo.ogr import *
from osgeo import gdal,ogr,osr
from osgeo.gdal import Dataset,Band
from app.util.component.ApiTemplate import ApiTemplate
import uuid
class Api(ApiTemplate):
api_name = "注册影像服务"
def process(self):
# 返回结果
res = {}
try:
guids = self.para.get("guids").split(",")
name = self.para.get("name")
service_guid = uuid.uuid1().__str__()
except Exception as e:
raise e
return res
api_doc = {
"tags": ["影像接口"],
"parameters": [
{"name": "guids",
"in": "formData",
"type": "string",
"description": "影像guids,以英文逗号相隔"}
],
"responses": {
200: {
"schema": {
"properties": {
}
}
}
}
}