Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 127 additions & 54 deletions README.md

Large diffs are not rendered by default.

Binary file added images/alerte_squelette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/correction_alerte_squelette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/correction_manuelle_masque_hydro.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/cuvettes_artefects.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/extraction_n_points_squelette.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/masque_hydro_dalles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/masque_hydro_merge.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/mnt_avant_apres.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/points_virtuels.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/squelette_hydro.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ def extract_points_around_skeleton_points_one_tile(
k (int): the number of nearest neighbors to find
"""
# Step 1 : Crop filtered pointcloud by Mask Hydro with buffer
input_dir_points = os.path.join(input_dir, "pointcloud")
tilename = os.path.splitext(filename)[0] # filename to the LAS file
input_pointcloud = os.path.join(input_dir_points, filename) # path to the LAS file
input_pointcloud = os.path.join(input_dir, filename) # path to the LAS file
logging.info(f"\nCroping filtered pointcloud by Mask Hydro with buffer for tile : {tilename}")
# Croping filtered pointcloud by Mask Hydro with buffer for tile
points_clip = read_filter_and_crop_pointcloud(input_pointcloud, str(input_mask_hydro_buffer), classes)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
)

TMP_PATH = Path("./tmp/create_virtual_point/vectors/extract_points_around_skeleton")
INPUT_DIR = Path("./data/tile_0830_6291")
INPUT_DIR = Path("./data/tile_0830_6291/pointcloud")
MASK_HYDRO = "./data/tile_0830_6291/mask_hydro_merge/MaskHydro_merge.geojson"
POINTS_SKELETON = "./data/tile_0830_6291/skeleton/points_along_skeleton.geojson"
OUTPUT_GEOJSON = TMP_PATH / "Semis_2021_0830_6291_LA93_IGN69_points_skeleton.geojson"
Expand Down
10 changes: 5 additions & 5 deletions test/test_main_extract_points_from_skeleton.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def setup_module(module):
def test_main_run_okay():

cmd = f"""python -m lidro.main_extract_points_from_skeleton \
io.input_dir={INPUT_DIR}\
io.input_dir={INPUT_DIR}/pointcloud \
io.input_filename=Semis_2021_0830_6291_LA93_IGN69.laz \
io.input_mask_hydro="{INPUT_DIR}/mask_hydro_merge/MaskHydro_merge.geojson"\
io.input_skeleton="{INPUT_DIR}/skeleton/skeleton_hydro.geojson"\
Expand All @@ -28,7 +28,7 @@ def test_main_run_okay():


def test_main_extract_points_skeleton_input_file():
input_dir = INPUT_DIR
input_dir = INPUT_DIR / "pointcloud"
output_dir = OUTPUT_DIR / "main_extract_points_skeleton_input_file"
input_filename = "Semis_2021_0830_6291_LA93_IGN69.laz"
input_mask_hydro = INPUT_DIR / "mask_hydro_merge/MaskHydro_merge.geojson"
Expand Down Expand Up @@ -111,7 +111,7 @@ def test_main_extract_points_skeleton_fail_wrong_input_dir():


def test_main_extract_points_skeleton_fail_no_output_dir():
input_dir = INPUT_DIR
input_dir = INPUT_DIR / "pointcloud"
input_mask_hydro = INPUT_DIR / "mask_hydro_merge/MaskHydro_merge.geojson"
input_skeleton = INPUT_DIR / "skeleton/skeleton_hydro.geojson"
distances_meters = 5
Expand All @@ -137,7 +137,7 @@ def test_main_extract_points_skeleton_fail_no_output_dir():


def test_main_extract_points_skeleton_fail_no_input_mask_hydro():
input_dir = INPUT_DIR
input_dir = INPUT_DIR / "pointcloud"
output_dir = OUTPUT_DIR / "main_no_input_dir"
input_skeleton = INPUT_DIR / "skeleton/skeleton_hydro.geojson"
distances_meters = 5
Expand All @@ -163,7 +163,7 @@ def test_main_extract_points_skeleton_fail_no_input_mask_hydro():


def test_main_extract_points_skeleton_fail_no_input_skeleton():
input_dir = INPUT_DIR
input_dir = INPUT_DIR / "pointcloud"
output_dir = OUTPUT_DIR / "main_no_input_dir"
input_mask_hydro = INPUT_DIR / "mask_hydro_merge/MaskHydro_merge.geojson"
distances_meters = 5
Expand Down
Loading