-
Notifications
You must be signed in to change notification settings - Fork 29
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
Update Landsat 8 Collection 2 Level 2 asset keys #90
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Landsat 8 Collection 2 Level 2 created item asset keys currently has the file extension in the key name. With the current code, there was inconsistent capatilization of the extension. On consideration, the inclusion of file extensions is consistent with the USGS 0.7 Items but is inconsistent with other STAC items produces. The assets themselves describe the media type and the HREFs have the file extension, and having the file extension in asset key is duplicate information and may be confusing to users. This commit switches to dropping file extensions in key names. The only exception is the MTL file, which has multiple file types - these assets retain their extension to differentiate between the various assets.
Example Item: {
"type": "Feature",
"stac_version": "1.0.0-beta.2",
"id": "LC08_L2SP_017036_20130419_20200913_02_T2",
"properties": {
"platform": "landsat-8",
"instruments": [
"oli",
"tirs"
],
"description": "Landsat Collection 2 Level-2 Surface Reflectance Product",
"eo:cloud_cover": 100.0,
"view:sun_elevation": 59.24977384,
"view:sun_azimuth": 133.70859229,
"proj:epsg": 32617,
"proj:bbox": [
207600.0,
3719700.0,
445200.0,
3942900.0
],
"landsat:cloud_cover_land": 100.0,
"landsat:wrs_type": "2",
"landsat:wrs_path": "017",
"landsat:wrs_row": "036",
"landsat:collection_category": "T2",
"landsat:collection_number": "02",
"landsat:processing_level": "L2SP",
"landsat8:scene_id": "LC80170362013109LGN02",
"datetime": "2013-04-19T16:01:51.829419Z"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-83.76284530727449,
35.627627662047246
],
[
-81.59237408884647,
35.21652897702687
],
[
-82.05865080201224,
33.579547111348994
],
[
-84.22392169691585,
34.00957549924574
],
[
-83.76284530727449,
35.627627662047246
]
]
]
},
"links": [
{
"rel": "alternate",
"href": "https://landsatlook.usgs.gov/stac-browser/collection02/level-2/standard/oli-tirs/2013/017/036/LC08_L2SP_017036_20130419_20200913_02_T2",
"type": "text/html",
"title": "USGS stac-browser page"
},
{
"rel": "self",
"href": "/tmp/tmpzm9i_xkk/create/LC08_L2SP_017036_20130419_20200913_02_T2.json",
"type": "application/json"
}
],
"assets": {
"thumbnail": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_thumb_small.jpeg",
"type": "image/jpeg",
"title": "Thumbnail image"
},
"reduced_resolution_browse": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_thumb_large.jpeg",
"type": "image/jpeg",
"title": "Reduced resolution browse image"
},
"ANG": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ANG.txt",
"type": "text/plain",
"title": "Angle Coefficients File",
"description": "Collection 2 Level-1 Angle Coefficients File (ANG)"
},
"MTL.txt": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_MTL.txt",
"type": "text/plain",
"title": "Product Metadata File",
"description": "Collection 2 Level-1 Product Metadata File (MTL)"
},
"MTL.xml": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_MTL.xml",
"type": "application/xml",
"title": "Product Metadata File (xml)",
"description": "Collection 2 Level-1 Product Metadata File (xml)"
},
"MTL.json": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_MTL.json",
"type": "application/json",
"title": "Product Metadata File (json)",
"description": "Collection 2 Level-1 Product Metadata File (json)"
},
"QA_PIXEL": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_QA_PIXEL.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Pixel Quality Assessment Band",
"description": "Collection 2 Level-1 Pixel Quality Assessment Band",
"gsd": 30.0,
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"QA_RADSAT": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_QA_RADSAT.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Radiometric Saturation Quality Assessment Band",
"description": "Collection 2 Level-1 Radiometric Saturation Quality Assessment Band",
"gsd": 30.0,
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B1": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_B1.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Coastal/Aerosol Band (B1)",
"description": "Collection 2 Level-2 Coastal/Aerosol Band (B1) Surface Reflectance",
"gsd": 30.0,
"eo:bands": [
{
"name": "SR_B1",
"common_name": "coastal",
"gsd": 30,
"center_wavelength": 0.44,
"full_width_half_max": 0.02
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B2": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_B2.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Blue Band (B2)",
"description": "Collection 2 Level-2 Blue Band (B2) Surface Reflectance",
"gsd": 30.0,
"eo:bands": [
{
"name": "SR_B2",
"common_name": "blue",
"gsd": 30,
"center_wavelength": 0.48,
"full_width_half_max": 0.06
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B3": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_B3.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Green Band (B3)",
"description": "Collection 2 Level-2 Green Band (B3) Surface Reflectance",
"gsd": 30.0,
"eo:bands": [
{
"name": "SR_B3",
"common_name": "green",
"gsd": 30,
"center_wavelength": 0.56,
"full_width_half_max": 0.06
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B4": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_B4.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Red Band (B4)",
"description": "Collection 2 Level-2 Red Band (B4) Surface Reflectance",
"gsd": 30.0,
"eo:bands": [
{
"name": "SR_B4",
"common_name": "red",
"gsd": 30,
"center_wavelength": 0.65,
"full_width_half_max": 0.04
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B5": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_B5.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Near Infrared Band 0.8 (B5)",
"description": "Collection 2 Level-2 Near Infrared Band 0.8 (B5) Surface Reflectance",
"gsd": 30.0,
"eo:bands": [
{
"name": "SR_B5",
"common_name": "nir08",
"gsd": 30,
"center_wavelength": 0.86,
"full_width_half_max": 0.03
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B6": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_B6.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Short-wave Infrared Band 1.6 (B6)",
"description": "Collection 2 Level-2 Short-wave Infrared Band 1.6 (B6) Surface Reflectance",
"gsd": 30.0,
"eo:bands": [
{
"name": "SR_B6",
"common_name": "swir16",
"gsd": 30,
"center_wavelength": 1.6,
"full_width_half_max": 0.08
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B7": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_B7.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Short-wave Infrared Band 2.2 (B7)",
"description": "Collection 2 Level-2 Short-wave Infrared Band 2.2 (B7) Surface Reflectance",
"gsd": 30.0,
"eo:bands": [
{
"name": "SR_B7",
"common_name": "swir22",
"gsd": 30,
"center_wavelength": 2.2,
"full_width_half_max": 0.2
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"SR_B8": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_SR_QA_AEROSOL.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Aerosol Quality Analysis Band",
"description": "Collection 2 Level-2 Aerosol Quality Analysis Band (ANG) Surface Reflectance",
"gsd": 30.0,
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_B10": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_B10.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Surface Temperature Band (B10)",
"description": "Landsat Collection 2 Level-2 Surface Temperature Band (B10) Surface Temperature Product",
"gsd": 100.0,
"eo:bands": [
{
"name": "ST_B10",
"common_name": "lwir11",
"gsd": 100.0,
"center_wavelength": 10.9,
"full_width_half_max": 0.8
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_ATRAN": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_ATRAN.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Atmospheric Transmittance Band",
"description": "Landsat Collection 2 Level-2 Atmospheric Transmittance Band Surface Temperature Product",
"gsd": 30.0,
"eo:bands": [
{
"name": "ST_ATRAN",
"description": "atmospheric transmission",
"gsd": 30
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_CDIST": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_CDIST.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Cloud Distance Band",
"description": "Landsat Collection 2 Level-2 Cloud Distance Band Surface Temperature Product",
"gsd": 30.0,
"eo:bands": [
{
"name": "ST_CDIST",
"description": "distance to nearest cloud",
"gsd": 30
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_DRAD": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_DRAD.tif",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Downwelled Radiance Band",
"description": "Landsat Collection 2 Level-2 Downwelled Radiance Band Surface Temperature Product",
"gsd": 30.0,
"eo:bands": [
{
"name": "ST_DRAD",
"description": "downwelled radiance",
"gsd": 30
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_URAD": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_URAD.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Upwelled Radiance Band",
"description": "Landsat Collection 2 Level-2 Upwelled Radiance Band Surface Temperature Product",
"gsd": 30.0,
"eo:bands": [
{
"name": "ST_URAD",
"description": "upwelled radiance",
"gsd": 30
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_TRAD": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_TRAD.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Thermal Radiance Band",
"description": "Landsat Collection 2 Level-2 Thermal Radiance Band Surface Temperature Product",
"gsd": 30.0,
"eo:bands": [
{
"name": "ST_TRAD",
"description": "thermal radiance",
"gsd": 30
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_EMIS": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_EMIS.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Emissivity Band",
"description": "Landsat Collection 2 Level-2 Emissivity Band Surface Temperature Product",
"gsd": 30.0,
"eo:bands": [
{
"name": "ST_EMIS",
"description": "emissivity",
"gsd": 30
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_EMSD": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_EMSD.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Emissivity Standard Deviation Band",
"description": "Landsat Collection 2 Level-2 Emissivity Standard Deviation Band Surface Temperature Product",
"gsd": 30.0,
"eo:bands": [
{
"name": "ST_EMSD",
"description": "emissivity standard deviation",
"gsd": 30
}
],
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
},
"ST_QA": {
"href": "/opt/src/tests/data-files/landsat/assets4/LC08_L2SP_017036_20130419_20200913_02_T2_ST_QA.TIF",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Surface Temperature Quality Assessment Band",
"description": "Landsat Collection 2 Level-2 Surface Temperature Band Surface Temperature Product",
"gsd": 30.0,
"proj:shape": [
7441,
7921
],
"proj:transform": [
29.996212599419266,
0.0,
207600.0,
0.0,
-29.99596828383282,
3942900.0
]
}
},
"bbox": [
-84.22698,
33.57696,
-81.59076,
35.62838
],
"stac_extensions": [
"eo",
"view",
"projection",
"https://landsat.usgs.gov/stac/landsat-extension/schema.json"
]
} |
On further inspection, I noticed the media_type wasn't being set correctly on assets. Updated to set media_type as well. |
gadomski
approved these changes
Apr 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Landsat 8 Collection 2 Level 2 created item asset keys currently has the file extension in the key name. With the current code, there was inconsistent capitalization of the extension. On further consideration, the inclusion of file extensions is consistent with the USGS 0.7 Items but is inconsistent with other STAC items produces. The assets themselves describe the media type and the HREFs have the file extension, and having the file extension in asset key is duplicate information and may be confusing to users. This commit switches to dropping file extensions in key names. The only exception is the MTL file, which has multiple file types - these assets retain their extension to differentiate between the various assets.
In addition, during testing I found that the media_type was not being set correctly on the assets. This PR also fixes this issue.