diff --git a/mapping_geojson_to_osm_tags/convert_to_osm_tags.mjs b/mapping_geojson_to_osm_tags/convert_to_osm_tags.mjs index 052525a0..8645f3e1 100644 --- a/mapping_geojson_to_osm_tags/convert_to_osm_tags.mjs +++ b/mapping_geojson_to_osm_tags/convert_to_osm_tags.mjs @@ -12,10 +12,8 @@ const { debugLog } = custom_utils const { isBooleanKey } = custom_utils const { writeFile } = custom_utils -// let debugLog = custom_utils.debugLog - let use_mappping_engine = false -use_mappping_engine = true +// use_mappping_engine = true let Mapping_engine = new mapping_engine(mappingConfigIRVE) @@ -38,9 +36,11 @@ let boundingBoxCoordinates = { let filterCoordinates = true let enable_filter_on_department = true enable_filter_on_department = false + let filterDepartment = 91 if (mini_arguments['department']) { filterDepartment = mini_arguments['department'] + enable_filter_on_department = true } if (mini_arguments['source']) { sourceFilePathGeoJson = mini_arguments['source'] @@ -61,9 +61,9 @@ if (enable_filter_on_department) { let pointCounterMax = 1000000 let limitConversionToFirstPoint = false -limitConversionToFirstPoint = true +// limitConversionToFirstPoint = true if (limitConversionToFirstPoint) { - pointCounterMax = 2 + pointCounterMax = 1 } let defaultPropertiesOfPoint = { 'amenity': 'charging_station' @@ -146,8 +146,6 @@ function convertDataForIRVE (sourceFilePath, mapping, pointCounterMax, boundingB let mapped_point = {} if (use_mappping_engine) { - console.log('go mapping engine') - Mapping_engine.setConfig(mapping) mapped_point = Mapping_engine.mapElementFromConf(feature_point) } else { mapped_point = mapElementFromConfSimple(feature_point, mapping) @@ -220,8 +218,9 @@ function mapElementFromConfSimple (featurePoint, mappingConfig) { } if (use_mappping_engine) { - console.log('using mapping engine') - console.log('pointCounterMax', pointCounterMax) + console.log(' - using mapping engine') + console.log(' - pointCounterMax', pointCounterMax) + Mapping_engine.setConfig(mappingConfigIRVE) convertDataForIRVE(sourceFilePathGeoJson, mappingConfigIRVE, pointCounterMax, boundingBoxCoordinates) } else { diff --git a/mapping_geojson_to_osm_tags/coverage/clover.xml b/mapping_geojson_to_osm_tags/coverage/clover.xml index 53094485..345b731c 100644 --- a/mapping_geojson_to_osm_tags/coverage/clover.xml +++ b/mapping_geojson_to_osm_tags/coverage/clover.xml @@ -1,6 +1,6 @@ - - + + diff --git a/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html b/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html index bc3f18e0..320f8649 100644 --- a/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html +++ b/mapping_geojson_to_osm_tags/coverage/lcov-report/index.html @@ -86,7 +86,7 @@