Closed leothomas closed 3 years ago
Some thoughts on the design of this feature:
Using the API to find COGs and download them directly from S3 is documented here. These instructions might be confusing to non-technical users, as they require knowledge of REST APIs, the AWS CLI and downloading file objects from the terminal using cURL
or wget
(although I would assume that most people interested in downloading COGs have at least some knowledge of the above topics).
The binary content of the web map tiles generated by the API can be wrapped in a StreamingResponse object, which will be downloaded by most browsers
The source COG should not be downloaded to the user's machine using the same StreamingResponse technique as above, as this would entail loading the entire COG into the lambda's runtime memory. Even using the FileResponse object would require the entire COG to be copied over to the Lambda's runtime environment
I suggest returning an S3 presigned url as a RedictResponse - which should also have the same result of downloading the file in the user's browser.
/timelapse
endpoint)Using the CSV Middleware from the Trace Emissions API we can easily add an accept
header that specifies the text/csv
mimetype as a return type - this will convert the JSON result of the API call into a CSV object which will be returned as a StreamingResponse (and download in most browsers).
This is currently being dealt with on the frontend. Closing this issue.
"Power users" might want to grab data from the dashboard to perform further analysis on. This might be underlying COG's, a jupyter notebook,
.tif
files, or.csv
files corresponding to time series graphs