Skip to content

Commit

Permalink
Merge pull request #115 from daviddemeij/master
Browse files Browse the repository at this point in the history
Avoid error in plys_to_dsm when there are no points in cloud.ply
  • Loading branch information
gfacciol authored Mar 16, 2022
2 parents a5e4ed2 + 42dec23 commit a1daee5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions s2p/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,9 @@ def plys_to_dsm(tile):
# compute the point cloud x, y bounds
points, _ = ply.read_3d_point_cloud_from_ply(os.path.join(tile['dir'],
'cloud.ply'))
if len(points) == 0:
return

xmin, ymin, *_ = np.min(points, axis=0)
xmax, ymax, *_ = np.max(points, axis=0)

Expand Down

0 comments on commit a1daee5

Please sign in to comment.