Skip to content

Commit

Permalink
fix: fix queryable parameter id for provider earth_search
Browse files Browse the repository at this point in the history
  • Loading branch information
dalpasso committed Mar 22, 2024
1 parent 48e5932 commit ffbc054
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 7 additions & 3 deletions eodag/resources/providers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1799,7 +1799,9 @@
S2_MSI_L1C:
productType: sentinel-2-l1c
metadata_mapping:
id: '{$.properties."s2:product_uri"#remove_extension}'
id:
- id
- '{$.properties."s2:product_uri"#remove_extension}'
title: '{$.properties."s2:product_uri"#remove_extension}'
platformSerialIdentifier: '$.id.`split(_, 0, -1)`'
polarizationMode: '$.id.`sub(/.{14}([A-Z]{2}).*/, \\1)`'
Expand All @@ -1819,10 +1821,12 @@
tileIdentifier:
- '{{"query":{{"mgrs:utm_zone":{{"eq":"{tileIdentifier#slice_str(0,2,1)}"}},"mgrs:latitude_band":{{"eq":"{tileIdentifier#slice_str(2,3,1)}"}},"mgrs:grid_square":{{"eq":"{tileIdentifier#slice_str(3,5,1)}"}}}}}}'
- '{utmZone}{latitudeBand}{gridSquare}'
S2_MSI_L2A:
S2_MSI_L2A_JP2:
productType: sentinel-2-l2a
metadata_mapping:
id: '{$.properties."s2:product_uri"#remove_extension}'
id:
- id
- '{$.properties."s2:product_uri"#remove_extension}'
title: '{$.properties."s2:product_uri"#remove_extension}'
platformSerialIdentifier: '$.id.`split(_, 0, -1)`'
polarizationMode: '$.id.`sub(/.{14}([A-Z]{2}).*/, \\1)`'
Expand Down
3 changes: 2 additions & 1 deletion tests/units/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ class TestCore(TestCoreBase):
"cop_dataspace",
"creodias",
"creodias_s3",
"earth_search",
"onda",
"planetary_computer",
"sara",
"wekeo",
],
"S2_MSI_L2AP": ["wekeo"],
"S2_MSI_L2A_COG": ["earth_search_cog"],
"S2_MSI_L2A_JP2": ["earth_search"],
"S2_MSI_L2A_MAJA": ["theia"],
"S2_MSI_L2B_MAJA_SNOW": ["theia"],
"S2_MSI_L2B_MAJA_WATER": ["theia"],
Expand Down Expand Up @@ -1705,6 +1705,7 @@ def test_guess_product_type_with_kwargs(self):
"S2_MSI_L2A",
"S2_MSI_L2AP",
"S2_MSI_L2A_COG",
"S2_MSI_L2A_JP2",
"S2_MSI_L2A_MAJA",
"S2_MSI_L2B_MAJA_SNOW",
"S2_MSI_L2B_MAJA_WATER",
Expand Down

0 comments on commit ffbc054

Please sign in to comment.