Conversation
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.
Issue #, if available: n/a
Analytics & Comparison Feature
Adds an analytics sidebar and enhanced globe visualization for viewing aggregate detection statistics, comparing model runs, and interactively filtering features by classification or confidence.
New: Analytics Panel & Charts
AnalyticsPanel— collapsible right-side sidebar toggled from a new button in the top-right, independent of the existingOsmlMenuAnalyticsSummary— per-layer card showing feature count, average confidence, confidence histogram, and classification breakdownConfidenceHistogram— custom SVG bar chart (10 bins, red→green gradient); clickable bins create confidence-range filtersClassificationChart— custom SVG stacked bar showing classification proportions; clickable segments create classification filtersFilterChips— removable filter pills with "Clear all"; filters combine with AND logic and dim non-matching features on the globeComparisonView— side-by-side stats table and spatial overlap summary when exactly two layers are selectedNew: Analytics State & Computation
AnalyticsContext— lightweight React context layered onResourceContext; manages color mode, active filters, selected layers, and memoizedLayerStatsper feature collectionanalyticsCompute.ts— pure functions for confidence histograms, classification aggregation, and polygon/point spatial overlap detection (bounding-box pre-filter + edge-intersection)analyticsExtract.ts— extractsFeatureRecord[]and entity geometries from CesiumGeoJsonDataSource, handling OSMLfeature_classes, nested properties, and multiple classification key conventionsNew: Globe Styling
cesiumStyling.ts— three styling modes applied to Cesium entities in-place:useAnalyticsGlobeStylinghook — single unified effect that sequences base color → comparison overlay → filter highlighting to avoid desyncImproved: Result Loading & Deduplication
ImageRequestModalnow tracksimageNameandmodelNameon request status, skips re-loading imagery layers that already existuseImageRequestResultsdeduplicates result loads byimageName, uses aloadingRefguard against concurrent loads, and builds descriptive layer names (image / model results)modelRunnerHelperuses functionalsetImageRequestStatusupdater to preserve existing data fieldsOther Changes
ResourceContext—FeatureCollectionResourceextended with optionalfilteredFeatureCount,confidenceThreshold, andimageNametypes.ts—ImageRequestDataextended withimageNameandmodelNamestyles.css—.analytics-togglepositioning.gitignore—docs/added (planning docs excluded from repo)Tests
analyticsCompute.test.ts— histogram bucketing, stats aggregation, spatial overlap (polygon intersection, containment, point-in-polygon, non-intersecting)analyticsExtract.test.ts— entity extraction, nested property formats, OSMLfeature_classes, hidden entity visibilitycesiumStyling.test.ts— confidence-to-color gradient, classification palette consistency, clampingChecklist
Before you submit a pull request, please make sure you have the following:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.