Created
November 18, 2024 10:55
-
-
Save smellman/02960750a601917e45e5b5529bea97e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in *; do | |
# 出力ディレクトリを生成(R0*ディレクトリに対応) | |
output_dir="/processing/lasprocessing/$i" | |
mkdir -p "$output_dir" | |
for j in "$i"/LAZ/*.laz; do | |
# ファイルが存在するか確認 | |
if [ -f "$j" ]; then | |
# lazファイルの名前部分だけ取得してlasに変換 | |
base_name=$(basename "${j%.laz}") | |
output="$output_dir/$base_name.las" | |
echo "Converting $j to $output..." | |
# las2lasコマンドを実行 | |
las2las64 -i "$j" -o "$output" -set_version 1.4 | |
if [ $? -eq 0 ]; then | |
echo "Successfully converted: $output" | |
else | |
echo "Error converting: $j" | |
fi | |
fi | |
done | |
echo "Processed directory: $i" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment