When viewing raster data in the Dynamic Time Window Scanning, images representing the data are processed and cached to temporary files (%TEMP%\MetVueCache\SessionName_MapWindowName). Once available, these images are loaded from disk and rendered as requested when the user alters the viewed time window. Unlike viewing aggregated grids when animation is disabled, where gridded data is interpolated to the display, these images are cached at the resolution of the underlying data. This may lead to the data appearing more pixelated, but is a direct representation of the underlying data.

Display Coordinate System Considerations

Cached grid data is stored in the data coordinate system, but the cached images are stored in the display coordinate system. In the event that the display coordinate system does not match the data coordinate system, the images are resamples into the display coordinate system. While this enables viewing data in any coordinate system, it leads to the following drawbacks:

  • Creation of images is slower, due to resampling, leading to longer processing time
  • Due to resampling, the image is not a perfect representation of the data, as there is data loss

Background Caching of Images

Background caching of images is performed to have the image ready when it is requested to be drawn. The process for background loading is a 3 step process:

  1. Get the current time window length. Identify all time windows that can be viewed with that time window length. Render and cache all images, sequentially in time.
    1. For example, consider the scenario where a day of hourly data is loaded, and the first two hours are currently rendered. The images will be rendered and cached in the background for hours 2-3, 3-4, 4-5, ..., 22-3, 23-24.
  2. Get the start date for the current time window. Identify all time windows that can be viewed that have this start date. Render and cache all images, ordered by increasing duration.
    1. For example, consider the scenario where a day of hourly data is loaded, and the hours 11-15 are currently rendered. The images will be rendered and cached in the background for hours 11, 11-12, 11-13, 11-14, ..., 11-23, 11-24.
  3. Get the end date for the current time window. Identify all time windows that can be viewed that have this end date. Render and cache all images, ordered by increasing duration.
    1. For example, consider the scenario where a day of hourly data is loaded, and the hours 11-15 are currently rendered. The images will be rendered and cached in the background for hours 15, 14-15, 13-15, 12-15, ..., 2-15, 1-15.

User notifications of image caching is provided in the cache status message and directly in the dynamic time window slider. The cache status message can be "Buffering animation...", "Buffering durations...", and "Buffering complete". "Buffering animation..." corresponds to item 1 above. "Buffering durations..." corresponds to items 2 and 3 above. When images are being cached in the background, the viewable range of images will be highlighted in green, as shown in the figure below. In this image, note that the slider bar is partially highlighted in green. In this case, the animation images are being cached which means all images are available when playing, or sliding the view time window, until the right thumb goes beyond the highlighted region of the slider bar.

Alternatively, when the durations are being cached, the highlighting shows the available images for moving the start/end time. In the figure below, the right thumb can be dragged anywhere in the highlighted region of the slider and still render an image. Note that durations with the given start date are cached before durations with the given end date, and therefore the images are not cached for moving the left thumb in the figure below.

In an attempt to anticipate user interactions, background loading will be kicked off when the view time window is changed. Note the exceptions that background loading will not be kicked off when playing the animation or when the user is actively dragging a component in the slider. Below are notes on when background caching of the images is initiated, and what the targets are:

  • When initially enabling the Dynamic Time Window Scanning Toolbar
    • This kicks off steps 1, 2 and 3 above
  • When playing is paused, or user stops dragging the time window
    • This kicks off steps 2 and 3 above
  • When start date thumb is stopped dragging, or the start date is changed with the text entry field
    • This kicks off step 1 above
  • When end date thumb is stopped dragging, or the start date is changed with the text entry field
    • This kicks off step 1 above

Clearing Cached Images

Cached images need to be cleared when they are no longer needed, or when they will be replaced. The images are deemed unnecessary when the animation is disabled, or the application is closed. Alternatively, the images will need to be reloaded when the display coordinate system or units are changed. In these cases, the cached images will be cleared in preparation for them to be replaced.