up irve script

This commit is contained in:
Tykayn 2023-10-01 11:23:19 +02:00 committed by tykayn
parent 7ce3058217
commit 01aef649fd
6 changed files with 5751001 additions and 10 deletions

View File

@ -71,9 +71,9 @@ let filterZipCodeAdresse = new RegExp(` ${filterDepartment}`)
let filteredName = ''
if (enable_filter_on_department) {
filteredName = outname+'_filtered_zipcode_' + filterDepartment
filteredName = '_filtered_zipcode_' + filterDepartment
} else if (filterOnBoundingBox) {
filteredName = outname+'_filtered_bbox_' + boundingBoxCoordinates.xMin + '-' + boundingBoxCoordinates.xMax + '_' + boundingBoxCoordinates.yMin + '-' + boundingBoxCoordinates.yMax
filteredName = '_filtered_bbox_' + boundingBoxCoordinates.xMin + '-' + boundingBoxCoordinates.xMax + '_' + boundingBoxCoordinates.yMin + '-' + boundingBoxCoordinates.yMax
}
let pointCounterMax: number = 1000000
@ -102,8 +102,9 @@ let output_folder = 'output';
*/
function writeFile(fileName: string, fileContent: any) {
let write_path = `./${output_folder}/${fileName}`
debugLog('write file ', fileName, write_path)
debugLog('write file ', outname+fileName, write_path)
console.log('write file, write_path', fileName, write_path)
return fs.writeFile(
write_path,
@ -233,7 +234,7 @@ function convertDataForIRVE(sourceFilePath: string, mapping: any, pointCounterMa
// write file on disk
if (converted_geo_json.features.length) {
let fileNameToWrite = 'converted_' + filteredName + '.json'
let fileNameToWrite = 'converted_' + outname + filteredName + '.json'
console.log('features: ', converted_geo_json.features.length)
debugLog('convert : write file ', fileNameToWrite)

File diff suppressed because it is too large Load Diff

View File

@ -310,7 +310,7 @@ export default class {
convertedValue = convertedValue.replace(' ', ' ').trim();
console.log('convertedValue', convertedValue)
debugLog('convertedValue', convertedValue)
if (
/^\d/.test(convertedValue) &&
!/^\+33 /.test(convertedValue)

View File

@ -1,7 +1,7 @@
import fs from 'fs'
let show_debug = 0
show_debug = 1
// show_debug = 1
let output_folder = 'output';
// console.log('----------------------show_debug', show_debug)

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff