Open
Description
I'm trying to create a seamless cloudless landsat basemap using MosaicJSON. So I'm trying to loop over all cloudless landsat imagery to record it in the MosaicJSON file. When I attempt to do that I get an error saying to use the "scroll api" instead.
{'code': 500,
'description': '[illegal_argument_exception] Result window is too large, from + size must be less than or equal to: [10000] but was [30000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.'}
I've searched the code, searched the API docs, searched issues, and I can't find any reference to a scroll API. Does it exist?
Separately, I tried to use sat-search
but it doesn't give the same number of results as the HTTP API for the same query, namely here it gives 3859 results from search.found()
instead of the 29773 results that the meta
key of the HTTP API says should exist.
Repro code:
from satsearch import Search
import json
import requests
query_str = '{"bbox": [-127.64, 23.92, -64.82, 52.72], "time": "2013-01-01T00:00:00Z/2020-04-01T23:59:59Z", "query": {"eo:sun_elevation": {"gt": 0}, "landsat:tier": {"eq": "T1"}, "collection": {"eq": "landsat-8-l1"}, "eo:cloud_cover": {"gte": 0, "lt": 10}, "eo:platform": {"eq": "landsat-8"}}, "sort": [{"field": "eo:cloud_cover", "direction": "asc"}]}'
query = json.loads(query_str)
url = 'https://sat-api.developmentseed.org/stac/search'
headers = {
"Content-Type": "application/json",
"Accept-Encoding": "gzip",
"Accept": "application/geo+json", }
data = requests.post(url, headers=headers, json=query).json()
data['meta']['found']
# 29773
search = Search(**query)
search.found()
# 3859
Am I missing something, or why do these identical queries return different numbers of results?
Metadata
Metadata
Assignees
Labels
No labels