AW-4707
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
This commit is contained in:
parent
c460d31522
commit
98142fab56
@ -31,7 +31,7 @@
|
||||
<td colspan="4" class="pb-1 pt-1">
|
||||
<div class="info" [ngbCollapse]="hideHistogramDetails">
|
||||
<ng-container *ngIf="bandContainsStatistics(); else histogram">
|
||||
<fm-map-statistics-details [statistics]="layer.renderer.band.statistics"></fm-map-statistics-details>
|
||||
<fm-map-statistics-details [statistics]="layer.renderer.band.statistics" [scale]="layer.scale"></fm-map-statistics-details>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #histogram>
|
||||
|
@ -2,23 +2,23 @@
|
||||
<div class="col-8 nopadding"><span i18n>Data points</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.populationCount}}</div>
|
||||
<div class="col-8 nopadding"><span i18n>Min</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.min| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.min)| number:'1.0-2'}}</div>
|
||||
<div class="col-8 nopadding"><span i18n>Max</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.max| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.max)| number:'1.0-2'}}</div>
|
||||
<div class="col-8 nopadding"><span i18n>Min+1</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.minPlus| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.minPlus)| number:'1.0-2'}}</div>
|
||||
<div class="col-8 nopadding"><span i18n>Max-1</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.maxMinus| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.maxMinus)| number:'1.0-2'}}</div>
|
||||
|
||||
<div class="col-8 nopadding"><span i18n>Average</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.mean| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.mean)| number:'1.0-2'}}</div>
|
||||
<div class="col-8 nopadding"><span i18n>Standard deviation</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.stddev| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.stddev)| number:'1.0-2'}}</div>
|
||||
|
||||
<div class="col-8 nopadding"><span i18n>Mode</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.mode| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.mode)| number:'1.0-2'}}</div>
|
||||
<div class="col-8 nopadding"><span i18n>Median</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.median| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.median)| number:'1.0-2'}}</div>
|
||||
|
||||
<div class="col-8 nopadding"><span i18n>Kurtosis</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.curtosis| number:'1.0-2'}}</div>
|
||||
@ -26,11 +26,11 @@
|
||||
<div class="col-4 pull-left nopadding">{{statistics.skewness| number:'1.0-2'}}</div>
|
||||
|
||||
<div class="col-8 nopadding"><span i18n>Variance</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.variance| number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getSquaredScaledValue(statistics.variance)| number:'1.0-2'}}</div>
|
||||
<div class="col-8 nopadding"><span i18n>Coefficient of variation</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.variationCoefficient | number:'1.0-2'}}</div>
|
||||
<ng-container *ngIf="statistics.confidenceIntervalLow !== undefined">
|
||||
<div class="col-8 nopadding">90% <span i18n>Confidence interval</span>:</div>
|
||||
<div class="col-4 pull-left nopadding">{{statistics.confidenceIntervalLow | number:'1.0-2'}} - {{statistics.confidenceIntervalHigh | number:'1.0-2'}}</div>
|
||||
<div class="col-4 pull-left nopadding">{{getScaledValue(statistics.confidenceIntervalLow) | number:'1.0-2'}} - {{getScaledValue(statistics.confidenceIntervalHigh) | number:'1.0-2'}}</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
|
@ -1,16 +1,35 @@
|
||||
import {Component, Input} from '@angular/core';
|
||||
import {IStatistics} from '../../../models/color.map';
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { IStatistics } from '../../../models/color.map';
|
||||
|
||||
@Component({
|
||||
selector: 'fm-map-statistics-details',
|
||||
templateUrl: './statistics-details.component.html',
|
||||
styles: ['.nopadding{\n' +
|
||||
' padding: 0 !important;\n' +
|
||||
' margin: 0 !important;\n' +
|
||||
'}']
|
||||
' padding: 0 !important;\n' +
|
||||
' margin: 0 !important;\n' +
|
||||
'}']
|
||||
})
|
||||
export class StatisticsDetailsComponent {
|
||||
|
||||
@Input()
|
||||
statistics: IStatistics;
|
||||
@Input()
|
||||
scale: number | null;
|
||||
|
||||
public getScaledValue(value: number): number {
|
||||
let v = value;
|
||||
if (this.scale && this.scale != 0) {
|
||||
v = this.scale * value;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
public getSquaredScaledValue(value: number): number {
|
||||
let v = value;
|
||||
if (this.scale && this.scale != 0) {
|
||||
v = (this.scale * this.scale) * value;
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user