Merge pull request #953 from pierotofy/pclas

Added --pc-las flag
pull/955/head
Piero Toffanin 2019-02-22 22:04:40 -05:00 zatwierdzone przez GitHub
commit 368cf65898
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
3 zmienionych plików z 18 dodań i 2 usunięć

Wyświetl plik

@ -300,7 +300,7 @@ def config():
metavar='<string>',
default='none',
choices=['none', 'smrf', 'pmf'],
help='Classify the .LAS point cloud output using either '
help='Classify the point cloud outputs using either '
'a Simple Morphological Filter or a Progressive Morphological Filter. '
'If --dtm is set this parameter defaults to smrf. '
'You can control the behavior of both smrf and pmf by tweaking the --dem-* parameters. '
@ -311,6 +311,11 @@ def config():
action='store_true',
default=False,
help='Export the georeferenced point cloud in CSV format. Default: %(default)s')
parser.add_argument('--pc-las',
action='store_true',
default=False,
help='Export the georeferenced point cloud in LAS format. Default: %(default)s')
parser.add_argument('--texturing-data-term',
metavar='<string>',

Wyświetl plik

@ -374,6 +374,8 @@ class ODM_Tree(object):
self.odm_georeferencing, 'las.json')
self.odm_georeferencing_model_laz = io.join_paths(
self.odm_georeferencing, 'odm_georeferenced_model.laz')
self.odm_georeferencing_model_las = io.join_paths(
self.odm_georeferencing, 'odm_georeferenced_model.las')
self.odm_georeferencing_dem = io.join_paths(
self.odm_georeferencing, 'odm_georeferencing_model_dem.tif')

Wyświetl plik

@ -161,7 +161,16 @@ class ODMGeoreferencingCell(ecto.Cell):
"--writers.text.keep_unspecified=false ".format(
tree.odm_georeferencing_model_laz,
tree.odm_georeferencing_xyz_file))
# LAS point cloud output
if args.pc_las:
log.ODM_INFO("Creating geo-referenced LAS file")
system.run("pdal translate -i \"{}\" "
"-o \"{}\" ".format(
tree.odm_georeferencing_model_laz,
tree.odm_georeferencing_model_las))
if args.crop > 0:
log.ODM_INFO("Calculating cropping area and generating bounds shapefile from point cloud")
cropper = Cropper(tree.odm_georeferencing, 'odm_georeferenced_model')