Package geobricks_modis :: Package config :: Module modis_config
[hide private]
[frames] | no frames]

Source Code for Module geobricks_modis.config.modis_config

  1  config = { 
  2      "version": "1.0", 
  3      "source": { 
  4          "type": "FTP", 
  5          "ftp": { 
  6              "base_url": "ladsweb.nascom.nasa.gov", 
  7              "data_dir": "/allData/5/" 
  8          } 
  9      }, 
 10      "target": { 
 11          "target_dir": "/home/kalimaha/Desktop/MODIS", 
 12          "folders": [ 
 13              { 
 14                  "folder_name": "{{product}}", 
 15                  "folders": [ 
 16                      { 
 17                          "folder_name": "{{year}}", 
 18                          "folders": [ 
 19                              { 
 20                                  "folder_name": "{{day}}" 
 21                              } 
 22                          ] 
 23                      } 
 24                  ] 
 25              } 
 26          ] 
 27      }, 
 28      "bands": [ 
 29          { 
 30              "index": 1, 
 31              "label": "NDVI" 
 32          }, 
 33          { 
 34              "index": 2, 
 35              "label": "EVI" 
 36          } 
 37      ], 
 38      "subfolders": { 
 39          "output": "OUTPUT" 
 40      }, 
 41      "processing": [ 
 42          { 
 43              "band": 1, 
 44              "process": [ 
 45                  { 
 46                      "extract_bands": "" 
 47                  } 
 48              ] 
 49          }, 
 50          { 
 51              "band": 1, 
 52              "output_file_name": "merge", 
 53              "process": [ 
 54                  { 
 55                      "gdal_merge": { 
 56                          "prefix": "gdal_merge_", 
 57                          "extension": "tif" 
 58                      } 
 59                  } 
 60              ] 
 61          }, 
 62          { 
 63              "band": 1, 
 64              "output_file_name": "final", 
 65              "process": [ 
 66                  { 
 67                      "get_pixel_size" : "{{PIXEL_SIZE}}" 
 68                  }, 
 69                  { 
 70                      "gdalwarp": { 
 71                          "opt": { 
 72                              "-multi": "", 
 73                              "-overwrite": "", 
 74                              "-of": "GTiff", 
 75                              "-s_srs": "'+proj=sinu +R=6371007.181 +nadgrids=@null +wktext'", 
 76                              "-co": "'TILED=YES'", 
 77                              "-t_srs": "EPSG:3857", 
 78                              "-srcnodata": -3000, 
 79                              "-dstnodata": -3000 
 80                          }, 
 81                          "prefix": "gdalwarp_", 
 82                          "extension": "tif" 
 83                      } 
 84                  } 
 85              ] 
 86          }, 
 87          { 
 88              "band": 1, 
 89              "process": [ 
 90                  { 
 91                      "gdaladdo": { 
 92                          "parameters": { 
 93                              "-r": "average" 
 94                          }, 
 95                          "overviews_levels": "2 4 8 16" 
 96                      } 
 97                  } 
 98              ] 
 99          } 
100      ], 
101      "analysis": { 
102          "create_avg": True, 
103          "create_da": True, 
104          "stats": { 
105              "enable": True, 
106              "scripts": [ 
107                  { 
108                      "file": "sadc.json", 
109                      "description": { 
110                          "en": "SADC" 
111                      } 
112                  } 
113              ] 
114          } 
115      }, 
116      "services_base_url": "http://168.202.28.57:5005/browse/", 
117      "services": { 
118          "layers": { 
119              "id": "list_layers", 
120              "path": "modis/{product}/{year}/{day}", 
121              "parameters": [ 
122                  { 
123                      "parameter_name": "product", 
124                      "parameter_value": "list_products" 
125                  }, 
126                  { 
127                      "parameter_name": "year", 
128                      "parameter_value": "list_years_from" 
129                  }, 
130                  { 
131                      "parameter_name": "day", 
132                      "parameter_value": "$create_day_of_the_year" 
133                  } 
134              ], 
135              "payload": { 
136                  "fields": ["code", "label", "size"], 
137                  "id": "code", 
138                  "label": "label" 
139              }, 
140              "description": { 
141                  "en": "Available Layers", 
142                  "it": "Layers Disponibili", 
143                  "pt": "Layers Disponiveis" 
144              }, 
145              "selection_type": "multiple" 
146          }, 
147          "download": { 
148              "__type": "standard", 
149              "payload": { 
150                  "filesystem_structure": { 
151                      "type": "object", 
152                      "parameters": [ 
153                          { 
154                              "parameter_name": "product", 
155                              "parameter_value": "list_products" 
156                          }, 
157                          { 
158                              "parameter_name": "year", 
159                              "parameter_value": "list_years_from" 
160                          }, 
161                          { 
162                              "parameter_name": "day", 
163                              "parameter_value": "$create_day_of_the_year" 
164                          } 
165                      ] 
166                  }, 
167                  "file_paths_and_sizes": { 
168                      "type": "rest_response" 
169                  }, 
170                  "tab_id": { 
171                      "type": "string", 
172                      "parameters": [ 
173                          "tab_", 
174                          "$CURRENT_INDEX" 
175                      ] 
176                  } 
177              } 
178          }, 
179          "countries": { 
180              "id": "list_gaul2modis", 
181              "path": "modis/countries", 
182              "parameters": [], 
183              "payload": { 
184                  "fields": ["gaul_code", "gaul_label", "from_h", "to_h", "from_v", "to_v"], 
185                  "id": "gaul_code", 
186                  "label": "gaul_label" 
187              }, 
188              "description": { 
189                  "en": "Countries", 
190                  "it": "Paesi", 
191                  "pt": "Paises" 
192              }, 
193              "selection_type": "multiple" 
194          }, 
195          "time_range": { 
196              "year": "list_years_from", 
197              "from": "list_days_from", 
198              "to": "list_days_to", 
199              "step": 16 
200          }, 
201          "filters": [ 
202              { 
203                  "id": "list_products", 
204                  "path": "modis", 
205                  "parameters": [], 
206                  "payload": { 
207                      "fields": ["code", "label"], 
208                      "id": "code", 
209                      "label": "label" 
210                  }, 
211                  "description": { 
212                      "en": "Available Products", 
213                      "it": "Prodotti Disponibili", 
214                      "pt": "Produtos Disponiveis" 
215                  }, 
216                  "selection_type": "single", 
217                  "services": [ 
218                      { 
219                          "id": "list_years_from", 
220                          "path": "modis/{product}", 
221                          "parameters": [ 
222                              { 
223                                  "parameter_name": "product", 
224                                  "parameter_value": "list_products" 
225                              } 
226                          ], 
227                          "payload": { 
228                              "fields": ["code", "label"], 
229                              "id": "code", 
230                              "label": "label" 
231                          }, 
232                          "description": { 
233                              "en": "Available Years", 
234                              "it": "Anni Disponibili", 
235                              "pt": "Anos Disponiveis" 
236                          }, 
237                          "selection_type": "single", 
238                          "services": [ 
239                              { 
240                                  "id": "list_days_from", 
241                                  "path": "modis/{product}/{year}", 
242                                  "parameters": [ 
243                                      { 
244                                          "parameter_name": "product", 
245                                          "parameter_value": "list_products" 
246                                      }, 
247                                      { 
248                                          "parameter_name": "year", 
249                                          "parameter_value": "list_years_from" 
250                                      } 
251                                  ], 
252                                  "payload": { 
253                                      "fields": ["code", "label"], 
254                                      "id": "code", 
255                                      "label": "label" 
256                                  }, 
257                                  "description": { 
258                                      "en": "Available Days - From", 
259                                      "it": "Giorni Disponibili - Da", 
260                                      "pt": "Dias Disponiveis - Desde" 
261                                  }, 
262                                  "selection_type": "single" 
263                              }, 
264                              { 
265                                  "id": "list_days_to", 
266                                  "path": "modis/{product}/{year}", 
267                                  "parameters": [ 
268                                      { 
269                                          "parameter_name": "product", 
270                                          "parameter_value": "list_products" 
271                                      }, 
272                                      { 
273                                          "parameter_name": "year", 
274                                          "parameter_value": "list_years_from" 
275                                      } 
276                                  ], 
277                                  "payload": { 
278                                      "fields": ["code", "label"], 
279                                      "id": "code", 
280                                      "label": "label" 
281                                  }, 
282                                  "description": { 
283                                      "en": "Available Days - To", 
284                                      "it": "Giorni Disponibili - A", 
285                                      "pt": "Dias Disponiveis - Ate" 
286                                  }, 
287                                  "selection_type": "single" 
288                              } 
289                          ] 
290                      } 
291                  ] 
292              } 
293          ] 
294      } 
295  } 
296