mirror of
https://forge.chapril.org/tykayn/wololo
synced 2025-10-09 17:02:46 +02:00
add log when filter is active on the config
This commit is contained in:
parent
c7b4e82a7f
commit
22a8c09bfb
4 changed files with 20 additions and 1176849 deletions
|
@ -214,9 +214,11 @@ function convertDataFromSource(sourceFilePath: string, mapping: MappingConfigTyp
|
||||||
*/
|
*/
|
||||||
if (mapping.filters) {
|
if (mapping.filters) {
|
||||||
if (mapping.filters.exclude_point_if_tag_not_empty) {
|
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)
|
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) {
|
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)
|
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('converted features:', converted_geo_json.features.length)
|
||||||
console.log('différences nombre de features: ', data_transformed.features.length - 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, '%')
|
console.log('Changement de features', percentChange, '%')
|
||||||
|
|
||||||
if (percentChange > limitWarningPercentageChangeInPoints) {
|
if (percentChange > limitWarningPercentageChangeInPoints) {
|
||||||
|
@ -470,6 +473,13 @@ function setMappingConfigFromName(engine_conf_choice: string) {
|
||||||
* Launch conversion of dataset
|
* Launch conversion of dataset
|
||||||
*/
|
*/
|
||||||
function init() {
|
function init() {
|
||||||
|
console.log(`▗▖ ▗▖ ▗▄▖ ▗▖ ▗▄▖ ▗▖ ▗▄▖
|
||||||
|
▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌ ▐▌▐▌ ▐▌ ▐▌
|
||||||
|
▐▌ ▐▌▐▌ ▐▌▐▌ ▐▌ ▐▌▐▌ ▐▌ ▐▌
|
||||||
|
▐▙█▟▌▝▚▄▞▘▐▙▄▄▖▝▚▄▞▘▐▙▄▄▖▝▚▄▞▘
|
||||||
|
|
||||||
|
|
||||||
|
`)
|
||||||
setMappingConfigFromName(engine_conf_choice)
|
setMappingConfigFromName(engine_conf_choice)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ const MappingIRVE: MappingConfigType = {
|
||||||
filters: {
|
filters: {
|
||||||
enable_coordinates_filter: false,
|
enable_coordinates_filter: false,
|
||||||
enable_properties_filter: true,
|
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
|
// add only geojson points who are found having this regex in the zipcode properties
|
||||||
// properties: {
|
// properties: {
|
||||||
// consolidated_code_postal: '^[76|27]'
|
// 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
Loading…
Add table
Add a link
Reference in a new issue