-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**Related Ticket:** #1056 ### Description of Changes This change was actually relatively straightforward. Titiler-cmr handles the business of searching CMR for which assets to tile, which means that logic no longer needs to exist in veda-ui. We can just pass the concept id and other parameters directly to titiler-cmr. The asset discovery logic _was_ happening in the useCmr hook which searched [CMR STAC endpoints](https://cmr.earthdata.nasa.gov/stac) (endpoints plural because there are different catalogues for different DAACs) for data. This was especially messy given the S3 urls are not in the CMR STAC item representations, so we had to replace an https protocol and host with the S3 protocol and bucket name. Itemized changes: * Remove useCmr hook * Change parameterization to RasterPaintLayer to make the url optional: titiler-xarray requires a url parameter, whereas titiler-cmr does not. * Removed TRMM layer as this dataset is not yet in VEDA STAC (necessary to be included in the dashboard) ### Notes * dev-titiler-xarray.delta-backend.com uses `datetime` which is consistent with titiler-cmr, however this change has not yet been deployed to prod-titiler-xarray.delta-backend.com. ### Validation / Testing [Loaded and toggled both layers in the deploy preview](https://deploy-preview-1131--veda-ui.netlify.app/exploration?datasets=%5B%7B%22id%22%3A%22GPM_3IMERGDF.v07%22%2C%22settings%22%3A%7B%22isVisible%22%3Afalse%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22mean%22%2C%22label%22%3A%22Average%22%2C%22chartLabel%22%3A%22Average%22%2C%22themeColor%22%3A%22infographicB%22%7D%2C%7B%22id%22%3A%22std%22%2C%22label%22%3A%22St+Deviation%22%2C%22chartLabel%22%3A%22St+Deviation%22%2C%22themeColor%22%3A%22infographicD%22%7D%5D%7D%7D%2C%7B%22id%22%3A%22combined_CMIP6_daily_GISS-E2-1-G_tas_kerchunk_DEMO%22%2C%22settings%22%3A%7B%22isVisible%22%3Atrue%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22mean%22%2C%22label%22%3A%22Average%22%2C%22chartLabel%22%3A%22Average%22%2C%22themeColor%22%3A%22infographicB%22%7D%2C%7B%22id%22%3A%22std%22%2C%22label%22%3A%22St+Deviation%22%2C%22chartLabel%22%3A%22St+Deviation%22%2C%22themeColor%22%3A%22infographicD%22%7D%5D%7D%7D%5D&taxonomy=%7B%7D&search=&date=2006-12-22T08%3A00%3A00.000Z)
- Loading branch information
Showing
8 changed files
with
114 additions
and
175 deletions.
There are no files selected for viewing
23 changes: 7 additions & 16 deletions
23
app/scripts/components/common/map/style-generators/cmr-timeseries.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
import React from 'react'; | ||
import { CMRTimeseriesProps } from '../types'; | ||
import { RasterPaintLayer } from './raster-paint-layer'; | ||
import { useCMR } from './hooks'; | ||
|
||
export function CMRTimeseries(props: CMRTimeseriesProps) { | ||
const { | ||
id, | ||
stacCol, | ||
stacApiEndpoint, | ||
date, | ||
assetUrlReplacements, | ||
onStatusChange, | ||
} = props; | ||
import { BaseTimeseriesProps } from '../types'; | ||
import { RasterPaintLayer } from './raster-paint-layer'; | ||
|
||
const stacApiEndpointToUse = stacApiEndpoint?? process.env.API_STAC_ENDPOINT; | ||
const assetUrl = useCMR({ id, stacCol, stacApiEndpointToUse, date, assetUrlReplacements, stacApiEndpoint, onStatusChange }); | ||
return <RasterPaintLayer {...props} assetUrl={assetUrl} />; | ||
} | ||
export function CMRTimeseries(props: BaseTimeseriesProps) { | ||
const { date, sourceParams } = props; | ||
const tileParams = { datetime: date, ...sourceParams }; | ||
return <RasterPaintLayer {...props} tileParams={tileParams} generatorPrefix='cmr-timeseries' />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.