Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions opendm/dem/ground_rectification/bounds/types.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def __init__(self, points):
[x_min, y_min] = np.amin(points, axis=0)
[x_max, y_max] = np.amax(points, axis=0)
self._corners = (x_min, x_max, y_min, y_max)
self._center = ((x_min + x_max) / 2, (y_min + y_max) / 2)

def keep_points_inside(self, point_cloud):
"""Return a new point cloud with the points from the given cloud that are inside the bounds"""
Expand All @@ -30,8 +31,7 @@ def calculate_mask(self, points):
return self.__delaunay.find_simplex(points) >= 0

def center(self):
(x_min, x_max, y_min, y_max) = self._corners
return ((x_min + x_max) / 2, (y_min + y_max) / 2)
return self._center

def corners(self):
return self._corners
Expand Down