Does not crop the classified las file

etta-drone
Chris Drummond 5 years ago
parent b00902c204
commit 7ad2760377

@ -240,33 +240,11 @@ def process(yaml_file):
# Get name of swash cropping polygon # Get name of swash cropping polygon
crop_swash_poly = os.path.join(shp_swash_dir, las_basename + '.shp') crop_swash_poly = os.path.join(shp_swash_dir, las_basename + '.shp')
# Crop point cloud to swash boundary
#print('Cropping swash...')
#las_data = call_lastools('lasclip', input=input_las, output='-stdout',
# args=['-poly', crop_swash_poly], verbose=False)
# Export classified, clipped las for delivery to client
#las_name = os.path.join(output_las_dir, las_basename + '.las')
#with open (las_name, 'wb') as f:
# f.write(las_data)
# Apply sea-side clipping polygon
print('Cropping back of beach...')
#las_data = call_lastools('lasclip', input=las_data, output='-stdout',
las_data = call_lastools('lasclip', input=input_las, output='-stdout',
args=['-poly', crop_heatmap_poly], verbose=False)
# Create clipping polygon for heatmap raster
print('Creating heat map cropping polygon...')
shp_name = os.path.join(output_poly_dir, las_basename + '.shp')
call_lastools('lasboundary', input=las_data, output=shp_name, verbose=False)
# Make a raster from point cloud # Make a raster from point cloud
print('Creating heat map raster...') print('Creating heat map raster...')
tif_name = os.path.join(output_tif_dir, las_basename + '.tif') tif_name = os.path.join(output_tif_dir, las_basename + '.tif')
call_lastools('blast2dem', input=las_data, output=tif_name, call_lastools('blast2dem', input=input_las, output=tif_name,
args=['-step', 0.1, '-keep_class', 2], verbose=False) args=['-step', 0.1, '-keep_class', 2], verbose=True)
# IF THIS STEP ISN'T WORKING: # IF THIS STEP ISN'T WORKING:
# might mean there are no data lines # might mean there are no data lines
# trying running with args=['-step', 1, '-keep_class', 2, '-rescale', 0.001,0.001,0.001] # trying running with args=['-step', 1, '-keep_class', 2, '-rescale', 0.001,0.001,0.001]
@ -276,7 +254,7 @@ def process(yaml_file):
# Extract elevations along profiles from triangulated surface # Extract elevations along profiles from triangulated surface
print('Extracting profile elevations...') print('Extracting profile elevations...')
df = extract_pts( df = extract_pts(
las_data, input_las,
cp_csv, cp_csv,
survey_date, survey_date,
beach, beach,

Loading…
Cancel
Save