-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Titiler-cmr layer #1001
Titiler-cmr layer #1001
Conversation
✅ Deploy Preview for veda-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Will address linting and ts-check later today |
Checks are passing but unsure about the changes in style-generators and why it seems like there is duplication of files there. Would love to pair with UI team member(s) to review! |
@abarciauskas-bgse thanks for detailed description and for the explanation on #1000. I dont mind campfiring on this together for review! It will be more interactive though since I haven't worked with the style-generators much. I'm guessing the duplication of files may be related to this past PR #805 (specifically maybe this commit 0b2dece) |
@abarciauskas-bgse the veda dashboard team is also working on deprecating the |
@@ -0,0 +1,114 @@ | |||
import { useEffect, useMemo } from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 : We are working to deprecate this path. The new path for this logic should go under /common/map/
. I believe you would want to migrate this over to /common/map/style-generators/
.
interface STACforCMRResponseData { | ||
collection_concept_id: string; | ||
renders: Record<string, any>; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder 🤔 if the backend team has json schemas we could generate into typescript interfaces to import, interested.. I'll follow up with them on this
let tileParams = { | ||
concept_id: data.collection_concept_id, | ||
datetime: date, | ||
...sourceParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 : This matches the naming of local state variable, can we change the name so it isn't confusing.
@@ -38,11 +43,19 @@ export function useZarr({ id, stacCol, stacApiEndpointToUse, date, onStatusChang | |||
controller | |||
}); | |||
|
|||
setAssetUrl(data.assets.zarr.href); | |||
const tileParams = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 : This matches the local state variable's name, can we change this so it isn't confusing? Or i'd just set state directly with the object like so...
if (data.assets.zarr.href) {
setTileParams({
url: data.assets.zarr.href,
time_slice: date,
...sourceParams
});
}
just a update that I am making some changes based on discussion with @sandrahoang686 (to use the new map component, to fix conflicts and to fix some variable naming). so will move this to draft until that is done and this is ready for review again. |
Can you also provide details on how the temporal extent/summaries should be handled? @abarciauskas-bgse I remember we briefly talked about this before, but it's been a while. We are currently shimming the end date to the current day, and density to DAY if the data is missing the density & temporal extent's end date. Is this still the case? (https://github.com/NASA-IMPACT/veda-ui/blob/main/app/scripts/components/exploration/hooks/use-stac-metadata-datasets.ts) |
@hanbyul-here in a word, yes that is what we are still doing. In more detail:
I noticed the same logic is used in fetchLayerById. |
Closing to propose a new design for different layer types |
Related Ticket: #1000
Description of Changes
Application code changes - necessary changes
titiler-cmr
and renames thecmr
type tocmr-stac
for disambiguation (although it is sure to be a bit confusing, since cmr-stac is for the use case of using the CMR STAC catalog and titiler-cmr is for the use case of tiling data in CMR but those requests are setup via collection records catalogued in VEDA STAC)useTitilerCMR
. Because this third hook needs to return tiling parameters besides assetUrl, refactor the other hooks to also return a tileParams dictionary.Application code - optional changes, simplifying some things
MapLayerRasterTimeseriesProps
since the only thing that seemed to separate these types wasassetUrlReplacements
. This change is not strictly necessary for this functionality to work but it seemed to simplify things IMO.null
as the second datetime value in the temporal extent to indicate ongoing collections. This is the declared way to do so in the STAC collection specification, so it seems valid to me to allow for all non-vector collections to set the end datetime to the current date if it is null in the metadata.Dataset changes
Notes & Questions About Changes
I would be happy to go over these changes with one or more of the core UI developers.
Validation / Testing
I tested these changes by opening up all of the mock datasets explore pages.