up irve script
This commit is contained in:
parent
7ce3058217
commit
01aef649fd
@ -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
@ -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)
|
||||
|
@ -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)
|
||||
|
1
osm_output/bornes-irve-filetered_latest.osm
Normal file
1
osm_output/bornes-irve-filetered_latest.osm
Normal file
File diff suppressed because one or more lines are too long
1647609
output/converted__irve-latest-etalab_.json
Normal file
1647609
output/converted__irve-latest-etalab_.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user