Skip to content

Commit

Permalink
2154
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelDaab committed Dec 12, 2023
1 parent f929435 commit 5697b05
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions myria3d/pctl/dataset/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,17 @@ def get_pdal_reader(las_path: str, epsg: str) -> pdal.Reader.las:
override_srs=f"EPSG:{epsg}",
)

if 'srs' in get_metadata(las_path)['metadata']['readers.las'] and \
'compoundwkt' in get_metadata(las_path)['metadata']['readers.las']['srs'] and \
get_metadata(las_path)['metadata']['readers.las']['srs']['compoundwkt']:
# read the lidar file with pdal default
return pdal.Reader.las(filename=las_path)
# if 'srs' in get_metadata(las_path)['metadata']['readers.las'] and \
# 'compoundwkt' in get_metadata(las_path)['metadata']['readers.las']['srs'] and \
# get_metadata(las_path)['metadata']['readers.las']['srs']['compoundwkt']:
# # read the lidar file with pdal default
# return pdal.Reader.las(filename=las_path)

if 'srs' in get_metadata(las_path)['metadata']['readers.las']:
if 'compoundwkt' in get_metadata(las_path)['metadata']['readers.las']['srs']:
if get_metadata(las_path)['metadata']['readers.las']['srs']['compoundwkt']:
# read the lidar file with pdal default
return pdal.Reader.las(filename=las_path)

raise Exception("No EPSG provided, neither in the lidar file or as parameter")

Expand Down

0 comments on commit 5697b05

Please sign in to comment.