Skip to content

Commit 4393ae0

Browse files
authored
Merge pull request #11 from IGNF/feat/several-lidarbd-sources
Feat/several lidarbd sources
2 parents 9cd3196 + 165749e commit 4393ae0

40 files changed

Lines changed: 403 additions & 706 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# QGis generated files
2+
*.copc.laz
3+
14
# Byte-compiled / optimized / DLL files
25
__pycache__/
36
*.py[cod]

README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,3 @@ DONOR_CLASS_LIST : Défaut [2, 22]. La liste des classes des points du fichier d
4545
RECIPIENT_CLASS_LIST : Défaut [2, 3, 9, 17]. La liste des classes des points du fichier receveur qui, s'ils sont absents dans une cellule, justifirons de prendre les points du fichier donneur de la même cellule
4646
TILE_SIZE : Défaut 1000. Taille du côté de l'emprise carrée représentée par les fichiers lidar d'entrée
4747
PATCH_SIZE : Défaut 1. taille en mètre du côté d'une cellule (doit être un diviseur de TILE_SIZE, soit pour 1000 : 0.25, 0.5, 2, 4, 5, 10, 25...)
48-
49-
Le script de sélection/découpe de fichier lidar peut être lancé via :
50-
```
51-
python lidar_selecter.py filepath.DONOR_DIRECTORY=[répertoire_fichiers_donneurs] filepath.RECIPIENT_DIRECTORY=[répertoire_fichiers_receveurs] filepath.SHP_NAME=[nom_shapefile] filepath.SHP_DIRECTORY=[répertoire_shapefile] filepath.CSV_NAME=[nom_fichier_csv] filepath.CSV_DIRECTORY=[répertoire_fichier_csv] filepath.OUTPUT_DIRECTORY=[chemin_de_sortie]
52-
```
53-
54-
filepath.DONOR_DIRECTORY: Le répertoire contenant les fichiers lidar donneurs
55-
filepath.RECIPIENT_DIRECTORY: Le répertoire contenant les fichiers lidar receveurs
56-
filepath.SHP_NAME: Le nom du shapefile contenant l'emprise du chantier qui délimite les fichiers lidar qui nous intéressent
57-
filepath.SHP_DIRECTORY: Le répertoire du fichier shapefile
58-
filepath.CSV_NAME: Le nom du fichier csv qui lie les différents fichiers donneurs et receveurs
59-
filepath.CSV_DIRECTORY: Le répertoire du fichier csv
60-
filepath.OUTPUT_DIRECTORY: le répertoire recevant les fichiers lidar découpés

configs/configs_patchwork.yaml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
work_dir: ${hydra:runtime.cwd}
88

99
# disable ouput directory from being created
10-
hydra:
11-
output_subdir: null
12-
run:
10+
hydra:
11+
output_subdir: null
12+
run:
1313
dir: .
1414

1515
# disable main.log from being created
@@ -19,37 +19,34 @@ defaults:
1919
- _self_
2020

2121
filepath:
22-
SHP_NAME: null # name of the shapefile for lidar selecter, to determine the lidar file to select
22+
SHP_NAME: null # name of the shapefile used to match tiles to patch
2323
SHP_DIRECTORY: null # path to the directory containing the shapefile
24-
DONOR_DIRECTORY: null # directory containing all potential donor lidar files, for lidar selecter
25-
RECIPIENT_DIRECTORY: null # directory containing all potential donor lidar files, for lidar selecter
26-
OUTPUT_DIRECTORY: null # directory containing all potential donor lidar files, for lidar selecter
2724

2825
OUTPUT_DIR: null # directory of the file with added points, from patchwork.
2926
OUTPUT_NAME: null # name of the file with added points, from patchwork.
30-
27+
3128
INPUT_INDICES_MAP_DIR: null
3229
INPUT_INDICES_MAP_NAME: null
3330

3431
OUTPUT_INDICES_MAP_DIR: null # path to the directory for the indices map reflecting the changes to the recipient, from patchwork
3532
OUTPUT_INDICES_MAP_NAME: null # name of the indices map reflecting the changes to the recipient, from patchwork
3633

37-
# INPUT_DIRECTORY: null # directory for input (shapefile)
38-
CSV_NAME: null # name of the csv file that log the lidar files to process with patchwork
39-
CSV_DIRECTORY: null # path to the directory that will contain the csv
40-
41-
DONOR_NAME: null # name of the donor file for patchwork
34+
RECIPIENT_DIRECTORY: null # directory containing the recipient file for patchwork
4235
RECIPIENT_NAME: null # name of the recipient file for patchwork
43-
4436

37+
# The input shapefile should contain a "nuage_mixa" attrubute for each geometry
38+
# "nuage_mixa" contains the path to the folder containing the files related to a specific donor source.
39+
# Laz/las files from this source are usually contained in a subdirectory of "nuage_mixa"
40+
# path to this subdirectory can be configured using "DONOR_SUBDIRECTORY"
41+
DONOR_SUBDIRECTORY: "data"
4542

4643
CRS: 2154
4744

4845
DONOR_CLASS_LIST: [2, 22]
4946
RECIPIENT_CLASS_LIST: [2, 6, 9, 17]
5047

51-
RECIPIENT_SUFFIX: "_recipient"
5248
TILE_SIZE: 1000
49+
SHP_X_Y_TO_METER_FACTOR: 1000 # multiplication factor to convert shapefile x, y attributes values to meters
5350
PATCH_SIZE: 1 # size of a patch of the grid. Must be a divisor of TILE_SIZE, so for 1000: 0.25, 0.5, 2, 4, 5, 10, 25...
5451
NEW_COLUMN: null # If not null, contains the name of the new column
5552
NEW_COLUMN_SIZE: 8 # must be 8, 16, 32 or 64

exemples/lidar_selecter_example.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

patchwork/constants.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,4 @@
22
CLASSIFICATION_STR = "classification"
33
PATCH_X_STR = "patch_x"
44
PATCH_Y_STR = "patch_y"
5-
DONOR_SUBDIRECTORY_NAME = "donor"
6-
RECIPIENT_SUBDIRECTORY_NAME = "recipient"
7-
8-
COORDINATES_KEY = "coordinates"
9-
DONOR_FILE_KEY = "donor_file"
10-
RECIPIENT_FILE_KEY = "recipient_file"
5+
RECIPIENT_SUFFIX = "_recipient"

patchwork/lidar_selecter.py

Lines changed: 0 additions & 153 deletions
This file was deleted.

0 commit comments

Comments
 (0)