Skip to content

Improve error message raised by str2bbox function #831

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
vincentsarago opened this issue Apr 22, 2025 · 0 comments · May be fixed by #835
Open

Improve error message raised by str2bbox function #831

vincentsarago opened this issue Apr 22, 2025 · 0 comments · May be fixed by #835

Comments

@vincentsarago
Copy link
Member

def str2bbox(x: str) -> Optional[BBox]:
"""Convert string to BBox based on , delimiter."""
if x:
t = tuple(float(v) for v in x.split(","))
assert len(t) in [4, 6], f"BBox '{x}' must have 4 or 6 values."
return t
return None

ref stac-utils/stac-fastapi-geoparquet#10

@vincentsarago vincentsarago linked a pull request Apr 28, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant