From 1d960653b6996b5b22f77bf659b8a4843fc6341d Mon Sep 17 00:00:00 2001 From: Thomas Grandjean Date: Thu, 26 Sep 2024 20:10:17 +0200 Subject: [PATCH] Set pipeline configurations for dev environment --- cartiflette/pipeline_constants.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/cartiflette/pipeline_constants.py b/cartiflette/pipeline_constants.py index a3717f6..062249b 100644 --- a/cartiflette/pipeline_constants.py +++ b/cartiflette/pipeline_constants.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- +import os from cartiflette.config import DATASETS_HIGH_RESOLUTION # Keys for COG_TERRITOIRE and IRIS are True for high resolution and False for @@ -78,9 +79,15 @@ "POPULATION-COM": ["Insee", "POPULATION", "POPULATION-IRIS-COM"], } -PIPELINE_CRS = [2154, 4326, 3857] -PIPELINE_SIMPLIFICATION_LEVELS = [0, 40] -PIPELINE_FORMATS = ["geojson", "topojson", "gpkg"] +if os.environ.get("ENVIRONMENT", "dev") != "dev": + PIPELINE_CRS = [2154, 4326, 3857] + PIPELINE_SIMPLIFICATION_LEVELS = [100, 40] + PIPELINE_FORMATS = ["geojson", "topojson", "gpkg"] +else: + PIPELINE_CRS = [4326] + PIPELINE_SIMPLIFICATION_LEVELS = [40] + PIPELINE_FORMATS = ["topojson"] + # which dissolutions can be operated from a given raw geodataset, depending # of it's source (either from IRIS or from COMMUNES) @@ -233,7 +240,6 @@ for key, dissolutions in AVAILABLE_DISSOLUTIONS_FROM_RAW_MESH.items() for dissolution in dissolutions } -all_dissolutions = all_dissolutions all_borders = { split