issy start config 2 roues, modular engine option in cli

This commit is contained in:
Tykayn 2024-10-03 15:17:20 +02:00 committed by tykayn
parent 633ee02389
commit c19e27dd1a
3 changed files with 4668 additions and 5 deletions

View File

@ -313,6 +313,8 @@ function mapElementFromConfSimple(featurePoint: any, mappingConfig: any) {
}
function setMappingConfigFromName(engine_conf_choice: string) {
console.log('------- use_mapping_engine', use_mapping_engine)
console.log('------- engine_conf_choice', engine_conf_choice)
if (use_mapping_engine) {
debugLog(' - using mapping engine')
@ -324,10 +326,11 @@ function setMappingConfigFromName(engine_conf_choice: string) {
} else {
// choisir la config IRVE par défaut si aucune option de config de mapping n'est choisie en CLI
console.log('engine_conf_choice', engine_conf_choice)
if (engine_conf_choice !== default_engine_conf_choice && allowed_configs.indexOf("mappingIssy2Roues") !== -1) {
// ['mappingIssy2Roues', 'mappingConfigIRVE', 'mappingConfigIRVEFromOsmose', 'mappingConfigIRVE_simple', 'mappingTest', 'ConfigIRVE']
if (engine_conf_choice == 'mappingIssy2Roues') {
console.log('mappingIssy2Roues', mappingIssy2Roues)
Mapping_engine.setConfig(mappingIssy2Roues)
} else if (engine_conf_choice == 'mappingConfigIRVE') {
Mapping_engine.setConfig(mappingConfigIRVE)
@ -341,10 +344,11 @@ function setMappingConfigFromName(engine_conf_choice: string) {
Mapping_engine.setConfig(ConfigIRVE)
}
} else {
Mapping_engine.setConfig(default_engine_conf_choice)
Mapping_engine.setConfig(mappingConfigIRVE)
}
}
let currentMappingConfig = Mapping_engine.getConfig();
convertDataFromSource(sourceFilePathGeoJson, currentMappingConfig, pointCounterMax, boundingBoxCoordinates)
} else {
@ -360,8 +364,7 @@ function setMappingConfigFromName(engine_conf_choice: string) {
function init() {
setMappingConfigFromName(engine_conf_choice)
let currentMappingConfig = Mapping_engine.getConfig();
convertDataFromSource(sourceFilePathGeoJson, currentMappingConfig, pointCounterMax, boundingBoxCoordinates)
}

View File

@ -39,6 +39,7 @@ export default class {
}
setConfig(mappingConfig: MappingConfigType) {
console.log('load config', mappingConfig.config_name)
debugLog('load config', mappingConfig.config_name)
this.mapping_config = mappingConfig
}

File diff suppressed because it is too large Load Diff