mapping-geojson-osm/tests/data/mappings_to_test.ts

149 lines
3.6 KiB
TypeScript
Raw Normal View History

2024-07-08 11:27:27 +02:00
import MappingConfigType from "../../mappings/mapping-config.type";
/**
* configurations de mapping pour les cas de tests
*/
export const mappingRemoveAll: MappingConfigType = {
2023-08-18 11:25:02 +02:00
config_name: 'testing config mappingRemoveAll',
config_author: 'tykayn <contact@cipherbliss.com>',
2023-08-18 11:25:02 +02:00
default_properties_of_point: {},
tags: {},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
2023-08-18 11:25:02 +02:00
filters: {},
}
export const mappingSame: MappingConfigType = {
config_name: 'testing config mappingSame',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
equal: 'equal'
2023-08-18 11:25:02 +02:00
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
2023-08-18 11:25:02 +02:00
filters: {},
}
2023-08-18 11:25:02 +02:00
export const mappingName: MappingConfigType = {
config_name: 'testing config mappingName',
config_author: 'tykayn <contact@cipherbliss.com>',
2023-08-18 11:25:02 +02:00
default_properties_of_point: {},
2024-07-08 11:27:27 +02:00
add_not_mapped_tags_too: false,
2023-08-18 11:25:02 +02:00
tags: {
nom_amenageur: 'name'
},
source: {
geojson_path: "",
url: ""
},
2023-08-18 11:25:02 +02:00
filters: {},
}
export const mappingPhone: MappingConfigType = {
config_name: 'testing config mappingPhone',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
2023-08-18 11:25:02 +02:00
telephone_operateur: {
key_converted: 'phone',
convert_to_phone: true, // convertit en yes ou no
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
2023-08-18 11:25:02 +02:00
filters: {},
}
export const mappingBoolean: MappingConfigType = {
config_name: 'testing config mappingBoolean',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
consolidated_is_lon_lat_correct: {
convert_to_boolean_value: true,
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
filters: {},
}
2023-08-18 12:22:07 +02:00
export const mappingTruthy: MappingConfigType = {
config_name: 'testing config mappingTruthy',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
consolidated_is_lon_lat_correct: {
truthy_value: "succès",
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
2023-08-18 12:22:07 +02:00
filters: {},
}
export const mappingFalsy: MappingConfigType = {
config_name: 'testing config mappingFalsy',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
consolidated_city: {
falsy_value: "pas ouf succès",
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
2023-08-18 12:22:07 +02:00
filters: {},
}
export const mappingIgnoreFalsy: MappingConfigType = {
config_name: 'testing config mappingIgnore',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
consolidated_city: {
ignore_if_falsy: true,
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
2023-08-18 12:22:07 +02:00
filters: {},
}
export const mappingIgnoreTruthy: MappingConfigType = {
config_name: 'testing config mappingIgnore',
config_author: 'tykayn <contact@cipherbliss.com>',
default_properties_of_point: {},
tags: {
consolidated_is_lon_lat_correct: {
ignore_if_truthy: true,
},
},
add_not_mapped_tags_too: false,
source: {
geojson_path: "",
url: ""
},
2023-08-18 12:22:07 +02:00
filters: {},
2024-07-08 11:27:27 +02:00
}