Skip to content

Commit

Permalink
fix: check for coords missing leading zero
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase committed Jun 13, 2024
1 parent 6d2daf8 commit b7bc781
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SearchAPI/CMR/Input.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ def parse_coord_string(v):
raise ValueError(f'Invalid coordinate: {c}') from e
if len(v) % 2 != 0:
raise ValueError(f'Invalid coordinate list, odd number of values provided: {v}')
for i in range(len(v)):
if float(v[i]) < 1.0 and float(v[i]) > 0.0 :
v[i] = '0' + v[i]
return ','.join(v)

# Parse and validate a bbox coordinate string
Expand Down

0 comments on commit b7bc781

Please sign in to comment.