diff --git a/scripts/postprocess.sh b/scripts/postprocess.sh index e85ecaf..8ad75cc 100755 --- a/scripts/postprocess.sh +++ b/scripts/postprocess.sh @@ -19,7 +19,7 @@ script_path=$(realpath $(dirname "$0")) cd "$script_path/../$1" echo "Postprocessing: $(pwd)" -# Generate point cloud (if entwine or potreeconverter is available) +# Generate point cloud (if entwine, untwine or potreeconverter is available) pointcloud_input_path="" for path in "odm_georeferencing/odm_georeferenced_model.laz" \ "odm_georeferencing/odm_georeferenced_model.las" \ @@ -50,7 +50,18 @@ if [ ! -z "$pointcloud_input_path" ]; then fi fi - if hash entwine 2>/dev/null; then + if hash untwine 2>/dev/null; then + if [ ! -e "entwine_pointcloud" ]; then + untwine --temp_dir "entwine_pointcloud-tmp" --files "$pointcloud_input_path" --output_dir entwine_pointcloud + else + echo "Entwine point cloud is already built." + fi + + # Cleanup + if [ -e "entwine_pointcloud-tmp" ]; then + rm -fr "entwine_pointcloud-tmp" + fi + elif hash entwine 2>/dev/null; then if [ ! -e "entwine_pointcloud" ]; then entwine build --threads $(nproc) --tmp "entwine_pointcloud-tmp" -i "$pointcloud_input_path" -o entwine_pointcloud else @@ -60,7 +71,7 @@ if [ ! -z "$pointcloud_input_path" ]; then # Cleanup if [ -e "entwine_pointcloud-tmp" ]; then rm -fr "entwine_pointcloud-tmp" - fi + fi else echo "Entwine is not installed, checking if PotreeConverter is available instead..." if hash PotreeConverter 2>/dev/null; then