Skip to content
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

Tile API should not return tiles if time_slice is outside dataset bounds #62

Open
abarciauskas-bgse opened this issue Aug 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@abarciauskas-bgse
Copy link
Contributor

abarciauskas-bgse commented Aug 13, 2024

What's happening

Right now if a URL like the following https://prod-titiler-xarray.delta-backend.com/tiles/WebMercatorQuad/1/1/1@1x?url=s3://veda-data-store-staging/Fcmip6-GISS-E2-1-G-tas-kerchunk/Fcombined_CMIP6_daily_GISS-E2-1-G_tas_kerchunk.json&time_slice=2023-09-06T07:00:00.000Z&reference=true&resampling_method=bilinear&variable=tas&colormap_name=coolwarm&rescale=232,312 returns tiles even though the dataset ends in 2014.

Expected behavior

If the time_slice parameter value does not fit in the dataset's temporal extent, the API should return 204 (this is what titiler-cmr does)

@abarciauskas-bgse abarciauskas-bgse added the bug Something isn't working label Aug 13, 2024
abarciauskas-bgse added a commit to NASA-IMPACT/veda-ui that referenced this issue Aug 16, 2024
…pos (#1105)

**Related Ticket:** #1055
### Description of Changes
Simply put, this PR is a small refactoring to create a basic
`RasterPaintLayer` available, which both ZarrTimeseries and
CmrTimeseries use.
* Both CmrTimeseires and ZarrTimeseries were using `ZarrPaintLayer`. It
seems appropriate then to rename `ZarrPaintLayer` to `RasterPaintLayer`
and put it in a separate file.
* Merged common attributes of `Raster`, `Zarr`, and
`CmrTimeseriesPropos` into `BaseTimeseriesProps

### Notes & Questions About Changes
1. Should I create a new issue to remove the Zarr and Cmr layers from
the app/scripts/common/components/mapbox/layers?
2. I noticed that a request is made for tiles even when the selected
date falls outside of the datasets temporal range. Is this the expected
behavior? I raised an issue in titiler-xarray
(developmentseed/titiler-xarray#62) that the
API should not respond with tiles in this case, but also wondering if a
request should be made at all 🤔
* _This is probably something we need to fix in useZarr and useCmr, so
the question is, should we do that in this PR or a new PR? I would
propose a new PR to keep changes as minimal as possible._

### Validation / Testing
I loaded the layers in the deploy preview, used the show/hide and time
slider to make sure all that functionality was working as expected. I
came across the issue described in (2) under Notes & Questions About
Changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant