From 88092be0fbc4fc7bc829c7373a43dde6e8ad615c Mon Sep 17 00:00:00 2001 From: Sylvain Briat Date: Tue, 12 Mar 2024 08:26:44 +0100 Subject: [PATCH] fix proximity distance in metres instead of km --- .env.dist | 4 ++-- src/config/geography.config.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.dist b/.env.dist index c6e62f2..ccd848e 100644 --- a/.env.dist +++ b/.env.dist @@ -69,8 +69,8 @@ GEOCODER_MAX_RESULTS_PER_TYPE=5 GEOCODER_SANITIZE=true # consolidate results ? GEOCODER_CONSOLIDATE=true -# max distance in km between 2 points to consider a duplicate -GEOCODER_PROXIMITY=5 +# max distance in metres between 2 points to consider a duplicate +GEOCODER_PROXIMITY=5000 # population vs distance prioritizer coef # "boost" population weight for results with a short distance # => multiply the population by COEF / distance (in km) diff --git a/src/config/geography.config.ts b/src/config/geography.config.ts index fdb8647..f1fafca 100644 --- a/src/config/geography.config.ts +++ b/src/config/geography.config.ts @@ -43,7 +43,7 @@ export default registerAs('geography', () => ({ : true, geocoderProximity: process.env.GEOCODER_PROXIMITY ? parseInt(process.env.GEOCODER_PROXIMITY) - : 5, + : 5000, geocoderPopulationPrioritizerCoef: process.env .GEOCODER_POPULATION_PRIORITIZER_COEF ? parseInt(process.env.GEOCODER_POPULATION_PRIORITIZER_COEF)