Skip to content

Commit 6a57900

Browse files
committed
fix: update how to validate bbox
1 parent 3561039 commit 6a57900

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

cumulus_lambda_functions/lib/uds_db/granules_db_index.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ def __init__(self):
3434

3535
@staticmethod
3636
def to_es_bbox(bbox_array):
37+
# lon = x, lat = y
38+
# lon, lat, lon, lat
39+
# x can be 170 to -170
40+
# 170, 0, -170, 10
3741
minX, minY, maxX, maxY = bbox_array
3842

3943
# Ensure the values are properly sorted
40-
if minX > maxX:
41-
minX, maxX = maxX, minX
44+
# if minX > maxX:
45+
# minX, maxX = maxX, minX
4246
if minY > maxY:
4347
minY, maxY = maxY, minY
4448

@@ -274,3 +278,6 @@ def dsl_search(self, tenant: str, tenant_venue: str, search_dsl: dict):
274278
'hits': result
275279
}
276280
}
281+
282+
283+

tests/integration_tests/test_stage_out_ingestion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def test_03_upload_complete_catalog_role_as_key(self):
233233
"coordinates": [0.0, 0.0]
234234
},
235235
# bbox=[0.0, 0.0, 0.1, 0.1],
236-
bbox=[0.1, 0.1, 0.0, 0.0], # Testing invalid geo-shape
236+
bbox=[170, 20, -170, 10], # Testing invalid geo-shape
237237
datetime=TimeUtils().parse_from_unix(0, True).get_datetime_obj(),
238238
properties={
239239
"start_datetime": "2016-01-31T18:00:00.009057Z",

0 commit comments

Comments
 (0)