add log when filter is active on the config

This commit is contained in:
Tykayn 2025-02-24 14:53:42 +01:00 committed by tykayn
parent c7b4e82a7f
commit 22a8c09bfb
4 changed files with 20 additions and 1176849 deletions

View file

@ -214,9 +214,11 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
*/
if (mapping.filters) {
if (mapping.filters.exclude_point_if_tag_not_empty) {
console.log('------ filter: exclude_point_if_tag_not_empty', mapping.filters.exclude_point_if_tag_not_empty)
list_of_points = Mapping_engine.filterListOfPointsByExcludingIfKeyFilled(list_of_points, mapping.filters.exclude_point_if_tag_not_empty)
}
if (mapping.filters.filter_points_lesser_than_NkW) {
console.log('------ filter: filter_points_lesser_than_NkW', mapping.filters.filter_points_lesser_than_NkW)
list_of_points = Mapping_engine.filterListOfPointsByExcludingIfMaxPowerIsLesserThan(mapping.filters.filter_points_lesser_than_NkW, list_of_points)
}
}
@ -368,7 +370,8 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
console.log('converted features:', converted_geo_json.features.length)
console.log('différences nombre de features: ', data_transformed.features.length - converted_geo_json.features.length)
const percentChange = (data_transformed.features.length) / 100 * converted_geo_json.features.length;
const percentChange = (converted_geo_json.features.length / data_transformed.features.length) * 100;
console.log('Changement de features', percentChange, '%')
if (percentChange > limitWarningPercentageChangeInPoints) {
@ -470,6 +473,13 @@ function setMappingConfigFromName(engine_conf_choice: string) {
* Launch conversion of dataset
*/
function init() {
console.log(`▗▖ ▗▖ ▗▄▖ ▗▖ ▗▄▖ ▗▖ ▗▄▖
`)
setMappingConfigFromName(engine_conf_choice)
}

View file

@ -21,7 +21,7 @@ const MappingIRVE: MappingConfigType = {
filters: {
enable_coordinates_filter: false,
enable_properties_filter: true,
filter_points_lesser_than_NkW: 22 // ne pas sortir les points qui ont moins de ce nombre de puissance nominale
filter_points_lesser_than_NkW: 50 // ne pas sortir les points qui ont moins de ce nombre de puissance nominale
// add only geojson points who are found having this regex in the zipcode properties
// properties: {
// consolidated_code_postal: '^[76|27]'

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff