-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Description
STAC item-search API explicitly allows 3D coordinates for bbox search parameter:
bbox Represented using either 2D or 3D geometries. The length of the array must be 2*n where n is the number of dimensions
This is implemented in pgstac backend:
async def test_bbox_3d(load_test_data, app_client, load_test_collection):
# ...
australia_bbox = [106.343365, -47.199523, 0.1, 168.218365, -19.437288, 0.1]
params = {
"bbox": australia_bbox,
"collections": [coll["id"]],
}
resp = await app_client.post("/search", json=params)
assert resp.status_code == 200But not in stac-fastapi where only 2D coordinates are enforced in str2bbox method:
def str2bbox(x: str) -> Optional[BBox]:
"""Convert string to BBox based on , delimiter."""
if x:
t = tuple(float(v) for v in str2list(x))
assert len(t) == 4, f"BBox '{x}' must have 4 values."
return t
return Nonevincentsarago
Metadata
Metadata
Assignees
Labels
No labels