From b29079ab12087f3fdd1cbbd209e205f205aaf267 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sat, 8 Jun 2024 00:52:54 +0200 Subject: load_config(): Fail if an extent is set while no SRS is. The configured extent is always relative to the configured SRS. --- common.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common.py b/common.py index b46840f..67ab208 100644 --- a/common.py +++ b/common.py @@ -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): -- cgit v1.2.3