nasa-gibs / worldview

Interactive interface for browsing global, full-resolution satellite imagery
https://worldview.earthdata.nasa.gov/
Other
704 stars 187 forks source link

Support more zoom levels / time intervals for sub-daily products #610

Closed rboller closed 6 years ago

rboller commented 7 years ago

Subtasks: Implement additional timeline zoom levels (1-minute, 10-minute, 30-minute, 1 hour, etc.)

Overview: The timeline currently supports annual, monthly, daily, and 10-minute products but we need varying interval support for subdaily product. Layers in the not-too-distant future will support ranges of 1, 2, 10-minute + hourly intervals. We need to either make the timeline dynamic by refactoring or define a set ranges to build as selections in the UI (can be done with current timeline).

This ticket and #749 is to enable deeper zooming of the timeline for more precise time selection.

Considerations while working on this issue: Optimize tile requests (#149) so that time slider movements which don't cross a day/month/year boundary won't trigger continuous tile requests for daily/monthly/annual layers. This support was initially completed with the initial sub-daily but will need to be expanded to cover the varying zoom levels / time intervals.

PacoDu commented 6 years ago

I would also be really interested by this feature ! Is there any work around for the moment for using subdaily timed layer from onearth in worldview ?

Benjaki2 commented 6 years ago

@PacoDu Unfortunately there currently is not an easy workaround, it would take a good amount of leg work to customize the timeline into supporting sub-daily.

We plan to start working on sub-daily support this month. Would you be interested in contributing? Are you setting up your own instance of Worldview with your own imagery!?

PacoDu commented 6 years ago

@Benjaki2 I am currently working with worldview and onearth with my own imagery. I may be interested in contributing but for the moment I've spent most of my time on mastering onearth. What about the repo "worldview-components" ? Is this the "timeline v2" ? Do you plan on refactoring worldview with the architecture of worldview-components ?

I took a look at the actual timeline component in worldview repo, and adding sub-daily product management doesn't seem trivial indeed.

Benjaki2 commented 6 years ago

Unfortunately not 😞 @PacoDu

So timeline v2 is going to be created in worldview-components. The idea behind worldview components is to house reusable, dumb components that aren't dependent on the state of the core (though not all the components there at the moment fit that description) so we can remove a lot of spaghetti-JQuery and get developers using components of Worldview for unrelated projects.

We are working right now to migrate the core to es6 with module loaders (#503) but the general state management and underlying architecture will mostly stay the same until we start implementing the A|B comparison (#107) feature which will require major adjustments to the general architecture.

Benjaki2 commented 6 years ago

@PacoDu How soon do you need to get this up and running? We should be able to start focusing our energy on this feature by early January and I envision it taking ~3-4 weeks to implement :crossed_fingers:. Does that timeframe work for you? Would you be interested in working with us at that time?

PacoDu commented 6 years ago

@Benjaki2 I'm working at EXWEXs, a french startup that process satellite imagery and products. We need sub-daily product as soon as possible because we are processing imagery every 15min (and 5min soon). I'm interested and will be available to work with you on sub-daily product implementation !

What a nice feature for A|B comparison :smiley:.

Benjaki2 commented 6 years ago

Awesome @PacoDu! EXWEXs looks like a great initiative and we are excited to hear you're interested in the A|B Feature !

As a starting point, I was planning to base the component loosely off of this package: https://github.com/commodityvectors/d3-timeline When we start working on this issue, we will be sure to ping you!

Benjaki2 commented 6 years ago

@PacoDu We had a hard deadline to meet so we hard-coded 10min increments into worldview on this branch: https://github.com/nasa-gibs/worldview/tree/subdaily-timeline . We are still in the process of debugging but this should give you a good a place to start if you are still interested in getting down to 15min increments. We still plan to make it dynamic but I'm not sure exactly when we will get to it.

PacoDu commented 6 years ago

@Benjaki2 Awesome ! Thanks a lot i'll check this as soon as possible ;)

PacoDu commented 6 years ago

I've tested subdaily layers with 10min increment (2017-01-01 at 12:10:00 / 12:20:00 / 12:30:00) and it works :) thanks !

What is the reason of the hardcoded 10min ? Is it due to timeline tick drawing ? or there is something else ?

ZachTRice commented 6 years ago

@PacuDu, that's great to hear!

There are no technical limitations in the timeline to prevent one from changing the 10-minute hard-coded values to 1, 5, 15 minute intervals. In fact, 1 minute intervals are probably easier to work with since you don't need to divide / round / create special utilities to handle 10-minute intervals.

The reason we chose 10-minute intervals now was to support a field team testing 10-minute layers as soon as possible. Also, we are looking to switch out the D3 library powering this timeline and build a timeline with react. So, we didn't want to spend a lot of time creating variable intervals or an hour zoom level with this version when we will be able to handle it much better in the next version.

PacoDu commented 6 years ago

@ZachTRice Great news for the new timeline module with React. I'll just tweak the timeline to support 1min inc so :) Thanks !

I tried to switch to 1min intervals, it's working but I haven't found every hardcoded values. For example I have to set the date manually, minute arrow still have a 10min increment. Could you give some hints for the location of all the hardcoded value of 10min ?

I've pushed the 1min subdaily on our repository if someone is interested in 1min increment: subdaily-timeline-1min See https://github.com/EXWEXs/worldview/commit/43dee7d90f407670dec5289b111718c00a9fc671 for the changes I've made.

PacoDu commented 6 years ago

I found arrow increment in index.html but this doesn't seem enough the date is "jumping" sometimes when I click on the arrow.

EDIT: disabling the snap feature from 3ed0274b38d1a55d301bca543d92eb4e0fb05396 resolved the jumpy behavior. Last bug, the selectedDate is not kept if I click on the timeline then click on up/down arrow (selectedDate goes back to the latest date+1min before the click on the timeline)

ZachTRice commented 6 years ago

@PacoDu, awesome! Looks like you have found most of it already but I will pull down your branch and see if there is anything obvious that you might have missed.

There were some changes in the worldview-components as well. You will want to fork our repo and npm link it and make some changes there. The changes in worldview-components adds / removes the minute zoom level to the animation widget and the hour / minute to the star / end date input groups.

ZachTRice commented 6 years ago

@PacoDu You will want to remove the rounding function in these two locations. This effects the dragging and dropping of the timeline pick. https://github.com/EXWEXs/worldview/blob/43dee7d90f407670dec5289b111718c00a9fc671/web/js/date/config.js#L774 https://github.com/EXWEXs/worldview/blob/43dee7d90f407670dec5289b111718c00a9fc671/web/js/date/config.js#L785

PacoDu commented 6 years ago

@ZachTRice Thanks didn't notice this one ! I'll take a look to worldview-components tomorrow.

Do you have any idea for the click then arrow up/down bug that reset to the date before click ? This doesn't happen every time, but most of it.

ZachTRice commented 6 years ago

I'm looking into it. This appears to be present in our current production version but it is more noticeable when traversing subdaily.

ZachTRice commented 6 years ago

Looks like what you are describing and what I am seeing is the same bug reported here: https://github.com/nasa-gibs/worldview/issues/761

@Benjaki2 has a fix in place which should address the problem. He has been waiting on subdaily to be merged into develop so he can rebase his work on top of it.

PacoDu commented 6 years ago

I took a look at #778 the PR for #761 but this one is already merged into subdaily-timeline. I noticed 2 other bug:

Anyway except those 2 bug the 1min version is working :) thanks a lot for this update.

PacoDu commented 6 years ago

These 2 bugs seem to have the same origin (displayed date -1 and missing 1day at the end).

rboller commented 6 years ago

Closing this ticket in favor of the more formal timeline overhaul being managed here: https://github.com/nasa-gibs/worldview/projects/21