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": { diff --git a/scripts/postprocess.sh b/scripts/postprocess.sh index 8ad75cc..8148e21 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,23 +75,14 @@ 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..." + 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