From 829117ba8b22df185e396fa5b3555385229ce468 Mon Sep 17 00:00:00 2001 From: Stephen Mather Date: Mon, 18 Jun 2018 09:56:19 -0400 Subject: [PATCH] Revert "Add support for compressed LAZ files" --- README.md | 2 +- SuperBuild/CMakeLists.txt | 1 - SuperBuild/cmake/External-LASzip.cmake | 26 -------------------------- SuperBuild/cmake/External-PDAL.cmake | 5 +++-- opendm/types.py | 13 ++++++------- tests/test_odm.py | 2 +- 6 files changed, 11 insertions(+), 38 deletions(-) delete mode 100644 SuperBuild/cmake/External-LASzip.cmake diff --git a/README.md b/README.md index 7495cc03d..598e2ac81 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ When the process finishes, the results will be organized as follows: |-- texture_N.jpg # Associated textured images used by the model |-- odm_georeferencing/ |-- odm_georeferenced_model.ply # A georeferenced dense point cloud - |-- odm_georeferenced_model.laz # LAZ format point cloud + |-- odm_georeferenced_model.ply.laz # LAZ format point cloud |-- odm_georeferenced_model.csv # XYZ format point cloud |-- odm_georeferencing_log.txt # Georeferencing log |-- odm_georeferencing_transform.txt# Transform used for georeferencing diff --git a/SuperBuild/CMakeLists.txt b/SuperBuild/CMakeLists.txt index d559a410f..1aee12c36 100644 --- a/SuperBuild/CMakeLists.txt +++ b/SuperBuild/CMakeLists.txt @@ -124,7 +124,6 @@ set(custom_libs OpenGV CMVS Catkin Ecto - LASzip PDAL MvsTexturing ) diff --git a/SuperBuild/cmake/External-LASzip.cmake b/SuperBuild/cmake/External-LASzip.cmake deleted file mode 100644 index 1cea47888..000000000 --- a/SuperBuild/cmake/External-LASzip.cmake +++ /dev/null @@ -1,26 +0,0 @@ -set(_proj_name laszip) -set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}") - -ExternalProject_Add(${_proj_name} - DEPENDS - PREFIX ${_SB_BINARY_DIR} - TMP_DIR ${_SB_BINARY_DIR}/tmp - STAMP_DIR ${_SB_BINARY_DIR}/stamp - #--Download step-------------- - DOWNLOAD_DIR ${SB_DOWNLOAD_DIR} - URL https://github.com/LASzip/LASzip/releases/download/3.2.2/laszip-src-3.2.2.tar.gz - #--Update/Patch step---------- - UPDATE_COMMAND "" - #--Configure step------------- - SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name} - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR} - #--Build step----------------- - BINARY_DIR ${_SB_BINARY_DIR} - #--Install step--------------- - INSTALL_DIR ${SB_INSTALL_DIR} - #--Output logging------------- - LOG_DOWNLOAD OFF - LOG_CONFIGURE OFF - LOG_BUILD OFF -) diff --git a/SuperBuild/cmake/External-PDAL.cmake b/SuperBuild/cmake/External-PDAL.cmake index 685f1913f..7a9198047 100644 --- a/SuperBuild/cmake/External-PDAL.cmake +++ b/SuperBuild/cmake/External-PDAL.cmake @@ -2,13 +2,14 @@ set(_proj_name pdal) set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}") ExternalProject_Add(${_proj_name} - DEPENDS hexer laszip + DEPENDS hexer PREFIX ${_SB_BINARY_DIR} TMP_DIR ${_SB_BINARY_DIR}/tmp STAMP_DIR ${_SB_BINARY_DIR}/stamp #--Download step-------------- DOWNLOAD_DIR ${SB_DOWNLOAD_DIR} - URL https://github.com/PDAL/PDAL/releases/download/1.7.2/PDAL-1.7.2-src.tar.gz + URL https://github.com/PDAL/PDAL/archive/e881b581e3b91a928105d67db44c567f3b6d1afe.tar.gz + URL_MD5 cadbadf1c83d69d6525cfffd41473323 #--Update/Patch step---------- UPDATE_COMMAND "" #--Configure step------------- diff --git a/opendm/types.py b/opendm/types.py index dea7eafb6..271660d57 100644 --- a/opendm/types.py +++ b/opendm/types.py @@ -255,18 +255,16 @@ def convert_to_las(self, _file, _file_out, json_file): 'srs': self.projection.srs, 'json': json_file} - # create pipeline file las.json to write odm_georeferenced_model.laz point cloud + # create pipeline file transform.xml to enable transformation pipeline = '{{' \ ' "pipeline":[' \ ' "untransformed.ply",' \ ' {{' \ - ' "type":"writers.las",' \ ' "a_srs":"{srs}",' \ ' "offset_x":"{east}",' \ ' "offset_y":"{north}",' \ ' "offset_z":"0",' \ - ' "compression":"laszip",' \ - ' "filename":"{f_out}"' \ + ' "filename":"transformed.las"' \ ' }}' \ ' ]' \ '}}'.format(**kwargs) @@ -275,7 +273,8 @@ def convert_to_las(self, _file, _file_out, json_file): f.write(pipeline) # call pdal - system.run('{bin}/pdal pipeline -i {json} --readers.ply.filename={f_in}'.format(**kwargs)) + system.run('{bin}/pdal pipeline -i {json} --readers.ply.filename={f_in} ' + '--writers.las.filename={f_out}'.format(**kwargs)) def utm_to_latlon(self, _file, _photo, idx): @@ -476,10 +475,10 @@ def __init__(self, root_path, images_path, gcp_file = None): self.odm_georeferencing_model_obj_geo = 'odm_textured_model_geo.obj' self.odm_georeferencing_xyz_file = io.join_paths( self.odm_georeferencing, 'odm_georeferenced_model.csv') - self.odm_georeferencing_laz_json = io.join_paths( + self.odm_georeferencing_las_json = io.join_paths( self.odm_georeferencing, 'las.json') self.odm_georeferencing_model_las = io.join_paths( - self.odm_georeferencing, 'odm_georeferenced_model.laz') + self.odm_georeferencing, 'odm_georeferenced_model.las') self.odm_georeferencing_dem = io.join_paths( self.odm_georeferencing, 'odm_georeferencing_model_dem.tif') diff --git a/tests/test_odm.py b/tests/test_odm.py index 2604c3155..648a657b3 100644 --- a/tests/test_odm.py +++ b/tests/test_odm.py @@ -136,7 +136,7 @@ def test_georef(self): def test_las_out(self): self.assertTrue(os.path.isfile(os.path.join(self.app.georeferencing.inputs.tree.odm_georeferencing, - "odm_georeferenced_model.laz"))) + "odm_georeferenced_model.ply.las"))) class TestOrthophoto(unittest.TestCase):