-
Notifications
You must be signed in to change notification settings - Fork 0
/
pacific_ows.py
187 lines (187 loc) · 7.48 KB
/
pacific_ows.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
ows_cfg = {
"global": {
# Master config for all services and products.
"response_headers": {
"Access-Control-Allow-Origin": "*", # CORS header
},
"services": {
"wms": True,
"wcs": True,
"wmts": True,
},
"published_CRSs": {
"EPSG:3857": { # Web Mercator
"geographic": False,
"horizontal_coord": "x",
"vertical_coord": "y",
},
"EPSG:3577": { # GDA-94, Australian Albers. Not sure why, but it's required!
"geographic": False,
"horizontal_coord": "x",
"vertical_coord": "y",
},
"EPSG:4326": {"geographic": True, "vertical_coord_first": True}, # WGS-84
"EPSG:3832": { # Some Pacific projection
"geographic": False,
"horizontal_coord": "x",
"vertical_coord": "y",
},
},
"allowed_urls": [
"http://localhost:8000",
"https://ows-cached.staging.digitalearthpacific.io", # TODO: Remove
"https://ows.staging.digitalearthpacific.io",
"https://ows-uncached.staging.digitalearthpacific.io",
"https://ows.prod.digitalearthpacific.io",
"https://ows-uncached.prod.digitalearthpacific.io",
"https://ows.digitalearthpacific.org",
],
# Metadata to go straight into GetCapabilities documents
"title": "Digital Earth Pacific Web Services",
"abstract": """TODO...""",
"info_url": "",
"keywords": ["Digital Earth Pacific"],
"contact_info": {
"person": "TODO",
"organisation": "Digital Earth Pacific",
"position": "",
"address": {
"type": "postal",
"address": "TODO",
"city": "TODO",
"state": "TODO",
"postcode": "TODO",
"country": "New Caledonia",
},
"telephone": "TODO",
"fax": "",
"email": "TODO",
},
"fees": "",
"access_constraints": "TODO",
}, # END OF global SECTION
"wms": {
# Config for WMS service, for all products/layers
# "s3_aws_zone": "us-west-2",
"max_width": 512,
"max_height": 512,
# Allow the WMS/WMTS GetCapabilities responses to be cached for 1 hour
"caps_cache_maxage": 60 * 60,
}, # END OF wms SECTION
"wcs": {
# Config for WCS service, for all products/coverages
"default_geographic_CRS": "EPSG:4326",
"formats": {
"GeoTIFF": {
# "renderer": "datacube_ows.wcs_utils.get_tiff",
"renderers": {
"1": "datacube_ows.wcs1_utils.get_tiff",
"2": "datacube_ows.wcs2_utils.get_tiff",
},
"mime": "image/geotiff",
"extension": "tif",
"multi-time": False,
},
"netCDF": {
# "renderer": "datacube_ows.wcs_utils.get_netcdf",
"renderers": {
"1": "datacube_ows.wcs1_utils.get_netcdf",
"2": "datacube_ows.wcs2_utils.get_netcdf",
},
"mime": "application/x-netcdf",
"extension": "nc",
"multi-time": True,
},
},
"native_format": "GeoTIFF",
}, # END OF wcs SECTION
"layers": [
{
"title": "Digital Earth Pacific OWS",
"abstract": "TODO",
"layers": [
# Hierarchical list of layers
{
"title": "Earth Observation",
"abstract": """Earth Observation""",
"layers": [
{
"title": "Surface Reflectance",
"abstract": """Surface Reflectance""",
"layers": [
{
"include": "ows_config.surface_reflectance.ows_s2_cfg.layer",
"type": "python",
},
# {
# "include": "ows_config.surface_reflectance.ows_landsat_cfg.layer_ls5",
# "type": "python",
# },
# {
# "include": "ows_config.surface_reflectance.ows_landsat_cfg.layer_ls7",
# "type": "python",
# },
# {
# "include": "ows_config.surface_reflectance.ows_landsat_cfg.layer_ls8",
# "type": "python",
# },
# {
# "include": "ows_config.surface_reflectance.ows_landsat_cfg.layer_ls9",
# "type": "python",
# },
],
},
# {
# "title": "Radar backscatter",
# "abstract": """Radar backscatter""",
# "layers": [
# {
# "include": "ows_config.radar_backscatter.ows_s1_cfg.layer",
# "type": "python",
# },
# ],
# },
{
"title": "Annual Summary Products",
"abstract": """Annual Summary Products""",
"layers": [
# {
# "include": "ows_config.surface_reflectance.ows_landsat_cfg.dep_ls_geomad",
# "type": "python",
# },
{
"include": "ows_config.surface_reflectance.ows_s2_cfg.dep_s2_geomad",
"type": "python",
},
# {
# "include": "ows_config.radar_backscatter.ows_s1_mosaic_cfg.layer",
# "type": "python",
# },
],
},
],
},
# {
# "title": "Elevation",
# "abstract": """Digital elevation model""",
# "layers": [
# {
# "include": "ows_config.elevation.ows_nasadem_cfg.layer",
# "type": "python",
# },
# ],
# },
# {
# "title": "Land Cover",
# "abstract": """Land Cover""",
# "layers": [
# {
# "include": "ows_config.land_cover.ows_landcover.dep_s2s1_mrd_layer",
# "type": "python",
# },
# ],
# },
],
}
],
}