diff --git a/src/app/components/map/map.component.ts b/src/app/components/map/map.component.ts index eea5bd722..8afc06da3 100644 --- a/src/app/components/map/map.component.ts +++ b/src/app/components/map/map.component.ts @@ -25,7 +25,7 @@ import * as mapStore from '@store/map'; import * as uiStore from '@store/ui'; import * as models from '@models'; -import { MapService, WktService, ScreenSizeService, ScenesService, SarviewsEventsService, NetcdfServiceService } from '@services'; +import { MapService, WktService, ScreenSizeService, ScenesService, SarviewsEventsService, NetcdfService } from '@services'; import * as polygonStyle from '@services/map/polygon.style'; import { CMRProduct, SarviewsEvent } from '@models'; import { StyleLike } from 'ol/style/Style'; @@ -97,7 +97,7 @@ export class MapComponent implements OnInit, OnDestroy { private screenSize: ScreenSizeService, private scenesService: ScenesService, private eventMonitoringService: SarviewsEventsService, - private netcdfService: NetcdfServiceService, + private netcdfService: NetcdfService, public dialog: MatDialog ) {} diff --git a/src/app/components/results-menu/results-menu.component.html b/src/app/components/results-menu/results-menu.component.html index f7514c19b..da8b7b672 100644 --- a/src/app/components/results-menu/results-menu.component.html +++ b/src/app/components/results-menu/results-menu.component.html @@ -45,7 +45,7 @@ [resize$]="resize$"> - + - + @@ -10,7 +10,7 @@ @for (point of pointHistory; track $index) { - {{point.flatCoordinates[0]}}, {{point.flatCoordinates[1]}} + {{point.flatCoordinates[0] | floatPrecision: 4}}, {{point.flatCoordinates[1] | floatPrecision: 4}} } @@ -86,11 +86,11 @@
-
-
-
- +
diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.scss b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.scss index c436b94ba..e400f1192 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.scss +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.scss @@ -5,7 +5,7 @@ .ts-chart-row { display: flex; flex-direction: row; - height: calc(100% - 137px); + height: calc(100%); } .ts-chart-card { @@ -56,11 +56,13 @@ .ts-list-card { box-shadow: none !important; box-sizing: border-box; - width: 130px; + width: 170px; } .ts-layer-list { - flex: 1 1 500px; + // flex: 1 1 500px; + flex-basis: 650px; + flex-grow: 0; } .ts-layer-list-header { @@ -76,7 +78,7 @@ flex-basis: 130px; flex-grow: 0; max-height: 30px; - max-width: 130px; +// max-width: 130px; } .ts-metadata { @@ -151,13 +153,14 @@ justify-content: center; height: 50px; padding-top: 0; + padding-bottom: 5px; margin-bottom: 0; font-family: Roboto, sans-serif; font-weight: 400; font-size: 16px; text-align: center; - margin-top: -20px; + margin-top: -25px; border-left: none; } @@ -263,3 +266,6 @@ label { background: darken(themed('background-white'), 15%); } } +.ts-column-2 { + margin: 25px; +} \ No newline at end of file diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts index 79a852767..6314d7f94 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.ts @@ -6,15 +6,13 @@ import { Store } from '@ngrx/store'; import { AppState } from '@store'; import * as uiStore from '@store/ui'; import * as searchStore from '@store/search'; -import * as sceneStore from '@store/scenes'; import { Breakpoints, SearchType } from '@models'; -import { PointHistoryService, ScreenSizeService } from '@services'; +import { DrawService, PointHistoryService, ScreenSizeService } from '@services'; import { SubSink } from 'subsink'; -import moment from 'moment'; -import { Point } from 'ol/geom'; +import { Point} from 'ol/geom'; @Component({ @@ -47,10 +45,12 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { public pointHistory = []; + constructor( private store$: Store, private screenSize: ScreenSizeService, private pointHistoryService: PointHistoryService, + private drawService: DrawService ) { } ngOnInit(): void { @@ -65,82 +65,17 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { searchType => this.searchType = searchType ) ); - this.store$.dispatch(new sceneStore.SetScenes({ - "products": [{ - name: "test", - productTypeDisplay: "test", - file: "test", - id: "test", - downloadUrl: "test", - bytes: 1234, - browses: [], - thumbnail: "string", - dataset: "sentinel-1", - groupId: "string", - isUnzippedFile: false, - isDummyProduct: false, - - metadata: { - date: moment(), - stopDate: moment(), - polygon: "POLYGON ((-120.6596489990334 38.10046393341369, -120.7165475579197 38.10851198053945, -120.766930740861 38.11562044217759, -120.8205210213509 38.12315205210022, -120.8714495693995 38.13028813229113, -120.9237420515751 38.13758904376237, -120.9763848233747 38.14491322663075, -121.0284993874585 38.15213949038783, -121.0805374061872 38.15933042899581, -121.1317842372317 38.16638876359664, -121.1831324092139 38.17343685331883, -121.2343267090171 38.1804400907544, -121.2851343767767 38.18736716519965, -121.3356959243903 38.19423758535788, -121.3861081098637 38.20106467487116, -121.4362721727969 38.20783544395677, -121.48323466170885 38.21415300334824, -121.4961042842803 38.15636388218255, -121.5433137463578 38.16270254678292, -121.5911446754841 38.1691031129965, -121.6386899947014 38.17544523556456, -121.6861407154369 38.18175427917799, -121.7332794261246 38.18800202289999, -121.7803915044837 38.19422601057961, -121.827141292521 38.20038272861196, -121.8737037166488 38.20649520761842, -121.9200946535652 38.21256588219698, -121.9662943385527 38.21859236147657, -122.0122835841423 38.22457236130022, -122.0581361973249 38.23051573928061, -122.1041763492786 38.23646390681441, -122.149693424194 38.24232638029159, -122.1961235981019 38.24828575950047, -122.242840340764 38.25426186141181, -122.2851111656349 38.25965821461571, -122.3300033441712 38.2653676014464, -122.3758025278513 38.27117216227268, -122.4195396691845 38.27670031010642, -122.3858453485523 38.44296136955153, -122.3532454174394 38.60872264056508, -122.321281901071 38.77481263179438, -122.2870678391941 38.9402423639722, -122.28657198358258 38.94018057384403, -122.2484647545139 39.10551216594683, -122.2139845790114 39.27116104878576, -122.1797260176706 39.4367089374228, -122.1454462898122 39.60250573468526, -122.1112187045845 39.76830723022915, -122.0657227757032 39.76272908715357, -122.0199986201785 39.75710391072595, -121.974167995761 39.75144665647245, -121.9280106375743 39.74573006489359, -121.8819129486135 39.74000139035989, -121.8355618840318 39.73422190999039, -121.7893509902118 39.72844019721962, -121.7438269303752 39.72272426697831, -121.6969816389773 39.71682457472104, -121.6515073229837 39.71107635608378, -121.6043191954164 39.70509395348859, -121.5584565168173 39.69925815820748, -121.5109102827927 39.69319018010273, -121.4645931051444 39.68725740118437, -121.4191841855194 39.68142061388765, -121.3710837028612 39.67522101887367, -121.3249639873766 39.66925411189222, -121.2737070377029 39.66260665395009, -121.23414991223851 39.657450537553174, -121.2225423730193 39.71501508524592, -121.1765350243167 39.70900995464177, -121.1256787673412 39.70235510426308, -121.0761429466098 39.6958485542612, -121.0248065795119 39.68908396631235, -120.9731471040036 39.68225266837984, -120.9238122923641 39.67570292460091, -120.8690679290765 39.66841567043333, -120.8147668765373 39.66115958039808, -120.7685909543843 39.65495848719279, -120.7156528937689 39.64783419415447, -120.663007754518 39.64072322969391, -120.6113623558398 39.6337213126097, -120.5575229174151 39.62639828522865, -120.4998084040708 39.61852276683964, -120.4452699517613 39.61104894626836, -120.3863396198317 39.60294709422497, -120.3350203072667 39.59585767211257, -120.2794058786818 39.5881523754319, -120.2276117469398 39.58094649107327, -120.22744443645614 39.58092314818873, -120.2134545404021 39.63753782618391, -120.1722737074452 39.6317932200585, -120.1244336159495 39.62510726553644, -120.0702567931258 39.61751657755807, -120.022269227435 39.61076456269333, -119.9734628265665 39.60387622000747, -119.9205724742573 39.59639065119934, -119.8710716027977 39.58935798135493, -119.8176837356334 39.58175135017377, -119.7678667295637 39.57462631850627, -119.7172666919774 39.56736632596481, -119.6677829890141 39.56024234859523, -119.6164294368659 39.55282685903347, -119.5655855530352 39.54546030402012, -119.5122825240406 39.53771380091477, -119.4596714762434 39.53004121358733, -119.4118356441431 39.52303826133494, -119.3539548115401 39.51454620335684, -119.2999598520621 39.50659276685604, -119.242172282983 39.49805375475951, -119.1867112941332 39.48982722325655, -119.2279582300632 39.32389259181299, -119.2695651047809 39.15814430461985, -119.3154157605841 38.99290396440068, -119.3553955782568 38.82692456194625, -119.4076391719693 38.66278010421749, -119.46426202130762 38.48267405863559, -119.4994803127931 38.33275776186966, -119.5473964124392 38.1679932576986, -119.5759619696445 38.00032674732519, -119.6328594358995 38.00892055228446, -119.685940538886 38.01691396436385, -119.735510021753 38.02435806698762, -119.7876843769492 38.0321663403309, -119.8349767585424 38.03922663419335, -119.8827140678868 38.04633197874039, -119.9336830819589 38.05389196505576, -119.9837372437618 38.06129369064131, -120.029196677421 38.0680003062205, -120.0790441003354 38.07532784287181, -120.1269111066452 38.08234457142717, -120.1767641224129 38.08962794955193, -120.2211977375846 38.09610549717873, -120.2696883291999 38.10314938009251, -120.3131576383198 38.10945036625376, -120.3570069870991 38.11578848698885, -120.4046282389668 38.12264764067351, -120.4517936234199 38.12942103705984, -120.48468630063608 38.134130553754865, -120.4964144795629 38.07720256883281, -120.5521610008301 38.08517268978709, -120.6049996926634 38.09270374285773, -120.6596489990334 38.10046393341369))", - - productType: "", - beamMode: "", - polarization: "", - flightDirection: null, - - path: 1, - frame: 1, - absoluteOrbit: [1], - - stackSize: 1, - // ALOS PALSAR - faradayRotation: null, - offNadirAngle: null, - - // AVNIR-2 - instrument: null, - pointingAngle: null, - - // UAVSAR - missionName: null, - - // AIRSAR - flightLine: null, - - // Baseline - perpendicular: null, - temporal: null, - canInSAR: false, - - // SLC BURST - burst: null, - - // OPERA-S1 - opera: null, - - fileName: null, - job:null, - - // versioning - pgeVersion: null, - - // BURST XML, OPERA-S1 - subproducts: [], - parentID: "", - - // ARIA S1 GUNW - ariaVersion: null, - } - } - ], - "searchType": SearchType.TIMESERIES - })) this.pointHistoryService.history$.subscribe(history => { this.pointHistory = history; - console.log(this.pointHistory) - + }) + this.drawService.polygon$.subscribe(polygon => { + if(polygon) { + if (polygon.getGeometry().getType() === 'Point') { + let temp = polygon.getGeometry().clone() as Point; + temp.transform('EPSG:3857', 'EPSG:4326') + this.pointHistoryService.addPoint(temp) + } + } }) this.pointHistoryService.addPoint(new Point([11,11])) } diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts index e3ffd33fd..f466ef685 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.module.ts @@ -15,6 +15,7 @@ import { SceneMetadataModule } from '@components/shared/scene-metadata'; import { TimeseriesChartModule } from '@components/timeseries-chart/timeseries-chart.module'; import { ResizableModule } from 'angular-resizable-element'; import { MatRadioModule } from '@angular/material/radio'; +import { PipesModule } from '@pipes'; @NgModule({ @@ -35,6 +36,7 @@ import { MatRadioModule } from '@angular/material/radio'; TimeseriesChartModule, ResizableModule, MatRadioModule, + PipesModule ], exports: [ TimeseriesResultsMenuComponent diff --git a/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.html b/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.html index 8f8cf8af4..226d9d73d 100644 --- a/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.html +++ b/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.html @@ -1,4 +1,15 @@ - - {{'BURST_ID_FULL' | translate}} - - + + + + + {{'BURST_ID_FULL' | translate}} + + + + + + {{'BURST_ID_FULL' | translate}} + + + + \ No newline at end of file diff --git a/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.ts b/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.ts index 8434c2258..1a70d705c 100644 --- a/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.ts +++ b/src/app/components/shared/selectors/burst-selector/full-burst-selector/full-burst-selector.component.ts @@ -1,10 +1,12 @@ import { Component, OnInit, EventEmitter, OnDestroy } from '@angular/core'; import { debounceTime, filter, map } from 'rxjs'; import { SubSink } from 'subsink'; +import * as searchStore from '@store/search'; import * as filtersStore from '@store/filters'; import { Store } from '@ngrx/store'; import { AppState } from '@store'; +import { SearchType } from '@models'; @Component({ selector: 'app-full-burst-selector', templateUrl: './full-burst-selector.component.html', @@ -15,6 +17,8 @@ export class FullBurstSelectorComponent implements OnInit, OnDestroy { private IDsInputUpdated: EventEmitter = new EventEmitter(); private subs: SubSink = new SubSink(); + public searchType$ = this.store$.select(searchStore.getSearchType); + public searchTypes = SearchType; constructor(private store$: Store) { } ngOnInit(): void { diff --git a/src/app/components/timeseries-chart/timeseries-chart.component.html b/src/app/components/timeseries-chart/timeseries-chart.component.html index 2409d7423..f94819558 100644 --- a/src/app/components/timeseries-chart/timeseries-chart.component.html +++ b/src/app/components/timeseries-chart/timeseries-chart.component.html @@ -1,2 +1,4 @@ -
\ No newline at end of file +
+
+
\ No newline at end of file diff --git a/src/app/components/timeseries-chart/timeseries-chart.component.scss b/src/app/components/timeseries-chart/timeseries-chart.component.scss index b0627adec..f04b13e86 100644 --- a/src/app/components/timeseries-chart/timeseries-chart.component.scss +++ b/src/app/components/timeseries-chart/timeseries-chart.component.scss @@ -1,12 +1,22 @@ @import "asf-theme"; #timeseriesChart { - height: 460px; - width: 680px; + // height: 460px; + // width: 680px; } ::ng-deep .timeseries-base { @include themify($themes) { fill: lighten(themed('dark-primary-text'), 45%); } - } \ No newline at end of file + } + +.chart-wrapper { + height: calc(100% - 1px); + width: calc(50% - 30px); +} + +#timeseriesChart { + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/src/app/components/timeseries-chart/timeseries-chart.component.ts b/src/app/components/timeseries-chart/timeseries-chart.component.ts index beef41249..2b4fb2049 100644 --- a/src/app/components/timeseries-chart/timeseries-chart.component.ts +++ b/src/app/components/timeseries-chart/timeseries-chart.component.ts @@ -1,8 +1,9 @@ -import { Component, OnInit } from '@angular/core'; -import { NetcdfServiceService } from '@services'; +import { Component, ElementRef, Input, OnInit, ViewChild } from '@angular/core'; +import { NetcdfService } from '@services'; // import * as models from '@models'; import * as d3 from 'd3'; +import { Observable } from 'rxjs'; @Component({ selector: 'app-timeseries-chart', @@ -10,6 +11,10 @@ import * as d3 from 'd3'; styleUrl: './timeseries-chart.component.scss' }) export class TimeseriesChartComponent implements OnInit { + @ViewChild('timeseriesChart', { static: true }) timeseriesChart: ElementRef; + @Input() zoomIn$: Observable; + @Input() zoomOut$: Observable; + @Input() zoomToFit$: Observable; public json_data: string = ''; private svg?: any; public dataSource = []; @@ -26,44 +31,48 @@ export class TimeseriesChartComponent implements OnInit { private yAxis; private dots; private margin = { top: 10, right: 30, bottom: 60, left: 20 }; + private thing - - constructor(private netcdfService: NetcdfServiceService) { - // this.json_data = JSON.stringify(data, null, " ") - + constructor(private netcdfService: NetcdfService) { } public ngOnInit(): void { - this.svg = d3.select('#timeseriesChart').append('svg') - .attr('width', this.width + this.margin.left + this.margin.right) - .attr('height', this.height + this.margin.top + this.margin.bottom) - .append('g') - .attr('transform', `translate(${this.margin.left}, ${this.margin.top})`); - this.drawChart(); + // this.svg = d3.select('#timeseriesChart').append('svg') + // .attr('width', this.width + this.margin.left + this.margin.right) + // .attr('height', this.height + this.margin.top + this.margin.bottom) + // .append('g') + // .attr('transform', `translate(${this.margin.left}, ${this.margin.top})`); + // this.drawChart(); + this.createSVG(); - this.netcdfService.getTimeSeries({'lon': 0, 'lat': 0}).subscribe(data => { - this.initChart(data); - }) + this.netcdfService.getTimeSeries({'lon': 0, 'lat': 0}).subscribe(data => { + this.initChart(data); + }) + this.zoomOut$.subscribe(_ => { + this.thing.transition().call(this.zoom.scaleBy, .5); + }); + this.zoomIn$.subscribe(_ => { + this.thing.transition().call(this.zoom.scaleBy, 2); + }); } public initChart(data): void { - console.log(data) - for (let i = 0; i < data.time_series.unwrapped_phase.length; i++) { + + for(let key of Object.keys(data)) { this.dataSource.push({ - 'position': i, - 'unwrapped_phase': data.time_series.unwrapped_phase[i], - 'interferometric_correlation': data.time_series.interferometric_correlation[i], - 'temporal_coherence': data.time_series.temporal_coherence[0] + 'unwrapped_phase': data[key].unwrapped_phase, + 'interferometric_correlation': data[key].interferometric_correlation, + 'temporal_coherence': data[key].temporal_coherence, + 'date': data[key].time }) } this.averageData = ({ - 'position': 'average', - ...data.averages + ...data.mean }) this.svg.selectChildren().remove(); @@ -97,7 +106,8 @@ export class TimeseriesChartComponent implements OnInit { this.currentTransform = eve.transform; this.updateChart(); }); - d3.select('#timeseriesChart').selectChild().call(this.zoom) + this.thing = d3.select('#timeseriesChart').selectChild() + this.thing.call(this.zoom) this.svg.append('defs').append('SVG:clipPath') .attr('id', 'clip') @@ -144,5 +154,23 @@ export class TimeseriesChartComponent implements OnInit { public updateAxis(_axis, _value) { } + public onResized() { + this.createSVG(); + } + + private createSVG() { + if (this.svg) { + d3.selectAll('#timeseries-chart > svg').remove(); + d3.selectAll('.tooltip').remove(); + } + this.height = this.timeseriesChart.nativeElement.offsetHeight - this.margin.top - this.margin.bottom; + this.width = this.timeseriesChart.nativeElement.offsetWidth - this.margin.left - this.margin.right; + this.svg = d3.select(this.timeseriesChart.nativeElement).append('svg') + .attr('width', this.width + this.margin.left + this.margin.right) + .attr('height', this.height + this.margin.top + this.margin.bottom) + .append('g') + .attr('transform', `translate(${this.margin.left}, ${this.margin.top})`); + this.drawChart(); + } } diff --git a/src/app/pipes/float-precision.pipe.ts b/src/app/pipes/float-precision.pipe.ts new file mode 100644 index 000000000..5f43c4c7e --- /dev/null +++ b/src/app/pipes/float-precision.pipe.ts @@ -0,0 +1,10 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'floatPrecision' +}) +export class FloatPrecisionPipe implements PipeTransform { + transform(input: Number, precision=2): string { + return input.toFixed(precision); + } +} diff --git a/src/app/pipes/pipes.module.ts b/src/app/pipes/pipes.module.ts index 1eb649c4a..8c0eda5c5 100644 --- a/src/app/pipes/pipes.module.ts +++ b/src/app/pipes/pipes.module.ts @@ -9,6 +9,7 @@ import { BaselineFilterPipe, SBASFilterPipe, GeographicFilterPipe, ListFilterPip import { HTMLInputValuePipe } from './html-input-value.pipe'; import { QuakePipe, VolcanoPipe } from './sarviews-event.pipe'; import { FilterExtensionPipe } from './filter-extension.pipe'; +import { FloatPrecisionPipe } from './float-precision.pipe'; @NgModule({ declarations: [ ReadableSizeFromBytesPipe, @@ -25,8 +26,8 @@ import { FilterExtensionPipe } from './filter-extension.pipe'; HTMLInputValuePipe, QuakePipe, VolcanoPipe, - FilterExtensionPipe - // floodPipe + FilterExtensionPipe, + FloatPrecisionPipe ], imports: [ CommonModule @@ -47,7 +48,7 @@ import { FilterExtensionPipe } from './filter-extension.pipe'; QuakePipe, VolcanoPipe, FilterExtensionPipe, - // floodPipe, + FloatPrecisionPipe ] }) export class PipesModule { } diff --git a/src/app/services/index.ts b/src/app/services/index.ts index 3c0beb7a4..53c5e6d59 100644 --- a/src/app/services/index.ts +++ b/src/app/services/index.ts @@ -34,5 +34,5 @@ export { BrowseOverlayService } from './browse-overlay.service'; export { ThemingService } from './theming.service'; export { ExportService } from './export.service'; export { PossibleHyp3JobsService } from './possible-hyp3-jobs.service'; -export { NetcdfServiceService } from './netcdf-service.service'; +export { NetcdfService } from './netcdf-service.service'; export { PointHistoryService } from './point-history.service'; diff --git a/src/app/services/netcdf-service.service.ts b/src/app/services/netcdf-service.service.ts index 9b59a9481..f8888a729 100644 --- a/src/app/services/netcdf-service.service.ts +++ b/src/app/services/netcdf-service.service.ts @@ -13,7 +13,7 @@ import Geometry from 'ol/geom/Geometry'; @Injectable({ providedIn: 'root' }) -export class NetcdfServiceService { +export class NetcdfService { private url: string = 'http://127.0.0.1:8080/' private itemsEndpoint: string = 'items/' private timeSeriesEndpoint: string = 'timeseries' @@ -51,7 +51,6 @@ export class NetcdfServiceService { ), first(), tap(output => { - console.log(output.browse); output.browse.set('file', this.files[0]); // browseImageLayer.on('select', (_) => console.log(browseImageLayer.get('file'))) @@ -62,49 +61,37 @@ export class NetcdfServiceService { return output } - // public getGeotiffLayers() { - // for (let layer of this.get_layers()) { - // layer.pipe(tap(l => { - // l.set('netcdf-layer', true); - // l.set('selectable', true); - // this.mapService.addLayer(l); - // })).subscribe(l => this.layers.push(l)) - // } - // } - public getTimeSeries(coords: LonLat) { return of({ - "time_series": { - "unwrapped_phase": [ - -24.5294189453125, - -7.865759372711182, - -5.049846649169922, - -4.983147144317627, - 0.2701125144958496, - 8.003214836120605 - ], - "temporal_coherence": [ - 0.80419921875 - ], - "interferometric_correlation": [ - 0.94873046875, - 0.9521484375, - 0.95556640625, - 0.95849609375, - 0.9609375, - 0.962890625 - ] + "20221107_20221213.unw.nc": { + "time": "2022-12-13T14:07:50.748", + "unwrapped_phase": -7.1020755768, + "interferometric_correlation": 0.9609375, + "temporal_coherence": 0.8041992188, + "bytes": 331350016.0 + }, + "20221107_20230106.unw.nc": { + "time": "2023-01-06T14:07:49.520", + "unwrapped_phase": 25.0342712402, + "interferometric_correlation": 0.9604492188, + "temporal_coherence": 0.8041992188, + "bytes": 318767104.0 + }, + "20221107_20230130.unw.nc": { + "time": "2023-01-30T14:07:48.874", + "unwrapped_phase": 11.7699642181, + "interferometric_correlation": 0.9711914062, + "temporal_coherence": 0.8041992188, + "bytes": 335544320.0 }, - "coordinates": [ - 38.57, - -121.53 - ], - "averages": { - "unwrapped_phase": -5.692474365234375, - "interferometric_correlation": 0.9564616084098816, - "temporal_coherence": 0.80419921875 + "mean": { + "time": null, + "unwrapped_phase": 9.9007196426, + "interferometric_correlation": 0.9641926885, + "temporal_coherence": 0.8041992188, + "bytes": 328553813.3333333135 } - }) + }) this.http.get(`${this.url}${this.timeSeriesEndpoint}?layer=unwrapped_phase&x=${coords.lat}&y=${coords.lon}`, { responseType: 'json' }).pipe(first(), ).pipe( map(response => response as TimeSeriesResult), diff --git a/src/app/store/search/search.effect.ts b/src/app/store/search/search.effect.ts index 188b29074..40f1ca796 100644 --- a/src/app/store/search/search.effect.ts +++ b/src/app/store/search/search.effect.ts @@ -54,7 +54,7 @@ export class SearchEffects { private sarviewsService: services.SarviewsEventsService, private http: HttpClient, private notificationService: services.NotificationService, - private netCdfService: services.NetcdfServiceService + private netCdfService: services.NetcdfService ) { } public clearMapInteractionModeOnSearch = createEffect(() => this.actions$.pipe( @@ -227,35 +227,20 @@ export class SearchEffects { ]) )); - // switchMap(action => { - // let output : any[] = [ - // new scenesStore.SetScenes({ - // products: action.payload.files, - // searchType: action.payload.searchType - // }) - // ]; - // if(action.payload.totalCount) { - // output.push(new SetSearchAmount(action.payload.totalCount)) - // } - // return output - // }) public timeseriesSearchResponse = createEffect(() => this.actions$.pipe( ofType(SearchActionType.TIMESERIES_SEARCH_RESPONSE), withLatestFrom(this.store$.select(getSearchType)), filter(([_, searchType]) => searchType === SearchType.TIMESERIES), switchMap(([action, _]) => { - console.log('SEARCH RESPONSE') - console.log(action) - return [ new scenesStore.SetScenes({ products: [{ - name: "test", - productTypeDisplay: "test", - file: "test", - id: "test", - downloadUrl: "test", + name: "20221107_20221213.unw.nc", + productTypeDisplay: "20221107_20221213.unw.nc", + file: "20221107_20221213.unw.nc", + id: "20221107_20221213.unw.nc", + downloadUrl: "", bytes: 1234, browses: [], thumbnail: "string", @@ -263,58 +248,34 @@ export class SearchEffects { groupId: "string", isUnzippedFile: false, isDummyProduct: false, - metadata: { date: moment2(), stopDate: moment2(), polygon: "POLYGON ((-120.6596489990334 38.10046393341369, -120.7165475579197 38.10851198053945, -120.766930740861 38.11562044217759, -120.8205210213509 38.12315205210022, -120.8714495693995 38.13028813229113, -120.9237420515751 38.13758904376237, -120.9763848233747 38.14491322663075, -121.0284993874585 38.15213949038783, -121.0805374061872 38.15933042899581, -121.1317842372317 38.16638876359664, -121.1831324092139 38.17343685331883, -121.2343267090171 38.1804400907544, -121.2851343767767 38.18736716519965, -121.3356959243903 38.19423758535788, -121.3861081098637 38.20106467487116, -121.4362721727969 38.20783544395677, -121.48323466170885 38.21415300334824, -121.4961042842803 38.15636388218255, -121.5433137463578 38.16270254678292, -121.5911446754841 38.1691031129965, -121.6386899947014 38.17544523556456, -121.6861407154369 38.18175427917799, -121.7332794261246 38.18800202289999, -121.7803915044837 38.19422601057961, -121.827141292521 38.20038272861196, -121.8737037166488 38.20649520761842, -121.9200946535652 38.21256588219698, -121.9662943385527 38.21859236147657, -122.0122835841423 38.22457236130022, -122.0581361973249 38.23051573928061, -122.1041763492786 38.23646390681441, -122.149693424194 38.24232638029159, -122.1961235981019 38.24828575950047, -122.242840340764 38.25426186141181, -122.2851111656349 38.25965821461571, -122.3300033441712 38.2653676014464, -122.3758025278513 38.27117216227268, -122.4195396691845 38.27670031010642, -122.3858453485523 38.44296136955153, -122.3532454174394 38.60872264056508, -122.321281901071 38.77481263179438, -122.2870678391941 38.9402423639722, -122.28657198358258 38.94018057384403, -122.2484647545139 39.10551216594683, -122.2139845790114 39.27116104878576, -122.1797260176706 39.4367089374228, -122.1454462898122 39.60250573468526, -122.1112187045845 39.76830723022915, -122.0657227757032 39.76272908715357, -122.0199986201785 39.75710391072595, -121.974167995761 39.75144665647245, -121.9280106375743 39.74573006489359, -121.8819129486135 39.74000139035989, -121.8355618840318 39.73422190999039, -121.7893509902118 39.72844019721962, -121.7438269303752 39.72272426697831, -121.6969816389773 39.71682457472104, -121.6515073229837 39.71107635608378, -121.6043191954164 39.70509395348859, -121.5584565168173 39.69925815820748, -121.5109102827927 39.69319018010273, -121.4645931051444 39.68725740118437, -121.4191841855194 39.68142061388765, -121.3710837028612 39.67522101887367, -121.3249639873766 39.66925411189222, -121.2737070377029 39.66260665395009, -121.23414991223851 39.657450537553174, -121.2225423730193 39.71501508524592, -121.1765350243167 39.70900995464177, -121.1256787673412 39.70235510426308, -121.0761429466098 39.6958485542612, -121.0248065795119 39.68908396631235, -120.9731471040036 39.68225266837984, -120.9238122923641 39.67570292460091, -120.8690679290765 39.66841567043333, -120.8147668765373 39.66115958039808, -120.7685909543843 39.65495848719279, -120.7156528937689 39.64783419415447, -120.663007754518 39.64072322969391, -120.6113623558398 39.6337213126097, -120.5575229174151 39.62639828522865, -120.4998084040708 39.61852276683964, -120.4452699517613 39.61104894626836, -120.3863396198317 39.60294709422497, -120.3350203072667 39.59585767211257, -120.2794058786818 39.5881523754319, -120.2276117469398 39.58094649107327, -120.22744443645614 39.58092314818873, -120.2134545404021 39.63753782618391, -120.1722737074452 39.6317932200585, -120.1244336159495 39.62510726553644, -120.0702567931258 39.61751657755807, -120.022269227435 39.61076456269333, -119.9734628265665 39.60387622000747, -119.9205724742573 39.59639065119934, -119.8710716027977 39.58935798135493, -119.8176837356334 39.58175135017377, -119.7678667295637 39.57462631850627, -119.7172666919774 39.56736632596481, -119.6677829890141 39.56024234859523, -119.6164294368659 39.55282685903347, -119.5655855530352 39.54546030402012, -119.5122825240406 39.53771380091477, -119.4596714762434 39.53004121358733, -119.4118356441431 39.52303826133494, -119.3539548115401 39.51454620335684, -119.2999598520621 39.50659276685604, -119.242172282983 39.49805375475951, -119.1867112941332 39.48982722325655, -119.2279582300632 39.32389259181299, -119.2695651047809 39.15814430461985, -119.3154157605841 38.99290396440068, -119.3553955782568 38.82692456194625, -119.4076391719693 38.66278010421749, -119.46426202130762 38.48267405863559, -119.4994803127931 38.33275776186966, -119.5473964124392 38.1679932576986, -119.5759619696445 38.00032674732519, -119.6328594358995 38.00892055228446, -119.685940538886 38.01691396436385, -119.735510021753 38.02435806698762, -119.7876843769492 38.0321663403309, -119.8349767585424 38.03922663419335, -119.8827140678868 38.04633197874039, -119.9336830819589 38.05389196505576, -119.9837372437618 38.06129369064131, -120.029196677421 38.0680003062205, -120.0790441003354 38.07532784287181, -120.1269111066452 38.08234457142717, -120.1767641224129 38.08962794955193, -120.2211977375846 38.09610549717873, -120.2696883291999 38.10314938009251, -120.3131576383198 38.10945036625376, -120.3570069870991 38.11578848698885, -120.4046282389668 38.12264764067351, -120.4517936234199 38.12942103705984, -120.48468630063608 38.134130553754865, -120.4964144795629 38.07720256883281, -120.5521610008301 38.08517268978709, -120.6049996926634 38.09270374285773, -120.6596489990334 38.10046393341369))", - productType: "", beamMode: "", polarization: "", flightDirection: null, - path: 1, frame: 1, absoluteOrbit: [1], - stackSize: 1, - // ALOS PALSAR faradayRotation: null, offNadirAngle: null, - - // AVNIR-2 instrument: null, pointingAngle: null, - - // UAVSAR missionName: null, - - // AIRSAR flightLine: null, - - // Baseline perpendicular: null, temporal: null, canInSAR: false, - - // SLC BURST burst: null, - - // OPERA-S1 opera: null, - fileName: null, job:null, - - // versioning pgeVersion: null, - - // BURST XML, OPERA-S1 subproducts: [], parentID: "", - - // ARIA S1 GUNW ariaVersion: null, } }],