From 78109f0e2d97c9c994231b28c82ad17d41c915c3 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Fri, 6 Jul 2018 11:55:58 +1000 Subject: [PATCH] Export classifed point cloud --- las_manipulation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/las_manipulation.py b/las_manipulation.py index becacb5..a35caf5 100644 --- a/las_manipulation.py +++ b/las_manipulation.py @@ -365,6 +365,7 @@ def main(): check_value = row['CHECK VALUE'] direct = row['DIRECTION'] check_distance = row['CHECK DISTANCE'] + las_dir = row['LAS CLASSIFIED FOLDER'] shp_dir = row['SHP SWASH FOLDER'] tmp_dir = row['TMP FOLDER'] @@ -381,13 +382,18 @@ def main(): las_data = call_lastools('lasground_new', input=las_data, output='-stdout', args=['-step', lasground_step], verbose=False) + # Save classified point cloud + las_name = os.path.join(las_dir, las_basename + '.las') + with open (las_name, 'wb') as f: + f.write(las_data) + # Interpolate point cloud onto a grid print('Interpolating to grid...') xyz_name = os.path.join(tmp_dir, las_basename + '.xyz') call_lastools('las2dem', input=las_data, output=xyz_name, args=['-step', 1], verbose=False) - # Make runup clipping mask + # Make runup clipping mask from gridded point cloud print('Calculating runup clipping mask...') shp_name = os.path.join(shp_dir, las_basename + '.shp') polygon_wave_runup(xyz_name, direct, shp_name, check_value, check_distance, zone_MGA)