Skip to content

Commit

Permalink
Add analysis parameters support to exploration page
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfdsilva committed Dec 12, 2023
1 parent 404043e commit a121e02
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/scripts/components/exploration/analysis-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ export async function requestDatasetTimeseriesData({
const tileEndpointToUse =
datasetData.tileApiEndpoint ?? process.env.API_RASTER_ENDPOINT ?? '';

const analysisParams = datasetData.analysis?.sourceParams ?? {};

const layerStatistics = await Promise.all(
assets.map(async ({ date, url }) => {
const statistics = await concurrencyManager.queue(
Expand All @@ -202,10 +204,10 @@ export async function requestDatasetTimeseriesData({
['analysis', id, 'asset', url, aoi],
async ({ signal }) => {
const { data } = await axios.post(
`${tileEndpointToUse}/cog/statistics?url=${url}`,
`${tileEndpointToUse}/cog/statistics`,
// Making a request with a FC causes a 500 (as of 2023/01/20)
fixAoiFcForStacSearch(aoi),
{ signal }
{ params: { url, ...analysisParams }, signal }
);
return {
date,
Expand Down

0 comments on commit a121e02

Please sign in to comment.