From 65bdd702e7ec419d01587d67cd1aee334ac910c9 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 10 Dec 2020 14:15:03 -0500 Subject: [PATCH 1/3] Try entwine first during postprocess --- scripts/postprocess.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/scripts/postprocess.sh b/scripts/postprocess.sh index 8ad75cc..cbd671f 100755 --- a/scripts/postprocess.sh +++ b/scripts/postprocess.sh @@ -50,6 +50,20 @@ if [ ! -z "$pointcloud_input_path" ]; then fi fi + + if 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 + echo "Entwine point cloud is already built." + fi + + # Cleanup + if [ -e "entwine_pointcloud-tmp" ]; then + rm -fr "entwine_pointcloud-tmp" + fi + fi + 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 @@ -61,17 +75,6 @@ if [ ! -z "$pointcloud_input_path" ]; then 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 - echo "Entwine point cloud is already built." - fi - - # Cleanup - if [ -e "entwine_pointcloud-tmp" ]; then - rm -fr "entwine_pointcloud-tmp" - fi else echo "Entwine is not installed, checking if PotreeConverter is available instead..." if hash PotreeConverter 2>/dev/null; then From 7170b6b7f24b7c4f7ff923ddb8db151f757b42e4 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 10 Dec 2020 14:19:05 -0500 Subject: [PATCH 2/3] Bump version --- Dockerfile | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 52bac16..5482ae5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ RUN apt-get update && apt-get install -y curl gpg-agent RUN curl --silent --location https://deb.nodesource.com/setup_10.x | bash - RUN apt-get install -y nodejs unzip p7zip-full && npm install -g nodemon && \ ln -s /code/SuperBuild/install/bin/untwine /usr/bin/untwine && \ + ln -s /code/SuperBuild/install/bin/entwine /usr/bin/entwine && \ ln -s /code/SuperBuild/install/bin/pdal /usr/bin/pdal diff --git a/package.json b/package.json index e7753fd..7be9b3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "NodeODM", - "version": "2.1.0", + "version": "2.1.1", "description": "REST API to access ODM", "main": "index.js", "scripts": { From efc911fd1fdba3689e4dd060b963cf0285b3e536 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Thu, 10 Dec 2020 14:34:05 -0500 Subject: [PATCH 3/3] Modified postprocessing point cloud logic --- scripts/postprocess.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/postprocess.sh b/scripts/postprocess.sh index cbd671f..8148e21 100755 --- a/scripts/postprocess.sh +++ b/scripts/postprocess.sh @@ -75,12 +75,14 @@ if [ ! -z "$pointcloud_input_path" ]; then if [ -e "entwine_pointcloud-tmp" ]; then rm -fr "entwine_pointcloud-tmp" fi - else - echo "Entwine is not installed, checking if PotreeConverter is available instead..." + fi + + if [ ! -e "entwine_pointcloud" ]; then + echo "Checking if PotreeConverter is available..." if hash PotreeConverter 2>/dev/null; then PotreeConverter "$pointcloud_input_path" -o potree_pointcloud --overwrite -a RGB CLASSIFICATION else - echo "PotreeConverter is also not installed, will skip generation of Potree point cloud" + echo "PotreeConverter is not installed, will skip generation of Potree point cloud" fi fi else