Skip to content

3.5.2 hotfix: Imagery Search multi-image selection#289

Open
AlexeyTrekin wants to merge 6 commits into
masterfrom
hotfix/imagery-search-multi-image
Open

3.5.2 hotfix: Imagery Search multi-image selection#289
AlexeyTrekin wants to merge 6 commits into
masterfrom
hotfix/imagery-search-multi-image

Conversation

@AlexeyTrekin
Copy link
Copy Markdown
Member

  • Send every selected image (not just row 0) in cost and create-processing requests via get_search_images_ids
  • Allow combining orbview_* providers (e.g. orbview_msi + orbview_pan) in a single processing when product type is Image; backend OrbviewService dispatches any orbview-prefixed name through the same client
  • Mirror the orbview-family exception in validate_provider_params so the zoom/product-type gate doesn't re-block the same selection
  • duplicate_imagery_search now expands the metadata table and pseudo metadata layer to one row per imageId and selects all rows so cost recalculation fires on the full payload

AlexeyTrekin and others added 6 commits May 26, 2026 13:39
- Send every selected image (not just row 0) in cost and create-processing
  requests via get_search_images_ids
- Allow combining orbview_* providers (e.g. orbview_msi + orbview_pan) in a
  single processing when product type is Image; backend OrbviewService
  dispatches any orbview-prefixed name through the same client
- Mirror the orbview-family exception in validate_provider_params so the
  zoom/product-type gate doesn't re-block the same selection
- duplicate_imagery_search now expands the metadata table and pseudo
  metadata layer to one row per imageId and selects all rows so cost
  recalculation fires on the full payload

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Findings from testing:
- Backend rejects mixed orbview_* providers (orbview_msi + orbview_pan) in a
  single order, so the client-side allowance was wrong. Drop _is_orbview_family
  and the multi-provider exception from both get_search_images_ids and
  validate_provider_params. Multi-image processing remains supported when all
  selected rows share the same provider name (or are all Mosaic).
- Provider minimum-area check needs to operate on the actually-processable
  area (user AOI ∩ union of selected image footprints), not the raw AOI.
  Introduce app_context.processing_aoi, populated by AreaCalculatorService
  with the cropped geometry, and use it as the processing request geometry
  in get_processing_schema (falling back to the raw AOI when no cropping
  was performed).

Tests adjusted: orbview-family allow-cases removed; mixed-provider Image
case now asserts the selection error is raised.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Previously the mismatch was caught only inside get_search_images_ids,
which called dlg.disable_processing_start() as a side effect. That
flashes the error in the UI but does not propagate to
validate_all_processing_params, so update_processing_cost still sent
/cost/v2 with the first provider name and all selected image IDs from
different providers.

Lift the same check into validate_provider_params so the error reaches
the validation chain and both the cost and create-processing requests
are short-circuited.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…request, duplicate fix

- Confirmation dialog now shows "(N images selected)" when more than one row
  is queued in setup_provider_info.
- update_processing_cost short-circuits before any work when billing_type
  is not CREDITS, so /cost calls are skipped under AREA / NONE billing.
- get_processing_schema now guards processing_aoi with explicit
  isNull/isEmpty checks instead of relying on Python truthiness of
  QgsGeometry, which varies across PyQGIS builds. AreaCalculator also
  clears processing_aoi alongside aoi when the layer is reset, so stale
  cropped state can't leak into a later request.
- duplicate_imagery_search rebuilt search_footprints with the raw
  feature.attribute("local_index") value, which the in-memory layer
  stores as a string. The rest of the codebase uses int keys
  (get_local_image_indices casts via int(...)), so every lookup was
  KeyError-ing — that left provider_names empty (no dataProvider in the
  request → backend 400) and made the AOI cropping fall through to
  QgsGeometry() (area displayed as 0). Coerce to int when building the
  dict.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
When the user deselected every row, get_provider_params skipped its
ImagerySearchProvider branch entirely, leaving
imagery_search_provider_instance.image_ids at the value from the prior
selection. validate_provider_params then checked `image_ids == None`,
which is false for the stale list, so validate_all_processing_params
returned no error and update_processing_cost dispatched /cost with
dataProvider=None (no provider_name could be resolved) and the stale
imageIds — backend 400.

Fix:
- Reset image_ids and requires_id on the instance when selectedItems()
  is empty.
- Loosen validate_provider_params to treat the empty list the same as
  None so any path that ends up with no IDs short-circuits the request.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…l params validation; bump to 30s start processing request timeout
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.

1 participant