Skip to content

Changed result file delimiter to semicolon

Tara Evaz Zadeh requested to merge feature/change_result_file_delimiter into master

The result files produced by the losscalculator include polygons in one of its columns. Since polygons have commas inside, this could interfere with coma being used as the columns delimiter.

So I decided to use double commas (,,) as the result file delimiter, which did not look nice as you can observe below:

geometry,, origin_id,, respective_cell_id,, asset_id,, lon,, lat...

In this MR, I changed the program to produce a result file with delimiter being semicolon ; and no more ,,. So now the result file header look like below:

geometry; origin_id; respective_cell_id; asset_id; lon; lat...

Just to help you understand what changed in each of the three files:
The strategy to change delimiter of produced result assets is done in the file damage_calculator_tile_version.py and the result file header delimiter change is done in damage_calculator.py.
I also changed the reference_result.csv in the example of the repository to match the changes.

\approve @ds @fd

Edited by Tara Evaz Zadeh

Merge request reports

Loading