Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andy/ds 5552 multiline asf #1992

Merged
merged 29 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cc742a4
chore: add GRD_HS to on demand product types
tylercchase Oct 1, 2024
eef65fa
Added character limit
yoreley777 Oct 3, 2024
63af20c
Merge pull request #1987 from asfadmin/Yoreley-test7
artisticlight Oct 3, 2024
6769fe9
Updated translations from Phrase
ASF-Discovery Oct 3, 2024
7925553
Updated translations from Phrase
ASF-Discovery Oct 3, 2024
3d24d4a
Merge pull request #1988 from asfadmin/phrase-translations
artisticlight Oct 3, 2024
a5729bb
Dummy checkboxes for displacement
artisticlight Oct 3, 2024
6490e83
WIP on displacement checkboxes
artisticlight Oct 7, 2024
62676ab
Merge remote-tracking branch 'Discovery-SearchUI/displacement' into a…
artisticlight Oct 7, 2024
322dd81
WIP on checkboxes
artisticlight Oct 7, 2024
046fb01
WIP
artisticlight Oct 7, 2024
8a5405d
Merge remote-tracking branch 'Discovery-SearchUI/displacement' into a…
artisticlight Oct 8, 2024
5fe4ed3
WIP
artisticlight Oct 8, 2024
52b0d15
rtc link to rtc static uses local incidence angle url. Remove size di…
Oct 16, 2024
acc3095
fix: update angular cli in buildspec
williamh890 Oct 16, 2024
b1a7666
WIP Before Adding Data Series
artisticlight Oct 17, 2024
ba2f368
WIP Charting series, but not really
artisticlight Oct 17, 2024
bd277af
WIP Changing to accept DataReady
artisticlight Oct 18, 2024
f0a9980
WIP Point colors represent different series
artisticlight Oct 18, 2024
bdb7e04
WIP B-4 New Line Logic
artisticlight Oct 18, 2024
d27b509
WIP Series showing with colors
artisticlight Oct 18, 2024
323e621
WIP
artisticlight Oct 18, 2024
2a59135
WIP Show Lines works better
artisticlight Oct 19, 2024
693922e
WIP Zoom broken but better
artisticlight Oct 19, 2024
1c99b70
WIP Zoom fixed
artisticlight Oct 19, 2024
09de9d7
Updated translations from Phrase
ASF-Discovery Oct 19, 2024
9ad365c
Merge pull request #1990 from asfadmin/phrase-translations
artisticlight Oct 19, 2024
bcb590b
WIP Remarked out center column
artisticlight Oct 19, 2024
ae64da7
Merge remote-tracking branch 'Discovery-SearchUI/test' into andy/DS-5…
artisticlight Oct 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ phases:
commands:
- n 18
- npm set progress=false
- npm install -g @angular/cli@17.2.7
- npm install -g @angular/cli@17.3.10
pre_build:
commands:
- cp src/app/services/envs/env-${MATURITY}.ts src/app/services/env.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,13 @@ export class SceneFilesComponent implements OnInit, OnDestroy, AfterContentInit
};
return this.asfApiService.query<any>(queryParams).pipe(
map(products => products?.results?.length > 0 ? this.productService.fromResponse(products).slice(0, 1) : []),
tap(products => products.map(product => product.productTypeDisplay = scene.metadata.productType + "-STATIC Layer"))
tap(products => products.map(product => {
product.productTypeDisplay = "Local Incidence Angle GeoTIFF";
product.bytes = 0;
product.downloadUrl = product.metadata.opera.additionalUrls.find(url => url.endsWith('local_incidence_angle.tif'));
return product;
}
))
);
} else {
return of([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,54 +16,74 @@

<div class="ts-left-column-results">

@if(pointHistory.length !== 0) {
<mat-radio-group>
@for (point of pointHistory; track $index) {

<mat-radio-button color="primary" (click)="onPointClick($index)" [checked]="$index === pointHistoryService.selectedPoint">
<mat-icon class="ts-wkt-icon">place</mat-icon>
<span class="ts-wkt-text">
{{point.flatCoordinates[1] | floatPrecision: 2}},&ensp;{{point.flatCoordinates[0] | floatPrecision: 2}}
@if(pointHistory.length !== 0) {

<section class="point-list-section">
<span class="parent-checkbox-section">
<mat-checkbox
class="parent-checkbox"
[checked]="task().checked"
[indeterminate]="partiallyComplete()"
(change)="updateSeries($event.checked)"
>
<span class="parent-checkbox-label">
{{task().aoi}}
</span>
</mat-radio-button>
}
</mat-radio-group>
}
@else {
<div class="ts-no-point-selected">
</mat-checkbox>
</span>
<span class="point-list-ul-section">
<ul>
@for (point of pointHistory; track $index) {
<li>
<mat-checkbox [checked]="point.checked"
(change)="updateSeries($event.checked, $index)">
<mat-icon class="ts-wkt-icon">place</mat-icon>
<span class="ts-wkt-label">
{{point.flatCoordinates[1] | floatPrecision: 2}},&ensp;{{point.flatCoordinates[0] | floatPrecision: 2}}
</span>
</mat-checkbox>
</li>
}
</ul>
</span>
</section>
}
@else {
<div class="ts-no-point-selected">
{{ 'NO_POINT_SELECTED' | translate }}
</div>
}
</div>
}

</div>
</mat-card>

<mat-card class="mp0 ts-column-2 ts-layer-list" [style.width]="listCardMaxWidth">
<mat-card-subtitle class="header ts-layer-list-header">
</mat-card-subtitle>
<div class="ts-metadata scrollable">
<mat-tab-group mat-stretch-tabs="false" mat-align-tabs="start" dynamicHeight>
<mat-tab label="Summary">
<div style="text-align: center; margin-top: 20px;">Interesting Metadata Goes Here</div>
</mat-tab>

<mat-tab label="Export">
<div style="text-align: center; margin-top: 20px;">Export Functionality Here</div>
</mat-tab>

<mat-tab label="Scenes">
<div style="height: 1000px;">
<app-scenes-list [resize$]="resize$"></app-scenes-list>
<div *ngIf="false" style="margin: 5px; padding-bottom: 36px;">
<div class="faint-text w100 h100" style="text-align: center; padding-top: 10px; height: 100px !important;">
{{ 'NO_POINT_SELECTED' | translate }}
</div>
</div>
</div>
</mat-tab>
</mat-tab-group>

</div>
</mat-card>
<!-- <mat-card class="mp0 ts-column-2 ts-layer-list" [style.width]="listCardMaxWidth">-->
<!-- <mat-card-subtitle class="header ts-layer-list-header">-->
<!-- </mat-card-subtitle>-->
<!-- <div class="ts-metadata scrollable">-->
<!-- <mat-tab-group mat-stretch-tabs="false" mat-align-tabs="start" dynamicHeight>-->
<!-- <mat-tab label="Summary">-->
<!-- <div style="text-align: center; margin-top: 20px;">Interesting Metadata Goes Here</div>-->
<!-- </mat-tab>-->

<!-- <mat-tab label="Export">-->
<!-- <div style="text-align: center; margin-top: 20px;">Export Functionality Here</div>-->
<!-- </mat-tab>-->

<!-- <mat-tab label="Scenes">-->
<!-- <div style="height: 1000px;">-->
<!-- <app-scenes-list [resize$]="resize$"></app-scenes-list>-->
<!-- <div *ngIf="false" style="margin: 5px; padding-bottom: 36px;">-->
<!-- <div class="faint-text w100 h100" style="text-align: center; padding-top: 10px; height: 100px !important;">-->
<!-- {{ 'NO_POINT_SELECTED' | translate }}-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </mat-tab>-->
<!-- </mat-tab-group>-->

<!-- </div>-->
<!-- </mat-card>-->
</ng-container>

<mat-card #chartCard class="mp0 ts-chart-card"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,16 @@ label {
@include themify($themes) {
color: darken(themed('dark-primary-text'), 25%);
}
font-size: 18px;
line-height: 29px;
margin: 0 0;
width: 18px;
}

.ts-wkt-label {
margin-left: 5px;
position: relative;
top: -5px;
}

.ts-wkt-text {
Expand All @@ -305,3 +315,33 @@ label {
::ng-deep .mdc-radio__outer-circle {
border-color: #ffcc33 !important; /*change radio button color when selected*/
}

.point-list-section {

}

.parent-checkbox-section {
margin: 0;
}

.parent-checkbox-label {
font-weight: bold;
}

.point-list-ul-section {
display: block;
margin-left: 10px;
}

ul {
list-style-type: none;
margin-top: 0;
}

::ng-deep .mdc-checkbox {
height: 7px;
}

::ng-deep .mat-mdc-checkbox .mdc-checkbox__background {
top: 4px
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit, Input, OnDestroy, ViewChild, ElementRef } from '@angular/core';
import {Component, OnInit, Input, OnDestroy, ViewChild, ElementRef, computed, signal} from '@angular/core';
import { first, Observable, Subject } from 'rxjs';
import { ResizeEvent } from 'angular-resizable-element';

Expand All @@ -15,16 +15,18 @@ import { SubSink } from 'subsink';

import { Point } from 'ol/geom';
import { WKT } from 'ol/format';
import moment2 from 'moment';
import { SetScenes } from '@store/scenes';
import { getPathRange } from '@store/filters';

export interface Task {
aoi: string;
checked: boolean;
subtasks?: Task[];
}

@Component({
selector: 'app-timeseries-results-menu',
templateUrl: './timeseries-results-menu.component.html',
styleUrls: ['./timeseries-results-menu.component.scss', '../results-menu.component.scss']

styleUrls: ['./timeseries-results-menu.component.scss', '../results-menu.component.scss'],
})
export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy {

Expand Down Expand Up @@ -84,6 +86,27 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy {
this.subs.add(this.pointHistoryService.history$.subscribe(history => {
this.pointHistory = history;
this.mapService.setDisplacementLayer(history);
console.log('results menu sub this.pointHistory', this.pointHistory);
const task = this.task();
let found = false
for (const point of this.pointHistory) {
found = false;
for (const pt of task.subtasks) {
if (pt.aoi.toString() === point.flatCoordinates.toString()) {
found = true;
break;
}
}
if (!found) {
let p = {aoi: point.flatCoordinates, checked: true};
task.subtasks.push(p);
}
}

console.log('results menu sub task.subtasks', task.subtasks);

return {...task};

}));

this.subs.add(this.drawService.polygon$.subscribe(polygon => {
Expand All @@ -94,7 +117,7 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy {
this.pointHistoryService.addPoint(temp);
// this.selectedPoint = temp;
}
this.updateChart(temp);
this.updateChart();
}
}))

Expand Down Expand Up @@ -143,76 +166,55 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy {
this.mapService.loadPolygonFrom(wktRepresenation.toString())
}

public updateChart(geometry): void {
this.netcdfService.getTimeSeries(geometry).pipe(first()).subscribe(data => {
this.chartData.next(data);
// just going to use the data here to have some test
public updateChart(): void {
let allPointsData = [];
for (const geometry of this.pointHistory) {
this.netcdfService.getTimeSeries(geometry).pipe(first()).subscribe(data => {
console.log('updateChart data', data);
console.log('updateChart geometry', geometry);
allPointsData.push(data);
})
console.log('updateChart allPointsData', allPointsData);
this.chartData.next(allPointsData);
}
}

let test_products = []
for(let a of Object.keys(data)) {
if(a === 'mean') {
continue
}
let dummy_product = {
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",
dataset: "sentinel-1",
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,
faradayRotation: null,
offNadirAngle: null,
instrument: null,
pointingAngle: null,
missionName: null,
flightLine: null,
perpendicular: null,
temporal: null,
canInSAR: false,
burst: null,
opera: null,
fileName: null,
job:null,
pgeVersion: null,
subproducts: [],
parentID: "",
ariaVersion: null,
}
}
let response_file = data[a];
dummy_product.name = a
dummy_product.productTypeDisplay = a
dummy_product.id = a
dummy_product.file = a
dummy_product.groupId = a
dummy_product.downloadUrl = response_file.uri
dummy_product.metadata.date = moment2(response_file.time)
test_products.push(dummy_product)
}
this.store$.dispatch(new SetScenes({
products: test_products,
searchType: SearchType.DISPLACEMENT
}))
readonly task = signal<Task>({
aoi: 'ALL AOIs',
checked: false,
subtasks: [],
});

readonly partiallyComplete = computed(() => {
const task = this.task();
if (!task.subtasks) {
return false;
}
return task.subtasks.some(t => t.checked) && !task.subtasks.every(t => t.checked);
});

public updateSeries(checked: boolean, index?: number) {
console.log('updateSeries', checked, index);
this.task.update(task => {
if (index === undefined) {
task.checked = checked;
task.subtasks?.forEach(t => (t.checked = checked));
} else {
task.subtasks![index].checked = checked;
task.checked = task.subtasks?.every(t => t.checked) ?? true;
this.pointHistoryService.selectedPoint = index;
console.log('updateSeries() this.pointHistoryService.selectedPoint', this.pointHistoryService.selectedPoint);
this.pointHistoryService.passDraw = true;
let format = new WKT();
let wktRepresentation = format.writeGeometry(this.pointHistory[index]);
this.mapService.loadPolygonFrom(wktRepresentation.toString())

})
}
console.log('updateSeries() task', task);
console.log('updateSeries() task.subtasks', task.subtasks);
console.log('updateSeries() this.pointHistory', this.pointHistory);
return {...task};
});
}

ngOnDestroy() {
Expand Down
Loading
Loading