Skip to content

Commit

Permalink
fix a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelDaab committed Aug 20, 2024
1 parent ac91fa1 commit 89e7085
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ python lidro/main_create_skeleton_lines.py [nom_paramètre_1]=[valeur_du_paramè
```
ces paramètres sont :
skeleton.file_path.mask_input_path : Le chemin d'entrée des masques des cours d'eau
skeleton.file_path.skeleton_lines_ouput_path : Le chemin de sortie des squelettes uniquement (pas de fichier de sortie si laissé à vide)
skeleton.file_path.gap_lines_ouput_path : Le chemin de sortie des lignes franchissant des ponts uniquement (pas de fichier de sortie si laissé à vide)
skeleton.file_path.skeleton_lines_output_path : Le chemin de sortie des squelettes uniquement (pas de fichier de sortie si laissé à vide)
skeleton.file_path.gap_lines_output_path : Le chemin de sortie des lignes franchissant des ponts uniquement (pas de fichier de sortie si laissé à vide)
skeleton.file_path.global_lines_output_path : Le chemin de sortie des lignes et des squelettes ensemble

skeleton.max_gap_width : La distance maximale envisagée pour franchir des ponts
Expand Down
4 changes: 2 additions & 2 deletions configs/configs_lidro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ virtual_point:
skeleton:
file_path:
mask_input_path: null
skeleton_lines_ouput_path: null # only branches' skeleton (if empty, no file is created)
gap_lines_ouput_path: null # only new lines to close gaps (if empty, no file is created)
skeleton_lines_output_path: null # only branches' skeleton (if empty, no file is created)
gap_lines_output_path: null # only new lines to close gaps (if empty, no file is created)
global_lines_output_path: null # lines from both the skeletons and the gap lines

max_gap_width: 200 # distance max in meter of any gap between 2 branches we will try to close with a line
Expand Down
8 changes: 4 additions & 4 deletions lidro/main_create_skeleton_lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def run(config: DictConfig):
# create the gap lines from the selected candidates
gap_lines_list = [validated_candidate.line for validated_candidate in validated_candidates]
gdf_gap_lines = gpd.GeoDataFrame(geometry=gap_lines_list).set_crs(crs, allow_override=True)
if config.skeleton.file_path.gap_lines_ouput_path and validated_candidates:
gdf_gap_lines.to_file(config.skeleton.file_path.gap_lines_ouput_path, driver='GeoJSON')
if config.skeleton.file_path.gap_lines_output_path and validated_candidates:
gdf_gap_lines.to_file(config.skeleton.file_path.gap_lines_output_path, driver='GeoJSON')

# add the extremities used on each branch to close a gap to the list of gap_point of that branch,
# to create a new line toward that extremity and know not to remove it during the "simplify"
Expand All @@ -55,8 +55,8 @@ def run(config: DictConfig):
# putting all skeleton lines together, and save them if there is a path
branch_lines_list = [branch.gdf_skeleton_lines for branch in branches_list]
gdf_branch_lines = gpd.GeoDataFrame(pd.concat(branch_lines_list, ignore_index=True))
if config.skeleton.file_path.skeleton_lines_ouput_path:
gdf_branch_lines.to_file(config.skeleton.file_path.skeleton_lines_ouput_path, driver='GeoJSON')
if config.skeleton.file_path.skeleton_lines_output_path:
gdf_branch_lines.to_file(config.skeleton.file_path.skeleton_lines_output_path, driver='GeoJSON')

# saving all lines
gdf_global_lines = gpd.GeoDataFrame(pd.concat([gdf_branch_lines, gdf_gap_lines], ignore_index=True))
Expand Down
8 changes: 4 additions & 4 deletions scripts/example_create_skeleton_lines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ skeleton.file_path.mask_input_path=[input_filepath] \
skeleton.file_path.global_lines_output_path=[output_filepath] \
skeleton.db_uni.db_user=[user_name] \
"skeleton.db_uni.db_password=[password]" \
skeleton.file_path.skeleton_lines_ouput_path=[out_filepath(optional)] \
skeleton.file_path.gap_lines_ouput_path=[out_filepath(optional)]
skeleton.file_path.skeleton_lines_output_path=[out_filepath(optional)] \
skeleton.file_path.gap_lines_output_path=[out_filepath(optional)]

# skeleton.file_path.mask_input_path : input path to the .geojson with the water masks
# skeleton.file_path.global_lines_output_path : output path for all the skeletons
# skeleton.db_uni.db_user : username for "bduni_france_consultation"
# skeleton.db_uni.db_password : password for "bduni_france_consultation". WARNING ! If there is a special character in the password,
# the line must be written like this : "skeleton.db_uni.db_password='$tr@ng€_ch@r@ct€r$'" (note the " and the ')
# skeleton.file_path.skeleton_lines_ouput_path : (optional) output path for only the skeleton inside water beds defined by the input masks
# skeleton.file_path.gap_lines_ouput_path : (optional) output path for only the lines between water beds defined by the input masks
# skeleton.file_path.skeleton_lines_output_path : (optional) output path for only the skeleton inside water beds defined by the input masks
# skeleton.file_path.gap_lines_output_path : (optional) output path for only the lines between water beds defined by the input masks

0 comments on commit 89e7085

Please sign in to comment.