Multiframe scrubbing improvements#397
Draft
BryonLewis wants to merge 26 commits into
Draft
Conversation
Deploying geodatalytics with
|
| Latest commit: |
ff89a0b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ffed0db9.geodatalytics.pages.dev |
| Branch Preview URL: | https://multiframe-scrubbing-improve.geodatalytics.pages.dev |
bb34a8b to
aa64e06
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #126
Summary
Improves multiframe raster scrubbing by fixing RGB detection for sequential rasters, adding server-generated frame preview images, and crossfading from preview to tiles on the client for smoother frame transitions.
Done
Sentinel downloader (
scripts/sentinelDownload/)--single-file(usesgdal_translateto append frames as subdatasets)Dataset / RGB fixes
band:1injection removed when nosource_filteris supplied — this was preventing Boston ortho imagery from being recognized as RGBband:1is still applied when explicitly defined in the style specframeandbandare extracted from the style JSON and passed as separate query parameters (outsidestyle) so django-large-image can auto-detect RGB imageryRasterFramePreviewmodelLayerStyleandLayerFrame(unique per style/frame pair)width,height, georeferencedbounds, and an S3 preview imagestatus:creating|regenerating|complete|failedstyle_fingerprint(sha256ofrepr_style_configs()) guards against stale concurrent generationpost_deletesignaluvdat/core/frame_previews/raster_style.py- Builds django-large-image–compatible style objects fromLayerStyleDB records; keepsframe/bandoutsidestylepreview_regeneration.py- Marks previews stale, supersedes pending tasks, enqueues Celery regeneration on style save/ingestfingerprint.py- Computes style fingerprint for concurrency controltypes.py- SharedFramePreviewDatatypeuvdat/core/tasks/frame_preview.pyraster_style.pyfor styling; scales resolution to keep previews between ~1k–4kRasterFramePreviewrows with bounds and dimensionsTaskResulton completion (used for future client notification)Preview regeneration on style save
LayerStylecreate/update hooks callinvalidate_and_enqueue_previews()regeneratingstatus=completepreviews with an image are serialized to the APIAPI
/layers/and/layer-styles/returnmultiframe_previews— ordered list of{ bounds, width, height, url }per raster frame (presigned S3 URLs)preview_statusaggregated on layer and layer-style:ready|generating|notready(omitted when N/A)Client-side frame previews
Flow
layerStore.updateLayersShownstyleStore.updateLayerStylesframePreviewStore.showPreviewThenTilesraster-opacity: 0)web/src/utils/framePreviewLayer.tsupsertPreviewLayer— fetch preview URL, add/update MapLibre source + raster layerhidePreviewLayer— set visibility tononeduring transitionremovePreviewLayer/removePreviewLayersExcept— cleanup; keep adjacent preloaded frameswaitForRasterSourceLoaded— poll until tile source is ready (with timeout)fadeRasterOpacities— animated crossfade between preview and tile layersweb/src/store/framePreview.tsprefetchLayerPreviews— preload all preview images for a layershowPreviewThenTiles— main preview → tile transition orchestrationdismissPreviewForLayer— skip previews while editing layer styles; restore tile opacityStyle editing integration
styleStore.setLayerStyleEditingdismisses previews when entering style edit modeupdateLayerStylesafter exiting edit modeLayerStyle.vuewatches active layer to toggle editing stateTests
uvdat/core/tests/test_frame_preview.py— model serialization, API fields, regeneration hooks, fingerprint guards, raster style helpersTODO
Client refresh after style save
multiframe_previewsfrom client state immediately on style savepreview_statuson the client — fall back to tiles whilegeneratingtask_type: "frame_preview"completion → refetch layer style, prefetch new previews, re-enable transitionsCoverage / polish