Skip to content

Commit b3c8904

Browse files
committed
DAS-2437 Update comments from PR review
1 parent 4c91cd8 commit b3c8904

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

hoss/projection_utilities.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,14 @@ def get_projected_x_y_extents(
271271

272272

273273
def get_filtered_points(
274-
points_in_requested_extent: List[Coordinates], granule_extent: BBox
274+
spatial_constraint_pts: List[Coordinates], granule_extent: BBox
275275
) -> List[Coordinates]:
276-
"""Returns lat/lon values clipped to the extent of the granule"""
276+
"""Returns spatial constraint lat/lon values clipped to the spatial
277+
extent of the granule or raises exception if entirely outside
278+
the granule
277279
278-
requested_lons, requested_lats = zip(*points_in_requested_extent)
280+
"""
281+
requested_lons, requested_lats = zip(*spatial_constraint_pts)
279282
# if all the points in the bounding box are outside the granule extent,
280283
if (
281284
np.max(requested_lons) < granule_extent.west
@@ -285,9 +288,9 @@ def get_filtered_points(
285288
):
286289
raise InvalidRequestedRange
287290

288-
# if the bounding box points are enclosing the granule extent,
289-
# clip to the granule extent
290-
# all lon values are clipped within the granule lon extent
291+
# If the spatial constraint encloses the granule extent,
292+
# clip to the granule extent.
293+
# First, all lon values are clipped within the granule lon extent
291294
clipped_lons = np.clip(requested_lons, granule_extent.west, granule_extent.east)
292295

293296
# all lat values are clipped to granule lat extent

0 commit comments

Comments
 (0)