-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbash_script.sh
71 lines (57 loc) · 3.13 KB
/
bash_script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#/bin/bash
# Update Conda with latest version of PDAL
conda install -c conda-forge pdal python-pdal gdal
# Run with Docker
docker pull pdal/pdal:latest
# Create two output directories on my scratch storage
sudo mkdir -p /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP212_2017/AZ/LAZ/UTM_12/
sudo mkdir -p /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP212_2017/AZ/DEM/UTM_12/
sudo mkdir -p /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAZ/UTM_12/
sudo mkdir -p /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/DEM/UTM_12/
sudo mkdir -p /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAZ/UTM_11/
sudo mkdir -p /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/DEM/UTM_11/
# changed ownership of directories recursively
sudo chown -R tswetnam:tswetnam /vol_c/AZGS_data
# change into directory with first set of LAS data
cd /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP212_2017/AZ/LAS/UTM_12/
# run bash script to scrape the *.las file names and begin running latest PDAL Docker Container
cd /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP212_2017/AZ/LAS/UTM_12/
ls *.las | cut -d. -f1 | xargs -P14 -I{} \
docker run \
-v /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP212_2017/AZ/LAS/UTM_12/:/input_data \
-v /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP212_2017/AZ/LAZ/UTM_12/:/output_data \
-v /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP212_2017/AZ/DEM/UTM_12/:/output_dem \
-v /home/tswetnam/github/NAIP2017/:/home \
pdal/pdal:latest pdal \
pipeline /home/pdal_jsons/compress.json \
--readers.las.filename=/input_data/{}.las \
--writers.las.filename=/output_data/{}.laz \
--writers.gdal.filename=/output_dem/{}.tif
# change into directory with first set of LAS data
cd /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAS/UTM_12/
# run bash script to scrape the *.las file names and begin running latest PDAL Docker Container
cd /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAS/UTM_12/
ls *.las | cut -d. -f1 | xargs -P14 -I{} \
docker run \
-v /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAS/UTM_12/:/input_data \
-v /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAZ/UTM_12/:/output_data \
-v /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/DEM/UTM_12/:/output_dem \
-v /home/tswetnam/github/NAIP2017/:/home \
pdal/pdal:latest pdal \
pipeline /home/pdal_jsons/compress.json \
--readers.las.filename=/input_data/{}.las \
--writers.las.filename=/output_data/{}.laz \
--writers.gdal.filename=/output_dem/{}.tif
# run bash script to scrape the *.las file names and begin running latest PDAL Docker Container
cd /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAS/UTM_11/
ls *.las | cut -d. -f1 | xargs -P14 -I{} \
docker run \
-v /media/tswetnam/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAS/UTM_11/:/input_data \
-v /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/LAZ/UTM_11/:/output_data \
-v /vol_c/AZGS_data/GIS_Data_NP112_NP212/NP112_2017/AZ/DEM/UTM_11/:/output_dem \
-v /home/tswetnam/github/NAIP2017/:/home \
pdal/pdal:latest pdal \
pipeline /home/pdal_jsons/compress.json \
--readers.las.filename=/input_data/{}.las \
--writers.las.filename=/output_data/{}.laz \
--writers.gdal.filename=/output_dem/{}.tif