surface the new analysis caveats in the workbench

The backend now says when a result covers a different area than was drawn, or
when a score belongs to one confidence cut only. None of that helps an
operator while it stays in the response body.

- the raster selection adapters carry the model-coverage and widened-cell
  warnings into the map panel and mark the result an estimate when either
  applies, so an existing warning slot renders them;
- the map workspace shows the selection-edge disclosure next to the object
  count;
- the detection panel shows average precision and the F1-optimal threshold
  beside the single-threshold figures, and the box-versus-footprint
  interpretation when candidates are detector boxes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Jens
2026-08-22 14:33:54 +02:00
co-authored by Claude Opus 5
parent 23d6e0372b
commit b146b2143d
8 changed files with 208 additions and 7 deletions
+53 -1
View File
@@ -505,6 +505,8 @@ export interface TerrainSelectionResponse {
sample_count: number
slope_sample_count: number
coverage_ratio: number
/** Set when the selection was finer than one source cell and widened. */
cell_selection_warning?: string | null
resolution_m: number
vertical_reference: string
summary: {
@@ -558,8 +560,14 @@ export interface FloodHazardSelectionResponse {
selection_bbox: VectorSelectionBBox
selection_area_id?: string | null
selected_cell_count: number
/** Cells the flood model actually covers inside the selection. */
valid_cell_count?: number
no_data_cell_count?: number
data_coverage_ratio?: number
inundated_cell_count: number
inundated_fraction: number
/** Share of the *modelled* cells; null when nothing was modelled. */
inundated_fraction: number | null
coverage_warning?: string | null
resolution_m: number
summary: {
metric_label: string
@@ -633,6 +641,8 @@ export interface BathymetryRasterSelectionResponse {
selected_cell_count: number
valid_cell_count: number
coverage_ratio: number
/** Set when the selection was finer than one source cell and widened. */
cell_selection_warning?: string | null
resolution_m: number
vertical_reference: 'mDNG'
survey_period: string
@@ -690,6 +700,8 @@ export interface ThematicRasterSelectionResponse {
selected_cell_count: number
valid_cell_count: number
coverage_ratio: number
/** Set when the selection was finer than one source cell and widened. */
cell_selection_warning?: string | null
resolution_m: number
observation_year: number
summary: {
@@ -749,7 +761,14 @@ export interface VectorSelectionSummary {
metric_unit: string
aggregation_method: string
primary_metric_key?: string | null
/**
* Whole features touching the selection. Area and length metrics clip to the
* selection, so these two fields say how far the populations diverge.
*/
feature_count: number
fully_covered_feature_count?: number | null
partially_covered_feature_count?: number | null
selection_edge_warning?: string | null
is_estimate: boolean
warning?: string | null
metrics?: VectorSelectionMetric[]
@@ -1435,6 +1454,9 @@ export interface DetectionQaResult {
canonical_method: string
diagnostic_method: string
iou_threshold: number
/** Whether the candidates are detector boxes or true footprint polygons. */
candidate_geometry_mode?: string
interpretation?: string
strict_matches: number
envelope_matches: number
possible_box_to_footprint_mismatch_count: number
@@ -1444,7 +1466,37 @@ export interface DetectionQaResult {
envelope_recall?: number | null
envelope_f1_score?: number | null
envelope_mean_iou?: number | null
envelope_precision_recall_curve?: PrecisionRecallCurve
}
precision_recall_curve?: PrecisionRecallCurve
}
/**
* Threshold-independent view of a detection run: precision and recall at every
* confidence value that occurs, so two models can be compared without both
* being read at one arbitrary cut.
*/
export interface PrecisionRecallCurve {
iou_threshold: number
reference_count: number
candidate_count: number
average_precision: number
best_f1: number
best_f1_threshold: number | null
best_f1_precision?: number | null
best_f1_recall?: number | null
points: PrecisionRecallPoint[]
}
export interface PrecisionRecallPoint {
confidence_threshold: number
candidate_count: number
true_positives: number
false_positives: number
false_negatives: number
precision: number
recall: number
f1_score: number
}
export type SegmentationModelCapability = DetectionModelCapability