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