Removed laspy workaround

pull/1614/head
HeDo 2023-03-01 15:20:00 +01:00
rodzic c5f67024d1
commit 93be23b9ba
1 zmienionych plików z 13 dodań i 23 usunięć

Wyświetl plik

@ -52,12 +52,6 @@ def rectify(lasFile, debug=False, reclassify_threshold=5, min_area=750, min_poin
pcFile = lasFile
try:
# Workaround for MacOS: laspy does not have support for LAZ on macOS
# so we first convert to normal LAS via PDAL
# TODO: remove LASPY and use PDAL instead
if sys.platform == 'darwin' and lasFile[-3:] == "laz":
pcFile = lasFile + ".tmp.las"
pdal.translate(lasFile, pcFile)
log.ODM_INFO("Rectifying {} using with [reclassify threshold: {}, min area: {}, min points: {}]".format(lasFile, reclassify_threshold, min_area, min_points))
run_rectification(
@ -66,10 +60,6 @@ def rectify(lasFile, debug=False, reclassify_threshold=5, min_area=750, min_poin
extend_plan='surrounding', extend_grid_distance=5, \
min_area=min_area, min_points=min_points)
if sys.platform == 'darwin' and pcFile != lasFile and os.path.isfile(pcFile):
pdal.translate(pcFile, lasFile)
os.remove(pcFile)
log.ODM_INFO('Created %s in %s' % (lasFile, datetime.now() - start))
except Exception as e:
log.ODM_WARNING("Error rectifying ground in file %s: %s" % (lasFile, str(e)))