Skip to content

Multiframe scrubbing improvements#397

Draft
BryonLewis wants to merge 18 commits into
masterfrom
multiframe-scrubbing-improvements
Draft

Multiframe scrubbing improvements#397
BryonLewis wants to merge 18 commits into
masterfrom
multiframe-scrubbing-improvements

Conversation

@BryonLewis

@BryonLewis BryonLewis commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

resolves #126

Done:

  • scripts/Sentinel downloader update
    • Allows for creation of multiple frame single image sentinel raster images
    • Adds some more arguments for downloading and creation of the system
    • Makes it easier to take data outputs and import them into geodatalytics
  • Update the datasets to prevent it from default to 'band:1' when there isn't a source_filter supplied. This was preventing the boston ortho imagery from being automatically recognized as an RGB source because it was injecting 'band: 1' into the request
  • Multiframe data wasn't showing as RGB but as grayscale
    • Sequential rasters were injecting "frame" and also "band" into the style json object so it would modify default django-large-image styling and not allow the automatic RGB imagery to be displayed
    • Added some functions that will split out frame/band parameters to be outside of the style param to prevent this from happening.
  • RasterFramePreview Model
    • Foreign key to layer_style and layer_frame
    • holds the width/height/bounds and a status for the frame preview
    • S3FileField reference of the image preview
    • deletes on cascade for frame or layer style deletion, also deletes S3/MinIO ref using signals
  • core/raster_style.py - used to generate a django-large-image compatible style object from the LayerStyle model stored in the db
    • similar to the client side tool used to convert the layerStyle results into a tileURL queury that supports the style json structure for large image
    • Needs to handle frame outside of style to prevent RGB images from being grayscale
  • tasks/frame_preview.py - the task to generate the previews for a layer style
    • uses raster_style.py to create a style and passes to the django-large-image thumbnail for each frame
    • saves the resulting image as a RasterFramePreview Row
    • Some configuration for min/max resolution and resolution scaling, keeps the preview between 1k to 4k resolution.
  • Client Side Frame Previews
    • Endpoint Data
      • both /layer and /layer-style will return a list of framePreviews for the current frame.
      • This data contains a bounds, width, height and presigned URL for the preview frame
    • Logic
      • User changes frame
      • layerStore.updateLayersShown is called
      • styleStore.updateLayerStyles
      • framePreviewStore.showPreviewThenTiles
        • hide tile layer by setting opacity to 0,
        • show the preview image
        • wait for tile source to be loaded
        • crossfade image preview and tile source once loaded
        • preload next frame
    • utils/framePreviewLayer.ts - Used to manage the frame preview layer as well as waiting for loading of the tile and handling transition of the preview layer to the tile layer
      • upsertPreviewLayer - fetchs the preview URL, adds/updates a source + raster layer
      • hidePreviewLayer - set visiblity to none when transitioning
      • removePreviewLayer - remove layer and source for a frame
      • removePreviewLayersExcept - keeps only specified frame for adjacent preloaded
      • waitForRasterSourceLoaded - waits for eral tile source to finish loading (with an X second timeout)
    • framePreviewStore
      • Used as a store to manage the frame previews for a layer including prefetching and the
      • Main Functionality
        • prefetchLayerPreviews - Will preload all images for faster transition to the layer
        • dismissPreviewForLayer - prevent displaying previews when in layer style editing mode
        • showPreviewThenTiles - this will transition to the

TODO:

  • Updating/New styles
    • On styles being modified or new styles added need to generate new preview images
    • task needs to be generated
    • Need a warning to the user that previews will take a small amount of time to generate
  • refresh preview after style save and regenerated previews
    • Maybe use websocket notification for when styles are updated telling the client to update and recache the images
  • test multiple styles
  • add in the node animation output layer for frame scrubbing as well

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 5, 2026

Copy link
Copy Markdown

Deploying geodatalytics with  Cloudflare Pages  Cloudflare Pages

Latest commit: ff89a0b
Status: ✅  Deploy successful!
Preview URL: https://ffed0db9.geodatalytics.pages.dev
Branch Preview URL: https://multiframe-scrubbing-improve.geodatalytics.pages.dev

View logs

@BryonLewis BryonLewis force-pushed the multiframe-scrubbing-improvements branch from bb34a8b to aa64e06 Compare June 5, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Layer Frame Preloading

1 participant