-
Notifications
You must be signed in to change notification settings - Fork 0
/
dc_lidar_missing_processing.py
67 lines (49 loc) · 2.04 KB
/
dc_lidar_missing_processing.py
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
'''
Description:
-Download missing lidar
-manually download missing lidar datasets
-manually edit index shp to have only laz tiles desired
-download laz
-Convert to xyz
Author:
Chris Amante
Date:
6/5/2019
'''
#################################################################
#################################################################
#################################################################
####################### IMPORT MODULES ##########################
#################################################################
#################################################################
#################################################################
import os
import sys
######################## NOS ####################################
print "Current directory is ", os.getcwd()
main_dir=sys.argv[1]
#main_dir='/media/sf_external_hd/al_fl'
#other params
dc_lidar_missing='dc_lidar_missing_download_process.csv'
print 'Downloading lidar from Digital Coast'
dc_lidar_missing_download_cmd='download_process_missing_lidar.sh ' + main_dir + ' ' + main_dir + '/data/' + dc_lidar_missing
os.system(dc_lidar_missing_download_cmd)
print "Downloading SLR DEM to fill in gaps without lidar"
#Download OCM SLR Viewer DEM to fill in areas where I can't get raw data
os.system('cd')
#manually download SLR Viewer DEM from DAV and put in folder below
os.chdir(main_dir+'/data/dc_lidar/missing/slr_dem')
print "Converting SLR DEM to chunks and xyz"
#Convert tif to xyz
os.system('tif2chunks2xyz.sh 500 yes 0.000030864199')
#create datalist
print "Creating Datalist"
os.chdir('xyz')
os.system('create_datalist.sh slr_dem')
#add datalist to master
print "Added Datalist to Master Datalist"
current_dir=os.getcwd()
add_to_master_cmd='echo ' + current_dir + '/slr_dem.datalist -1 0.00001 >> ' + main_dir + '/software/gridding/al_fl.datalist'
#echo "/media/sf_external_hd/al_fl/data/dc_lidar/missing/slr_dem/xyz/slr_dem.datalist -1 0.00001" >> /media/sf_external_hd/al_fl/software/gridding/al_fl.datalist
os.system(add_to_master_cmd)