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

File diff suppressed because it is too large Load Diff