diff options
| author | Guilhem Moulin <guilhem@fripost.org> | 2024-06-08 00:52:54 +0200 |
|---|---|---|
| committer | Guilhem Moulin <guilhem@fripost.org> | 2024-06-08 00:57:03 +0200 |
| commit | b29079ab12087f3fdd1cbbd209e205f205aaf267 (patch) | |
| tree | a4ed7e78f377b52545552d2cc1f2bb39aebb03d5 | |
| parent | 7de8d3ae12486c5ea06557414047e7e37a2a391a (diff) | |
load_config(): Fail if an extent is set while no SRS is.
The configured extent is always relative to the configured SRS.
| -rw-r--r-- | common.py | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -135,6 +135,14 @@ def load_config(path=None, groupnames=None): layers = { name: layers[name] for name in layernames } config['layers'] = layers + + extent = config.get('extent', None) + if extent is not None: + if isinstance(extent, list): + config['extent'] = tuple(extent) + if config.get('SRS', None) is None: + raise Exception('Configured extent without SRS') + sys.modules[__name__].config = config def format_bytes(n): |
