diff --git a/src/app/components/timeseries-chart/timeseries-chart-export/timeseries-chart-export.component.html b/src/app/components/timeseries-chart/timeseries-chart-export/timeseries-chart-export.component.html index 5ae68b1a9..98a5f433b 100644 --- a/src/app/components/timeseries-chart/timeseries-chart-export/timeseries-chart-export.component.html +++ b/src/app/components/timeseries-chart/timeseries-chart-export/timeseries-chart-export.component.html @@ -6,7 +6,7 @@
- +
diff --git a/src/app/components/timeseries-chart/timeseries-chart.component.ts b/src/app/components/timeseries-chart/timeseries-chart.component.ts index 57926290d..5d33ed479 100644 --- a/src/app/components/timeseries-chart/timeseries-chart.component.ts +++ b/src/app/components/timeseries-chart/timeseries-chart.component.ts @@ -308,7 +308,7 @@ export class TimeseriesChartComponent implements OnInit, OnDestroy { }); if (result.state.checked) { - const series_key = `series ${result.state.seriesNumber}` + const series_key = result.state.seriesNumber.toString() if (!!!this.exportableData[series_key]) { this.exportableData[series_key] = [] } diff --git a/src/app/services/map/map.service.ts b/src/app/services/map/map.service.ts index 4da700d9c..e04129030 100644 --- a/src/app/services/map/map.service.ts +++ b/src/app/services/map/map.service.ts @@ -22,6 +22,7 @@ import * as sceneStore from '@store/scenes'; import { HttpClient } from "@angular/common/http"; import * as polygonStyle from './polygon.style'; +// import * as tileStyle from 'ol/style' import * as views from './views'; import { SarviewsEvent } from '@models'; import { EventEmitter } from '@angular/core'; @@ -771,7 +772,13 @@ export class MapService { this.displacementOverview = new TileLayer({ 'source': overview_source, - 'extent': response['extent'] + 'extent': response['extent'], + 'style': { + // 'color': 'pink', + // 'fill': new Fill({ + // 'color': 'red' + // }) + } }); this.map.addLayer(this.displacementOverview); diff --git a/src/app/services/netcdf-service.service.ts b/src/app/services/netcdf-service.service.ts index 2a4046252..ba5954d60 100644 --- a/src/app/services/netcdf-service.service.ts +++ b/src/app/services/netcdf-service.service.ts @@ -28,7 +28,7 @@ export class NetcdfService { private descendingCache = {} private totalKeys = []; private maxCacheSize = 10; - private csvHeaders = 'series, longitude, latitude, date (mm/dd/yr), short wavelength displacement, source file' + private csvHeaders = 'name, geometry, date (mm/dd/yr), short wavelength displacement, source file' constructor( private http: HttpClient, @@ -129,19 +129,13 @@ export class NetcdfService { // series 1, 1.0, 2.0, 05/14/2020, 0.500, granule1.nc // ... public toCSV(seriesData: { [index:string]: {}[]}): string { - const reg = /-?\d*\.\d+|\d+/g let output = `${this.csvHeaders}\n` const sortedSeriesKeys = Object.keys(seriesData).sort((s1, s2) => s1 < s2 ? -1 : 1) for (const seriesNumber of sortedSeriesKeys) { - let points = seriesData[seriesNumber][0]['wkt'].match(reg) - const lon = points[0] - const lat = points[1] - for (const timestep of seriesData[seriesNumber]) { if (timestep !== 'aoi') { let dateDisplay = '' - // const sample = data.data[timestep] if (timestep !== 'mean') { const d = new Date(timestep['date']) @@ -158,7 +152,7 @@ export class NetcdfService { } dateDisplay = `${monthDisplay}/${dayDisplay}/${d.getUTCFullYear()}` } - output += `${seriesNumber}, ${lon}, ${lat}, ${dateDisplay}, ${timestep['short_wavelength_displacement']}, ${timestep['fileName']}\n` + output += `Series ${seriesNumber}, ${timestep['wkt']}, ${dateDisplay}, ${timestep['short_wavelength_displacement']}, ${timestep['fileName']}\n` } } }