Skip to content

Commit 13cc195

Browse files
Order clockwise does not always apply to a bounding box. Move units strip to directly on the bounding box
1 parent cbcd517 commit 13cc195

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

gwcs/wcs/_wcs.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,6 @@ def footprint(self, bounding_box=None, center=False, axis_type="all"):
11941194
"""
11951195

11961196
def _order_clockwise(v):
1197-
v = [self._remove_units_input(vv, self.input_frame) for vv in v]
11981197
return np.asarray(
11991198
[
12001199
[v[0][0], v[1][0]],
@@ -1218,7 +1217,9 @@ def _order_clockwise(v):
12181217
bb = np.asarray([b.value for b in bb]) * bb[0].unit
12191218
vertices = (bb,)
12201219
elif all_spatial:
1221-
vertices = _order_clockwise(bb)
1220+
vertices = _order_clockwise(
1221+
[self._remove_units_input(b, self.input_frame) for b in bb]
1222+
)
12221223
else:
12231224
vertices = np.array(list(itertools.product(*bb))).T
12241225

0 commit comments

Comments
 (0)