Skip to content

Commit

Permalink
Merge pull request #757 from asfadmin/fix-frame-precision
Browse files Browse the repository at this point in the history
Fix float precision error
  • Loading branch information
SpicyGarlicAlbacoreRoll authored Jun 14, 2024
2 parents 91441e3 + 32b849d commit bffd477
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 bffd477

Please sign in to comment.