wololo/mappings/converters/configPanneauxMaxSpeed.ts

41 lines
1,014 B
TypeScript
Raw Normal View History

/**
* panneaux de vitesse détectés sur panoramax
* utilisation:
*/
import { constrainedMemory } from "process";
import MappingConfigType from "../mapping-config.type";
const MappingPanneauxMaxSpeed: MappingConfigType = {
config_name: "MappingPanneauxMaxSpeed",
config_author: "tk",
default_properties_of_point: {
"traffic_sign": "FR:B14",
"maxspeed:source": "panoramax"
},
source: {
geojson_path: '',
url: ''
},
filters: {
// exclude_point_if_tag_not_empty: ['id_osm'], // exclure les points ayant déjà un id_osm pour éviter les doublons
// offset: 1
},
add_not_mapped_tags_too: false,
boolean_keys: [],
tags_to_ignore_if_value_is: ['Non renseigne'],
tags: {
"SourceFile": {
key_converted: 'maxspeed',
transform_function: (value: string) => {
let explode = value.split('-');
if (explode.length > 1) {
return explode[1];
}
return value;
}
},
}
}
export default MappingPanneauxMaxSpeed;