Skip to content

Commit

Permalink
Merge branch 'master' into fix/add-support-for-new-forestry-PVs
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Thiex committed Jan 21, 2025
2 parents 12f4e27 + 4d82b2e commit 668c765
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/dataimport/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export enum PlanetPVType {
}

export enum PlanetPVId {
BIOMASS_PROXY_V3_0_10 = 'BIOMASS-PROXY_V3.0_10',
BIOMASS_PROXY_V4_0_10 = 'BIOMASS-PROXY_V4.0_10',
LST_AMSR2_V1_0_100 = 'LST-AMSR2_V1.0_100',
LST_AMSRE_V1_0_1000 = 'LST-AMSRE_V1.0_1000',
Expand Down Expand Up @@ -123,7 +122,7 @@ export enum PlanetPVId {
}

export const PlanetSupportedPVIds = {
[PlanetPVType.BiomassProxy]: [PlanetPVId.BIOMASS_PROXY_V3_0_10, PlanetPVId.BIOMASS_PROXY_V4_0_10],
[PlanetPVType.BiomassProxy]: [PlanetPVId.BIOMASS_PROXY_V4_0_10],
[PlanetPVType.LandSurfaceTemperature]: [
PlanetPVId.LST_AMSR2_V1_0_100,
PlanetPVId.LST_AMSRE_V1_0_1000,
Expand Down
24 changes: 24 additions & 0 deletions src/layer/LayersFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ import {
DATASET_CDAS_S3OLCI,
DATASET_CDAS_S5PL2,
DATASET_CDAS_S3OLCIL2,
DATASET_CDAS_OTC_S2L2A,
DATASET_CDAS_OTC_S1GRD,
DATASET_CDAS_OTC_S2L1C,
DATASET_CDAS_OTC_S3SLSTR,
DATASET_CDAS_OTC_S3OLCI,
DATASET_CDAS_OTC_S3OLCIL2,
DATASET_CDAS_OTC_S5PL2,
DATASET_CDAS_OTC_DEM,
} from './dataset';
import { AbstractLayer } from './AbstractLayer';
import { WmsLayer } from './WmsLayer';
Expand Down Expand Up @@ -88,17 +96,24 @@ export class LayersFactory {
private static readonly DATASET_FROM_JSON_GETCAPAPABILITIES = [
DATASET_AWSEU_S1GRD,
DATASET_CDAS_S1GRD,
DATASET_CDAS_OTC_S1GRD,
DATASET_S2L2A,
DATASET_S2L1C,
DATASET_CDAS_S2L2A,
DATASET_CDAS_OTC_S2L2A,
DATASET_CDAS_S2L1C,
DATASET_CDAS_OTC_S2L1C,
DATASET_S3SLSTR,
DATASET_S3OLCI,
DATASET_CDAS_S3SLSTR,
DATASET_CDAS_OTC_S3SLSTR,
DATASET_CDAS_S3OLCI,
DATASET_CDAS_OTC_S3OLCI,
DATASET_CDAS_S3OLCIL2,
DATASET_CDAS_OTC_S3OLCIL2,
DATASET_S5PL2,
DATASET_CDAS_S5PL2,
DATASET_CDAS_OTC_S5PL2,
DATASET_AWS_L8L1C,
DATASET_AWS_LOTL1,
DATASET_AWS_LOTL2,
Expand All @@ -111,23 +126,31 @@ export class LayersFactory {
DATASET_MODIS,
DATASET_AWS_DEM,
DATASET_CDAS_DEM,
DATASET_CDAS_OTC_DEM,
DATASET_BYOC,
];

private static readonly LAYER_FROM_DATASET_V3 = {
[DATASET_AWSEU_S1GRD.id]: S1GRDAWSEULayer,
[DATASET_CDAS_S1GRD.id]: S1GRDCDASLayer,
[DATASET_CDAS_OTC_S1GRD.id]: S1GRDCDASLayer,
[DATASET_S2L2A.id]: S2L2ALayer,
[DATASET_S2L1C.id]: S2L1CLayer,
[DATASET_CDAS_S2L2A.id]: S2L2ACDASLayer,
[DATASET_CDAS_OTC_S2L2A.id]: S2L2ACDASLayer,
[DATASET_CDAS_S2L1C.id]: S2L1CCDASLayer,
[DATASET_CDAS_OTC_S2L1C.id]: S2L1CCDASLayer,
[DATASET_S3SLSTR.id]: S3SLSTRLayer,
[DATASET_CDAS_S3SLSTR.id]: S3SLSTRCDASLayer,
[DATASET_CDAS_OTC_S3SLSTR.id]: S3SLSTRCDASLayer,
[DATASET_S3OLCI.id]: S3OLCILayer,
[DATASET_CDAS_S3OLCI.id]: S3OLCICDASLayer,
[DATASET_CDAS_OTC_S3OLCI.id]: S3OLCICDASLayer,
[DATASET_CDAS_S3OLCIL2.id]: S3OLCIL2CDASLayer,
[DATASET_CDAS_OTC_S3OLCIL2.id]: S3OLCIL2CDASLayer,
[DATASET_S5PL2.id]: S5PL2Layer,
[DATASET_CDAS_S5PL2.id]: S5PL2CDASLayer,
[DATASET_CDAS_OTC_S5PL2.id]: S5PL2CDASLayer,
[DATASET_AWS_L8L1C.id]: Landsat8AWSLayer,
[DATASET_AWS_LOTL1.id]: Landsat8AWSLOTL1Layer,
[DATASET_AWS_LOTL2.id]: Landsat8AWSLOTL2Layer,
Expand All @@ -141,6 +164,7 @@ export class LayersFactory {
[DATASET_AWS_DEM.id]: DEMLayer,
[DATASET_AWSUS_DEM.id]: DEMAWSUSLayer,
[DATASET_CDAS_DEM.id]: DEMCDASLayer,
[DATASET_CDAS_OTC_DEM.id]: DEMCDASLayer,
[DATASET_BYOC.id]: BYOCLayer,
};

Expand Down
4 changes: 4 additions & 0 deletions src/layer/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export const SH_SERVICE_HOSTNAMES_V3: string[] = [
'https://services-uswest2.sentinel-hub.com/',
'https://creodias.sentinel-hub.com/',
'https://sh.dataspace.copernicus.eu/',
'https://sh-otc.dataspace.copernicus.eu/',
];

// See https://services.sentinel-hub.com/api/v1/metadata/location/ for an up-to-date
Expand All @@ -163,6 +164,7 @@ export enum LocationIdSHv3 {
mundi = 'mundi',
gcpUsCentral1 = 'gcp-us-central1',
cdse = 'cdse',
cdseOtc = 'cdse-otc',
}
export const SHV3_LOCATIONS_ROOT_URL: Record<LocationIdSHv3, string> = {
[LocationIdSHv3.awsEuCentral1]: 'https://services.sentinel-hub.com/',
Expand All @@ -171,11 +173,13 @@ export const SHV3_LOCATIONS_ROOT_URL: Record<LocationIdSHv3, string> = {
[LocationIdSHv3.mundi]: 'https://shservices.mundiwebservices.com/',
[LocationIdSHv3.gcpUsCentral1]: 'https://services-gcp-us-central1.sentinel-hub.com/',
[LocationIdSHv3.cdse]: 'https://sh.dataspace.copernicus.eu/',
[LocationIdSHv3.cdseOtc]: 'https://sh-otc.dataspace.copernicus.eu/',
};

export const SH_SERVICE_ROOT_URL = {
default: SHV3_LOCATIONS_ROOT_URL[LocationIdSHv3.awsEuCentral1],
cdse: SHV3_LOCATIONS_ROOT_URL[LocationIdSHv3.cdse],
cdseOtc: SHV3_LOCATIONS_ROOT_URL[LocationIdSHv3.cdseOtc],
};

export type GetStatsParams = {
Expand Down
120 changes: 120 additions & 0 deletions src/layer/dataset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ export const DATASET_CDAS_S1GRD: Dataset = {
catalogCollectionId: 'sentinel-1-grd',
};

export const DATASET_CDAS_OTC_S1GRD: Dataset = {
id: 'CDAS_S1GRD',
shJsonGetCapabilitiesDataset: 'S1GRD',
shWmsEvalsource: 'S1GRD',
shProcessingApiDatasourceAbbreviation: 'S1GRD',
datasetParametersType: 'S1GRD',
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S1GRD/searchIndex',
findDatesUTCUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S1GRD/findAvailableData',
orbitTimeMinutes: 49.3,
minDate: new Date(Date.UTC(2014, 10 - 1, 3, 0, 47, 14)), // 2014-10-03T00:47:14Z
maxDate: null,
catalogCollectionId: 'sentinel-1-grd',
};

export const DATASET_S2L2A: Dataset = {
id: 'AWS_S2L2A',
shJsonGetCapabilitiesDataset: 'S2L2A',
Expand Down Expand Up @@ -88,6 +103,21 @@ export const DATASET_CDAS_S2L2A: Dataset = {
catalogCollectionId: 'sentinel-2-l2a',
};

export const DATASET_CDAS_OTC_S2L2A: Dataset = {
id: 'CDAS_S2L2A',
shJsonGetCapabilitiesDataset: 'S2L2A',
shWmsEvalsource: 'S2L2A',
shProcessingApiDatasourceAbbreviation: 'S2L2A',
datasetParametersType: 'S2',
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S2L2A/searchIndex',
findDatesUTCUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S2L2A/findAvailableData',
orbitTimeMinutes: 50.3,
minDate: new Date(Date.UTC(2016, 10 - 1, 20, 8, 9, 58)), // 2016-10-20T08:09:58Z
maxDate: null,
catalogCollectionId: 'sentinel-2-l2a',
};

export const DATASET_CDAS_S2L1C: Dataset = {
id: 'CDAS_S2L1C',
shJsonGetCapabilitiesDataset: 'S2L1C',
Expand All @@ -102,6 +132,22 @@ export const DATASET_CDAS_S2L1C: Dataset = {
maxDate: null,
catalogCollectionId: 'sentinel-2-l1c',
};

export const DATASET_CDAS_OTC_S2L1C: Dataset = {
id: 'CDAS_S2L1C',
shJsonGetCapabilitiesDataset: 'S2L1C',
shWmsEvalsource: 'S2',
shProcessingApiDatasourceAbbreviation: 'S2L1C',
datasetParametersType: 'S2',
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S2L1C/searchIndex',
findDatesUTCUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S2L1C/findAvailableData',
orbitTimeMinutes: 50.3,
minDate: new Date(Date.UTC(2015, 6 - 1, 27, 10, 25, 31)), // 2015-06-27T10:25:31
maxDate: null,
catalogCollectionId: 'sentinel-2-l1c',
};

export const DATASET_S3SLSTR: Dataset = {
id: 'CRE_S3SLSTR',
shJsonGetCapabilitiesDataset: 'S3SLSTR',
Expand Down Expand Up @@ -132,6 +178,21 @@ export const DATASET_CDAS_S3SLSTR: Dataset = {
catalogCollectionId: 'sentinel-3-slstr',
};

export const DATASET_CDAS_OTC_S3SLSTR: Dataset = {
id: 'CDAS_S3SLSTR',
shJsonGetCapabilitiesDataset: 'S3SLSTR',
shWmsEvalsource: 'S3SLSTR',
shProcessingApiDatasourceAbbreviation: 'S3SLSTR',
datasetParametersType: 'S3SLSTR',
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S3SLSTR/searchIndex',
findDatesUTCUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S3SLSTR/findAvailableData',
orbitTimeMinutes: 50.495,
minDate: new Date(Date.UTC(2016, 4 - 1, 19, 0, 46, 32)), // 2016-04-19T00:46:32.578
maxDate: null,
catalogCollectionId: 'sentinel-3-slstr',
};

export const DATASET_S3OLCI: Dataset = {
id: 'CRE_S3OLCI',
shJsonGetCapabilitiesDataset: 'S3OLCI',
Expand Down Expand Up @@ -162,6 +223,21 @@ export const DATASET_CDAS_S3OLCI: Dataset = {
catalogCollectionId: 'sentinel-3-olci',
};

export const DATASET_CDAS_OTC_S3OLCI: Dataset = {
id: 'CDAS_S3OLCI',
shJsonGetCapabilitiesDataset: 'S3OLCI',
shWmsEvalsource: 'S3OLCI',
shProcessingApiDatasourceAbbreviation: 'S3OLCI',
datasetParametersType: 'S3',
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S3OLCI/searchIndex',
findDatesUTCUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S3OLCI/findAvailableData',
orbitTimeMinutes: 50.495,
minDate: new Date(Date.UTC(2016, 4 - 1, 25, 11, 33, 14)), // 2016-04-25T11:33:14
maxDate: null,
catalogCollectionId: 'sentinel-3-olci',
};

export const DATASET_CDAS_S3OLCIL2: Dataset = {
id: 'CDAS_S3OLCIL2',
shJsonGetCapabilitiesDataset: 'S3OLCIL2',
Expand All @@ -177,6 +253,21 @@ export const DATASET_CDAS_S3OLCIL2: Dataset = {
catalogCollectionId: 'sentinel-3-olci-l2',
};

export const DATASET_CDAS_OTC_S3OLCIL2: Dataset = {
id: 'CDAS_S3OLCIL2',
shJsonGetCapabilitiesDataset: 'S3OLCIL2',
shWmsEvalsource: 'sentinel-3-olci-l2',
shProcessingApiDatasourceAbbreviation: 'sentinel-3-olci-l2',
datasetParametersType: 'S3',
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S3OLCIL2/searchIndex',
findDatesUTCUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S3OLCIL2/findAvailableData',
orbitTimeMinutes: 50.495,
minDate: new Date(Date.UTC(2016, 4 - 1, 25, 11, 33, 14)), // 2016-04-25T11:33:14
maxDate: null,
catalogCollectionId: 'sentinel-3-olci-l2',
};

export const DATASET_S5PL2: Dataset = {
id: 'CRE_S5PL2',
shJsonGetCapabilitiesDataset: 'S5PL2',
Expand Down Expand Up @@ -207,6 +298,21 @@ export const DATASET_CDAS_S5PL2: Dataset = {
catalogCollectionId: 'sentinel-5p-l2',
};

export const DATASET_CDAS_OTC_S5PL2: Dataset = {
id: 'CDAS_S5PL2',
shJsonGetCapabilitiesDataset: 'S5PL2',
shWmsEvalsource: 'S5P_L2',
shProcessingApiDatasourceAbbreviation: 'S5PL2',
datasetParametersType: 'S5PL2',
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S5PL2/searchIndex',
findDatesUTCUrl: 'https://sh-otc.dataspace.copernicus.eu/index/v3/collections/S5PL2/findAvailableData',
orbitTimeMinutes: 101,
minDate: new Date(Date.UTC(2018, 4 - 1, 30, 0, 18, 51)), // 2018-04-30T00:18:51
maxDate: null,
catalogCollectionId: 'sentinel-5p-l2',
};

export const DATASET_AWS_L8L1C: Dataset = {
id: 'AWS_L8L1C',
shJsonGetCapabilitiesDataset: 'L8L1C',
Expand Down Expand Up @@ -399,6 +505,20 @@ export const DATASET_CDAS_DEM: Dataset = {
maxDate: null,
};

export const DATASET_CDAS_OTC_DEM: Dataset = {
id: 'CDAS_DEM',
shJsonGetCapabilitiesDataset: 'DEM',
shWmsEvalsource: 'DEM',
shProcessingApiDatasourceAbbreviation: 'DEM',
datasetParametersType: null,
shServiceHostname: 'https://sh-otc.dataspace.copernicus.eu/',
searchIndexUrl: null,
findDatesUTCUrl: null,
orbitTimeMinutes: null,
minDate: null,
maxDate: null,
};

export const DATASET_BYOC: Dataset = {
id: 'CUSTOM',
shJsonGetCapabilitiesDataset: 'CUSTOM',
Expand Down

0 comments on commit 668c765

Please sign in to comment.