Skip to content

Commit 8c3a724

Browse files
Merge pull request #2349 from asfadmin/topic-seasat-migration
SEASAT 1 Migration
2 parents ba9bbd6 + f755579 commit 8c3a724

8 files changed

Lines changed: 203 additions & 96 deletions

File tree

src/app/components/results-menu/scenes-list-header/scenes-list-header.component.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,24 +563,28 @@
563563
}}{{ downloadableProds.length === 1 ? '' : 's' }}
564564
</button>
565565

566+
@let currentDatasetID = currentDatasetID$ | async;
567+
@if ( searchType === SearchTypes.DATASET
568+
&& (
569+
currentDatasetID === 'OPERA-S1'
570+
|| currentDatasetID === 'NISAR'
571+
|| currentDatasetID === 'SEASAT'
572+
)
573+
) {
566574
<button
567575
mat-menu-item
568-
*ngIf="
569-
searchType === SearchTypes.DATASET &&
570-
((currentDatasetID$ | async) === 'OPERA-S1' ||
571-
(currentDatasetID$ | async) === 'NISAR')
572-
"
573576
[matMenuTriggerFor]="addAllProductsOfType"
574577
[matMenuTriggerData]="{
575578
productData: (productCountByType$ | async),
576579
}"
577580
>
578581
{{
579-
(currentDatasetID$ | async) === 'NISAR'
582+
currentDatasetID === 'NISAR'
580583
? ('ADD_BY_FILE_TYPE' | translate)
581584
: ('ADD_BY_PRODUCT_TYPE' | translate)
582585
}}
583586
</button>
587+
}
584588
</mat-menu>
585589

586590
<mat-menu #addAllProductsOfType>

src/app/models/cmr-product.model.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ export interface CMRProductMetadata {
7272

7373
// BURST XML, OPERA-S1, NISAR
7474
subproducts: any[];
75+
additionalUrls?: string[] | null;
7576
s3URI?: string;
77+
s3Urls?: string[] | null;
78+
fileSizes?: {} | null;
7679
parentID: string;
7780

7881
// ARIA S1 GUNW
@@ -93,6 +96,7 @@ export interface SLCBurstMetadata {
9396
export interface OperaS1Metadata {
9497
operaBurstID: string;
9598
additionalUrls: string[];
99+
s3Urls: string[];
96100
validityStartDate?: moment.Moment | null;
97101
}
98102

src/app/models/dataset.model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export interface Dataset {
3333
ascending: string;
3434
descending: string;
3535
};
36+
productTypeDisplays?: {[index: string]: string};
3637
}
3738

3839
export enum MissionDataset {

src/app/models/datasets/nisar.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,20 @@ export const nisar = {
275275
// ],
276276
platformDesc: 'NISAR_DESC',
277277
platformIcon: '/assets/icons/satellite_alt_black_48dp.svg',
278+
279+
productTypeDisplays: {
280+
yaml: 'Runconfig YAML',
281+
kml: 'Footprint KML',
282+
png: 'Browse Image PNG',
283+
csv: 'QA Summary CSV',
284+
h5: 'HDF5',
285+
xml: 'ISO Metadata XML',
286+
json: 'Metadata JSON',
287+
pdf: 'QA Report PDF',
288+
log: 'Log File',
289+
qa: 'QA Statistics HDF5',
290+
bin: 'Bin File',
291+
}
278292
};
279293

280294
export const L1L2BrowseCollectionMapping = {

src/app/models/datasets/opera_s1.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,19 @@ export const opera_s1 = {
6666
],
6767
platformDesc: 'OPERA_S1_DESC',
6868
platformIcon: '/assets/icons/satellite_alt_black_48dp.svg',
69+
productTypeDisplays: {
70+
hh: 'HH GeoTIFF',
71+
hv: 'HV GeoTIFF',
72+
vv: 'VV GeoTIFF',
73+
vh: 'VH GeoTIFF',
74+
mask: 'Mask GeoTIFF',
75+
nc: 'Netcdf File',
76+
h5: 'HDF5',
77+
xml: 'Metadata XML',
78+
rtc_anf_gamma0_to_sigma0: 'RTC Gamma to Sigma GeoTIFF',
79+
number_of_looks: '# of Looks GeoTIFF',
80+
incidence_angle: 'Incidence Angle GeoTIFF',
81+
rtc_anf_gamma0_to_beta0: 'RTC Gamm to Beta GeoTIFF',
82+
local_incidence_angle: 'Local Incidence Angle GeoTIFF',
83+
}
6984
};

src/app/models/datasets/seasat.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const seasat = {
1313
Props.FLIGHT_DIRECTION,
1414
Props.POLARIZATION,
1515
Props.ABSOLUTE_ORBIT,
16+
Props.USE_BEAM_MODE,
1617
],
1718
apiValue: { dataset: 'SEASAT' },
1819
date: {
@@ -24,22 +25,23 @@ export const seasat = {
2425
name: 'NASA',
2526
url: 'https://www.nasa.gov/',
2627
},
27-
infoUrl: 'https://asf.alaska.edu/datasets/daac/seasat/',
28+
infoUrl: 'https://www.earthdata.nasa.gov/data/catalog/asf-seasat-l1-sar-1',
2829
citationUrl:
2930
'https://asf.alaska.edu/data-sets/sar-data-sets/seasat/seasat-how-to-cite/',
3031
productTypes: [
31-
{
32-
apiValue: 'GEOTIFF',
33-
displayName: 'Level One GeoTIFF product',
34-
},
35-
{
36-
apiValue: 'L1',
37-
displayName: 'Level One HDF5 Image',
38-
},
3932
],
4033
beamModes: ['STD'],
4134
polarizations: ['HH'],
4235
subtypes: [],
4336
platformDesc: 'SEASAT_DESC',
4437
platformIcon: '/assets/icons/satellite_alt_black_48dp.svg',
38+
productTypeDisplays: {
39+
h5: 'Level One HDF5 Image',
40+
in: 'Metadata IN',
41+
tif: 'Level One GeoTIFF Product',
42+
xml: 'ISO Metadata XML',
43+
kml: 'Metadata KML',
44+
qc_report: 'QC Report',
45+
jpg: 'Browse Image JPEG'
46+
}
4547
};

src/app/services/product.service.spec.ts

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { TestBed } from '@angular/core/testing';
22

33
import { ProductService } from './product.service';
4+
import * as models from '@models';
45

56
describe('ProductService', () => {
67
let service: ProductService;
@@ -16,34 +17,44 @@ describe('ProductService', () => {
1617
it('should parse old links correctly', () => {
1718
const url =
1819
'https://datapool.asf.alaska.edu/RTC/OPERA-S1/OPERA_L2_RTC-S1_T001-000189-IW2_20211028T180924Z_20250703T015334Z_S1A_30_v1.0_VH.tif';
19-
expect(service.urlToProductType(url)).toBe('VH');
20+
expect(service.urlToProductType(url, models.opera_s1.productTypeDisplays)).toBe('VH');
2021
});
2122
it('should parse h5 cumulus link', () => {
2223
const url =
2324
'https://cumulus.asf.earthdatacloud.nasa.gov/OPERA/OPERA_L2_RTC-S1/OPERA_L2_RTC-S1_T139-297356-IW2_20250929T054926Z_20251002T213318Z_S1C_30_v1.0/OPERA_L2_RTC-S1_T139-297356-IW2_20250929T054926Z_20251002T213318Z_S1C_30_v1.0_VH.tif';
24-
expect(service.urlToProductType(url)).toBe('VH');
25+
expect(service.urlToProductType(url, models.opera_s1.productTypeDisplays)).toBe('VH');
2526
});
2627
it('should parse a base download url', () => {
2728
const url =
2829
'https://cumulus.asf.earthdatacloud.nasa.gov/OPERA/OPERA_L2_RTC-S1/OPERA_L2_RTC-S1_T140-299545-IW1_20250929T073003Z_20251003T012020Z_S1C_30_v1.0/OPERA_L2_RTC-S1_T140-299545-IW1_20250929T073003Z_20251003T012020Z_S1C_30_v1.0.h5';
29-
expect(service.urlToProductType(url)).toBe('h5');
30+
expect(service.urlToProductType(url, models.opera_s1.productTypeDisplays)).toBe('h5');
3031
});
3132
it('should parse links with more than one word', () => {
3233
const datapool =
3334
'https://datapool.asf.alaska.edu/RTC-STATIC/OPERA-S1/OPERA_L2_RTC-S1-STATIC_T144-308004-IW3_20140403_S1A_30_v1.0_number_of_looks.tif';
3435
const cumulus =
3536
'https://cumulus.asf.earthdatacloud.nasa.gov/OPERA/OPERA-S1/OPERA_L2_RTC-S1-STATIC_T144-308004-IW3_20140403_S1A_30_v1.0_number_of_looks.tif';
36-
expect(service.urlToProductType(datapool)).toBe('number_of_looks');
37-
expect(service.urlToProductType(cumulus)).toBe('number_of_looks');
37+
expect(service.urlToProductType(datapool, models.opera_s1.productTypeDisplays)).toBe('number_of_looks');
38+
expect(service.urlToProductType(cumulus, models.opera_s1.productTypeDisplays)).toBe('number_of_looks');
3839
});
3940
it('should parse xml cumulus link', () => {
4041
const url =
4142
'https://cumulus.asf.earthdatacloud.nasa.gov/OPERA/OPERA_L4_TROPO-ZENITH_V1/OPERA_L4_TROPO-ZENITH_20251003T180000Z_20251006T000715Z_HRES_v1.0/OPERA_L4_TROPO-ZENITH_20251003T180000Z_20251006T000715Z_HRES_v1.0.iso.xml';
42-
expect(service.urlToProductType(url)).toBe('xml');
43+
expect(service.urlToProductType(url, models.opera_s1.productTypeDisplays)).toBe('xml');
4344
});
4445
it('should parse netcdf cumulus link', () => {
4546
const url =
4647
'https://cumulus.asf.earthdatacloud.nasa.gov/OPERA/OPERA_L4_TROPO-ZENITH_V1/OPERA_L4_TROPO-ZENITH_20251003T180000Z_20251006T000715Z_HRES_v1.0/OPERA_L4_TROPO-ZENITH_20251003T180000Z_20251006T000715Z_HRES_v1.0.nc';
47-
expect(service.urlToProductType(url)).toBe('nc');
48+
expect(service.urlToProductType(url, models.opera_s1.productTypeDisplays)).toBe('nc');
49+
});
50+
it('should parse seasat hdf5 link', () => {
51+
const url =
52+
'https://cumulus.asf.earthdatacloud.nasa.gov/SEASAT/SS_01502_STD_F2536/SS_01502_STD_F2536.h5';
53+
expect(service.urlToProductType(url, models.seasat.productTypeDisplays)).toBe('h5');
54+
});
55+
it('should parse seasat geotiff s3 link', () => {
56+
const url =
57+
'https://cumulus.asf.earhtdatacloud.nasa.gov/SEASAT/SS_01502_STD_F2536/SS_01502_STD_F2536.tif';
58+
expect(service.urlToProductType(url, models.seasat.productTypeDisplays)).toBe('tif');
4859
});
4960
});

0 commit comments

Comments
 (0)