From f1bfc9fec0f29f33a03d9e189e4a1704ccfd3f12 Mon Sep 17 00:00:00 2001 From: Willem Dantuma Date: Tue, 26 May 2020 17:19:07 +0200 Subject: [PATCH] Add confidence interval --- .../fm-map/components/legend/legend.component.html | 14 ++++++-------- .../fm-map/components/legend/legend.component.ts | 4 ++++ projects/common-map/src/fm-map/models/color.map.ts | 3 ++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.html b/projects/common-map/src/fm-map/components/legend/legend.component.html index 3815a75..7761a3d 100644 --- a/projects/common-map/src/fm-map/components/legend/legend.component.html +++ b/projects/common-map/src/fm-map/components/legend/legend.component.html @@ -25,14 +25,12 @@ - - - + + + + Confidence interval:{{layer.renderer.band.histogram.confidence * 100| number:'1.0-0'}} + + diff --git a/projects/common-map/src/fm-map/components/legend/legend.component.ts b/projects/common-map/src/fm-map/components/legend/legend.component.ts index 3067fed..a323ac2 100644 --- a/projects/common-map/src/fm-map/components/legend/legend.component.ts +++ b/projects/common-map/src/fm-map/components/legend/legend.component.ts @@ -86,6 +86,10 @@ export class LegendComponent implements OnInit,AfterViewInit { showHistogram(): boolean { return this.histogramenabled && this.layer.renderer.band.histogram.entries && this.layer.renderer.band.histogram.entries.length > 0 && this.layer.renderer.colorMap.colormapType == "minmax"; } + + showConfidenceInterval():boolean { + return this.histogramenabled && this.layer.renderer.band.histogram.confidence != null && this.layer.renderer.band.histogram.confidence != 1; + } } diff --git a/projects/common-map/src/fm-map/models/color.map.ts b/projects/common-map/src/fm-map/models/color.map.ts index caa9642..ed7438c 100644 --- a/projects/common-map/src/fm-map/models/color.map.ts +++ b/projects/common-map/src/fm-map/models/color.map.ts @@ -22,7 +22,8 @@ export interface IHistogram { mean: number, stddev: number, classes: number, - entries: IHistogramEntry[] + entries: IHistogramEntry[], + confidence?: number; } export interface IGradientstop {