radiantearth / stac-api-spec

SpatioTemporal Asset Catalog API specification - an API to make geospatial assets openly searchable and crawlable
http://stacspec.org
Apache License 2.0
220 stars 46 forks source link

POST search requests crashing due to bbox having the same pair of coords #375

Closed ggcr closed 1 year ago

ggcr commented 1 year ago

Hi everyone,

While working with the API, I tried to input as bbox parameter a "window" of 0 size, having then a pair of the same coordinates. This is making the POST request to crash.

Is this intended? If yes, I have not been able to found a parameter for a single-coordinate or kinda similar.

POST /search crashing ❌
@ https://earth-search.aws.element84.com/v0/search
// body
{
  "collections": ["sentinel-s2-l2a-cogs"],
  "bbox": [
    -110,
    39,
    -110,
    39
  ]
}

I used the hacky way of adding a little offset as a quick fix for my use case but I am sure you guys will found a better way! :)

POST /search not crashing ✅
@ https://earth-search.aws.element84.com/v0/search
// body
{
  "collections": ["sentinel-s2-l2a-cogs"],
  "bbox": [
    -110,
    39,
    -110.00001,
    39.00001
  ]
}
philvarner commented 1 year ago

Hi @ggcr,

This issue should be filed against the server implementation that Earth Search uses, https://github.com/stac-utils/stac-server This repository is for the API specification rather than implementations. You may also want to try the /v1 endpoint instead of /v0, as the v0 one is very old and no longer maintained.

philvarner commented 1 year ago

One other thing to add -- if you want to do a point search, you should use the intersects parameter and a GeoJSON Point instead of a bbox.