From 6ecc2913396e75cdd6c54a833aed598256659369 Mon Sep 17 00:00:00 2001
From: Hector Machin <38859646+hectormachin@users.noreply.github.com>
Date: Fri, 18 Aug 2023 15:55:20 -0400
Subject: [PATCH] Adding information to stac-fastapi README, adding PVC and
secrets (#83)
---
charts/stac-fastapi/Chart.yaml | 5 +
charts/stac-fastapi/README.md | 770 +++++++++++++++++-
.../pgstac-claim0-persistentvolumeclaim.yaml | 17 +
.../templates/pgstac-deployment.yaml | 36 +-
.../templates/pgstac-service.yaml | 4 +-
.../templates/pgstac-storage-class.yaml | 11 +
.../templates/stac-fastapi-crds.yaml | 70 ++
.../stac-fastapi-pgstac-deployment.yaml | 43 +-
.../templates/stac-fastapi-secret.yaml | 11 +-
charts/stac-fastapi/values.yaml | 34 +-
10 files changed, 955 insertions(+), 46 deletions(-)
create mode 100644 charts/stac-fastapi/templates/pgstac-claim0-persistentvolumeclaim.yaml
create mode 100644 charts/stac-fastapi/templates/pgstac-storage-class.yaml
create mode 100644 charts/stac-fastapi/templates/stac-fastapi-crds.yaml
diff --git a/charts/stac-fastapi/Chart.yaml b/charts/stac-fastapi/Chart.yaml
index 2a78561..a83f9ae 100644
--- a/charts/stac-fastapi/Chart.yaml
+++ b/charts/stac-fastapi/Chart.yaml
@@ -7,3 +7,8 @@ keywords:
- stac-fastapi
sources:
home:
+dependencies:
+- name: local-path-provisioner
+ condition: local-path-provisioner.enabled
+ version: "0.0.25"
+ repository: "https://element84.github.io/filmdrop-k8s-helm-charts/"
diff --git a/charts/stac-fastapi/README.md b/charts/stac-fastapi/README.md
index 12a0ac8..0a64ea2 100644
--- a/charts/stac-fastapi/README.md
+++ b/charts/stac-fastapi/README.md
@@ -25,5 +25,773 @@ Once the chart has been deployed, port-forward the `pgstac` service onto the loc
Navigate to `http://localhost:8080/` in a web browser, where you will then see the STAC Fast-API landing page.
You can view the database along with all of its schemas, functions, and tables in PgAdmin (make sure to use the port `5439` in the database server connection parameters).
+
+
+# Populating stac-fastapi
+
+After port forwarding stac-fastapi and pgstac
+```
+kubectl port-forward service/pgstac 5439:5439
+kubectl port-forward service/stac-fastapi-pgstac 8080:8080
+```
+
+## Adding a collection
+
+For full documentation for stac-fastapi, please visit the [Stac-FastAPI Official Documentation](https://stac-utils.github.io/stac-fastapi/).
+
+The information below is intended to provide an example of how to use the stac-fastapi collections endpoint to add a sample collection `collection_1`. In your particular, use case, you will need to replace the body payload json with the information of your collection.
+
+To create sample `collection_1` via curl:
+```
+curl -0 -v -X POST http://localhost:8080/collections \
+-H 'Content-Type: application/json; charset=utf-8' \
+--data-binary @- << EOF
+{
+ "id": "collection_1",
+ "stac_extensions": [],
+ "type": "Collection",
+ "description": "Landat 8 imagery radiometrically calibrated and orthorectified using gound points and Digital Elevation Model (DEM) data to correct relief displacement.",
+ "stac_version": "1.0.0",
+ "license": "PDDL-1.0",
+ "summaries": {
+ "platform": [
+ "landsat-8"
+ ],
+ "instruments": [
+ "oli",
+ "tirs"
+ ],
+ "gsd": [
+ 30
+ ],
+ "eo:bands": [
+ {
+ "name": "B1",
+ "common_name": "coastal",
+ "center_wavelength": 0.44,
+ "full_width_half_max": 0.02
+ },
+ {
+ "name": "B2",
+ "common_name": "blue",
+ "center_wavelength": 0.48,
+ "full_width_half_max": 0.06
+ },
+ {
+ "name": "B3",
+ "common_name": "green",
+ "center_wavelength": 0.56,
+ "full_width_half_max": 0.06
+ },
+ {
+ "name": "B4",
+ "common_name": "red",
+ "center_wavelength": 0.65,
+ "full_width_half_max": 0.04
+ },
+ {
+ "name": "B5",
+ "common_name": "nir",
+ "center_wavelength": 0.86,
+ "full_width_half_max": 0.03
+ },
+ {
+ "name": "B6",
+ "common_name": "swir16",
+ "center_wavelength": 1.6,
+ "full_width_half_max": 0.08
+ },
+ {
+ "name": "B7",
+ "common_name": "swir22",
+ "center_wavelength": 2.2,
+ "full_width_half_max": 0.2
+ },
+ {
+ "name": "B8",
+ "common_name": "pan",
+ "center_wavelength": 0.59,
+ "full_width_half_max": 0.18
+ },
+ {
+ "name": "B9",
+ "common_name": "cirrus",
+ "center_wavelength": 1.37,
+ "full_width_half_max": 0.02
+ },
+ {
+ "name": "B10",
+ "common_name": "lwir11",
+ "center_wavelength": 10.9,
+ "full_width_half_max": 0.8
+ },
+ {
+ "name": "B11",
+ "common_name": "lwir12",
+ "center_wavelength": 12,
+ "full_width_half_max": 1
+ }
+ ]
+ },
+ "extent": {
+ "spatial": {
+ "bbox": [
+ [
+ -180.0,
+ -90.0,
+ 180.0,
+ 90.0
+ ]
+ ]
+ },
+ "temporal": {
+ "interval": [
+ [
+ "2013-06-01",
+ null
+ ]
+ ]
+ }
+ },
+ "links": [
+ {
+ "rel": "license",
+ "href": "https://creativecommons.org/licenses/publicdomain/",
+ "title": "public domain"
+ }
+ ],
+ "title": "Landsat 8 L1",
+ "keywords": [
+ "landsat",
+ "earth observation",
+ "usgs"
+ ],
+ "providers": [
+ {
+ "name": "USGS",
+ "roles": [
+ "producer"
+ ],
+ "url": "https://landsat.usgs.gov/"
+ },
+ {
+ "name": "Planet Labs",
+ "roles": [
+ "processor"
+ ],
+ "url": "https://github.com/landsat-pds/landsat_ingestor"
+ },
+ {
+ "name": "AWS",
+ "roles": [
+ "host"
+ ],
+ "url": "https://landsatonaws.com/"
+ },
+ {
+ "name": "Development Seed",
+ "roles": [
+ "processor"
+ ],
+ "url": "https://github.com/sat-utils/sat-api"
+ },
+ {
+ "name": "Earth Search by Element84",
+ "description": "API of Earth on AWS datasets",
+ "roles": [
+ "host"
+ ],
+ "url": "https://element84.com"
+ }
+ ]
+}
+EOF
+```
+
+You should see a successful output as a response with the collection information:
+```
+* Trying 127.0.0.1:8080...
+* Connected to localhost (127.0.0.1) port 8080 (#0)
+> POST /collections HTTP/1.0
+> Host: localhost:8080
+> User-Agent: curl/8.1.2
+> Accept: */*
+> Content-Type: application/json; charset=utf-8
+> Content-Length: 4235
+>
+< HTTP/1.1 200 OK
+< date: Fri, 18 Aug 2023 16:54:06 GMT
+< server: uvicorn
+< content-length: 2446
+< content-type: application/json
+<
+* Connection #0 to host localhost left intact
+{"id":"collection_1","stac_extensions":[],"type":"Collection","description":"Landat 8 imagery radiometrically calibrated and orthorectified using gound points and Digital Elevation Model (DEM) data to correct relief displacement.","stac_version":"1.0.0","license":"PDDL-1.0","summaries":{"platform":["landsat-8"],"instruments":["oli","tirs"],"gsd":[30],"eo:bands":[{"name":"B1","common_name":"coastal","center_wavelength":0.44,"full_width_half_max":0.02},{"name":"B2","common_name":"blue","center_wavelength":0.48,"full_width_half_max":0.06},{"name":"B3","common_name":"green","center_wavelength":0.56,"full_width_half_max":0.06},{"name":"B4","common_name":"red","center_wavelength":0.65,"full_width_half_max":0.04},{"name":"B5","common_name":"nir","center_wavelength":0.86,"full_width_half_max":0.03},{"name":"B6","common_name":"swir16","center_wavelength":1.6,"full_width_half_max":0.08},{"name":"B7","common_name":"swir22","center_wavelength":2.2,"full_width_half_max":0.2},{"name":"B8","common_name":"pan","center_wavelength":0.59,"full_width_half_max":0.18},{"name":"B9","common_name":"cirrus","center_wavelength":1.37,"full_width_half_max":0.02},{"name":"B10","common_name":"lwir11","center_wavelength":10.9,"full_width_half_max":0.8},{"name":"B11","common_name":"lwir12","center_wavelength":12,"full_width_half_max":1}]},"extent":{"spatial":{"bbox":[[-180.0,-90.0,180.0,90.0]]},"temporal":{"interval":[["2013-06-01",null]]}},"links":[{"rel":"items","type":"application/geo+json","href":"http://localhost:8080/collections/collection_1/items"},{"rel":"parent","type":"application/json","href":"http://localhost:8080/"},{"rel":"root","type":"application/json","href":"http://localhost:8080/"},{"rel":"self","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"license","href":"https://creativecommons.org/licenses/publicdomain/","title":"public domain"}],"title":"Landsat 8 L1","keywords":["landsat","earth observation","usgs"],"providers":[{"name":"USGS","roles":["producer"],"url":"https://landsat.usgs.gov/"},{"name":"Planet Labs","roles":["processor"],"url":"https://github.com/landsat-pds/landsat_ingestor"},{"name":"AWS","roles":["host"],"url":"https://landsatonaws.com/"},{"name":"Development Seed","roles":["processor"],"url":"https://github.com/sat-utils/sat-api"},{"name":"Earth Search by Element84","description":"API of Earth on AWS datasets","roles":["host"],"url":"https://element84.com"}]}%
+```
+
+You can view all collections available in stac-fastapi via
+```
+$ curl http://localhost:8080/collections
+
+
+{"collections":[{"id":"collection_1","type":"Collection","links":[{"rel":"items","type":"application/geo+json","href":"http://localhost:8080/collections/collection_1/items"},{"rel":"parent","type":"application/json","href":"http://localhost:8080/"},{"rel":"root","type":"application/json","href":"http://localhost:8080/"},{"rel":"self","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"license","href":"https://creativecommons.org/licenses/publicdomain/","title":"public domain"}],"title":"Landsat 8 L1","extent":{"spatial":{"bbox":[[-180.0,-90.0,180.0,90.0]]},"temporal":{"interval":[["2013-06-01",null]]}},"license":"PDDL-1.0","keywords":["landsat","earth observation","usgs"],"providers":[{"url":"https://landsat.usgs.gov/","name":"USGS","roles":["producer"]},{"url":"https://github.com/landsat-pds/landsat_ingestor","name":"Planet Labs","roles":["processor"]},{"url":"https://landsatonaws.com/","name":"AWS","roles":["host"]},{"url":"https://github.com/sat-utils/sat-api","name":"Development Seed","roles":["processor"]},{"url":"https://element84.com","name":"Earth Search by Element84","roles":["host"],"description":"API of Earth on AWS datasets"}],"summaries":{"gsd":[30],"eo:bands":[{"name":"B1","common_name":"coastal","center_wavelength":0.44,"full_width_half_max":0.02},{"name":"B2","common_name":"blue","center_wavelength":0.48,"full_width_half_max":0.06},{"name":"B3","common_name":"green","center_wavelength":0.56,"full_width_half_max":0.06},{"name":"B4","common_name":"red","center_wavelength":0.65,"full_width_half_max":0.04},{"name":"B5","common_name":"nir","center_wavelength":0.86,"full_width_half_max":0.03},{"name":"B6","common_name":"swir16","center_wavelength":1.6,"full_width_half_max":0.08},{"name":"B7","common_name":"swir22","center_wavelength":2.2,"full_width_half_max":0.2},{"name":"B8","common_name":"pan","center_wavelength":0.59,"full_width_half_max":0.18},{"name":"B9","common_name":"cirrus","center_wavelength":1.37,"full_width_half_max":0.02},{"name":"B10","common_name":"lwir11","center_wavelength":10.9,"full_width_half_max":0.8},{"name":"B11","common_name":"lwir12","center_wavelength":12,"full_width_half_max":1}],"platform":["landsat-8"],"instruments":["oli","tirs"]},"description":"Landat 8 imagery radiometrically calibrated and orthorectified using gound points and Digital Elevation Model (DEM) data to correct relief displacement.","stac_version":"1.0.0","stac_extensions":[]}],"links":[{"rel":"root","type":"application/json","href":"http://localhost:8080/"},{"rel":"parent","type":"application/json","href":"http://localhost:8080/"},{"rel":"self","type":"application/json","href":"http://localhost:8080/collections"}]}%
+```
+
+
+## Adding an item to an existing collection
+
+For full documentation for stac-fastapi, please visit the [Stac-FastAPI Official Documentation](https://stac-utils.github.io/stac-fastapi/).
+
+The information below is intended to provide an example of how to use the stac-fastapi items endpoint to add a sample item `item_1` to an existing collection `collection_1`. In your particular, use case, you will need to replace the body payload json with the information of your item.
+
+To create sample `item_1` via curl:
+```
+curl -0 -v -X POST http://localhost:8080/collections/collection_1/items \
+-H 'Content-Type: application/json; charset=utf-8' \
+--data-binary @- << EOF
+{
+ "type": "Feature",
+ "id": "item_1",
+ "stac_version": "1.0.0",
+ "stac_extensions": [
+ "https://stac-extensions.github.io/eo/v1.0.0/schema.json",
+ "https://stac-extensions.github.io/projection/v1.0.0/schema.json"
+ ],
+ "geometry": {
+ "coordinates": [
+ [
+ [
+ 152.15052873427666,
+ -33.82243006904891
+ ],
+ [
+ 150.1000346138806,
+ -34.257132625788756
+ ],
+ [
+ 149.5776607193635,
+ -32.514709769700254
+ ],
+ [
+ 151.6262528041627,
+ -32.08081674221862
+ ],
+ [
+ 152.15052873427666,
+ -33.82243006904891
+ ]
+ ]
+ ],
+ "type": "Polygon"
+ },
+ "properties": {
+ "datetime": "2020-02-12T12:30:22Z",
+ "landsat:scene_id": "LC82081612020043LGN00",
+ "landsat:row": "161",
+ "gsd": 15,
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "B1",
+ "common_name": "coastal",
+ "center_wavelength": 0.44,
+ "full_width_half_max": 0.02
+ },
+ {
+ "gsd": 30,
+ "name": "B2",
+ "common_name": "blue",
+ "center_wavelength": 0.48,
+ "full_width_half_max": 0.06
+ },
+ {
+ "gsd": 30,
+ "name": "B3",
+ "common_name": "green",
+ "center_wavelength": 0.56,
+ "full_width_half_max": 0.06
+ },
+ {
+ "gsd": 30,
+ "name": "B4",
+ "common_name": "red",
+ "center_wavelength": 0.65,
+ "full_width_half_max": 0.04
+ },
+ {
+ "gsd": 30,
+ "name": "B5",
+ "common_name": "nir",
+ "center_wavelength": 0.86,
+ "full_width_half_max": 0.03
+ },
+ {
+ "gsd": 30,
+ "name": "B6",
+ "common_name": "swir16",
+ "center_wavelength": 1.6,
+ "full_width_half_max": 0.08
+ },
+ {
+ "gsd": 30,
+ "name": "B7",
+ "common_name": "swir22",
+ "center_wavelength": 2.2,
+ "full_width_half_max": 0.2
+ },
+ {
+ "gsd": 15,
+ "name": "B8",
+ "common_name": "pan",
+ "center_wavelength": 0.59,
+ "full_width_half_max": 0.18
+ },
+ {
+ "gsd": 30,
+ "name": "B9",
+ "common_name": "cirrus",
+ "center_wavelength": 1.37,
+ "full_width_half_max": 0.02
+ },
+ {
+ "gsd": 100,
+ "name": "B10",
+ "common_name": "lwir11",
+ "center_wavelength": 10.9,
+ "full_width_half_max": 0.8
+ },
+ {
+ "gsd": 100,
+ "name": "B11",
+ "common_name": "lwir12",
+ "center_wavelength": 12,
+ "full_width_half_max": 1
+ }
+ ],
+ "landsat:revision": "00",
+ "view:sun_azimuth": -148.83296771,
+ "instrument": "OLI_TIRS",
+ "landsat:product_id": "LC08_L1GT_208161_20200212_20200212_01_RT",
+ "eo:cloud_cover": 0,
+ "landsat:tier": "RT",
+ "landsat:processing_level": "L1GT",
+ "landsat:column": "208",
+ "platform": "landsat-8",
+ "proj:epsg": 32756,
+ "view:sun_elevation": -37.30791534,
+ "view:off_nadir": 0,
+ "height": 2500,
+ "width": 2500
+ },
+ "bbox": [
+ 149.57574,
+ -34.25796,
+ 152.15194,
+ -32.07915
+ ],
+ "collection": "collection_1",
+ "assets": {
+ "ANG": {
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ANG.txt",
+ "type": "text/plain",
+ "title": "Angle Coefficients File",
+ "description": "Collection 2 Level-1 Angle Coefficients File (ANG)"
+ },
+ "SR_B1": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B1.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Coastal/Aerosol Band (B1)",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "SR_B1",
+ "common_name": "coastal",
+ "center_wavelength": 0.44,
+ "full_width_half_max": 0.02
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Collection 2 Level-2 Coastal/Aerosol Band (B1) Surface Reflectance",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "SR_B2": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B2.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Blue Band (B2)",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "SR_B2",
+ "common_name": "blue",
+ "center_wavelength": 0.48,
+ "full_width_half_max": 0.06
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Collection 2 Level-2 Blue Band (B2) Surface Reflectance",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "SR_B3": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B3.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Green Band (B3)",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "SR_B3",
+ "common_name": "green",
+ "center_wavelength": 0.56,
+ "full_width_half_max": 0.06
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Collection 2 Level-2 Green Band (B3) Surface Reflectance",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "SR_B4": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B4.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Red Band (B4)",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "SR_B4",
+ "common_name": "red",
+ "center_wavelength": 0.65,
+ "full_width_half_max": 0.04
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Collection 2 Level-2 Red Band (B4) Surface Reflectance",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "SR_B5": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B5.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Near Infrared Band 0.8 (B5)",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "SR_B5",
+ "common_name": "nir08",
+ "center_wavelength": 0.86,
+ "full_width_half_max": 0.03
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Collection 2 Level-2 Near Infrared Band 0.8 (B5) Surface Reflectance",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "SR_B6": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B6.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Short-wave Infrared Band 1.6 (B6)",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "SR_B6",
+ "common_name": "swir16",
+ "center_wavelength": 1.6,
+ "full_width_half_max": 0.08
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Collection 2 Level-2 Short-wave Infrared Band 1.6 (B6) Surface Reflectance",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "SR_B7": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B7.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Short-wave Infrared Band 2.2 (B7)",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "SR_B7",
+ "common_name": "swir22",
+ "center_wavelength": 2.2,
+ "full_width_half_max": 0.2
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Collection 2 Level-2 Short-wave Infrared Band 2.2 (B7) Surface Reflectance",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "ST_QA": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_QA.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Surface Temperature Quality Assessment Band",
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Landsat Collection 2 Level-2 Surface Temperature Band Surface Temperature Product",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "ST_B10": {
+ "gsd": 100,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_B10.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Surface Temperature Band (B10)",
+ "eo:bands": [
+ {
+ "gsd": 100,
+ "name": "ST_B10",
+ "common_name": "lwir11",
+ "center_wavelength": 10.9,
+ "full_width_half_max": 0.8
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Landsat Collection 2 Level-2 Surface Temperature Band (B10) Surface Temperature Product",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "MTL.txt": {
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_MTL.txt",
+ "type": "text/plain",
+ "title": "Product Metadata File",
+ "description": "Collection 2 Level-1 Product Metadata File (MTL)"
+ },
+ "MTL.xml": {
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_MTL.xml",
+ "type": "application/xml",
+ "title": "Product Metadata File (xml)",
+ "description": "Collection 2 Level-1 Product Metadata File (xml)"
+ },
+ "ST_DRAD": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_DRAD.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Downwelled Radiance Band",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "ST_DRAD",
+ "description": "downwelled radiance"
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Landsat Collection 2 Level-2 Downwelled Radiance Band Surface Temperature Product",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "ST_EMIS": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_EMIS.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Emissivity Band",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "ST_EMIS",
+ "description": "emissivity"
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Landsat Collection 2 Level-2 Emissivity Band Surface Temperature Product",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ },
+ "ST_EMSD": {
+ "gsd": 30,
+ "href": "https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_EMSD.TIF",
+ "type": "image/tiff; application=geotiff; profile=cloud-optimized",
+ "title": "Emissivity Standard Deviation Band",
+ "eo:bands": [
+ {
+ "gsd": 30,
+ "name": "ST_EMSD",
+ "description": "emissivity standard deviation"
+ }
+ ],
+ "proj:shape": [
+ 7731,
+ 7591
+ ],
+ "description": "Landsat Collection 2 Level-2 Emissivity Standard Deviation Band Surface Temperature Product",
+ "proj:transform": [
+ 30,
+ 0,
+ 304185,
+ 0,
+ -30,
+ -843585
+ ]
+ }
+ },
+ "links": [
+ {
+ "href": "http://localhost:8081/collections/landsat-8-l1/items/LC82081612020043",
+ "rel": "self",
+ "type": "application/geo+json"
+ },
+ {
+ "href": "http://localhost:8081/collections/landsat-8-l1",
+ "rel": "parent",
+ "type": "application/json"
+ },
+ {
+ "href": "http://localhost:8081/collections/landsat-8-l1",
+ "rel": "collection",
+ "type": "application/json"
+ },
+ {
+ "href": "http://localhost:8081/",
+ "rel": "root",
+ "type": "application/json"
+ },
+ {
+ "href": "preview.html",
+ "rel": "preview",
+ "type": "application/html"
+ }
+ ]
+}
+EOF
+```
+
+You should see a successful output as a response with the collection information:
+```
+* Trying 127.0.0.1:8080...
+* Connected to localhost (127.0.0.1) port 8080 (#0)
+> POST /collections/collection_1/items HTTP/1.0
+> Host: localhost:8080
+> User-Agent: curl/8.1.2
+> Accept: */*
+> Content-Type: application/json; charset=utf-8
+> Content-Length: 14626
+>
+< HTTP/1.1 200 OK
+< date: Fri, 18 Aug 2023 17:05:31 GMT
+< server: uvicorn
+< content-length: 10408
+< content-type: application/json
+<
+{"type":"Feature","stac_version":"1.0.0","stac_extensions":["https://stac-extensions.github.io/eo/v1.0.0/schema.json","https://stac-extensions.github.io/projection/v1.0.0/schema.json"],"id":"item_1","geometry":{"coordinates":[[[152.15052873427666,-33.82243006904891],[150.1000346138806,-34.257132625788756],[149.5776607193635,-32.514709769700254],[151.6262528041627,-32.08081674221862],[152.15052873427666,-33.82243006904891]]],"type":"Polygon"},"bbox":[149.57574,-34.25796,152.15194,-32.07915],"properties":{"datetime":"2020-02-12T12:30:22Z","landsat:scene_id":"LC82081612020043LGN00","landsat:row":"161","gsd":15,"eo:bands":[{"gsd":30,"name":"B1","common_name":"coastal","center_wavelength":0.44,"full_width_half_max":0.02},{"gsd":30,"name":"B2","common_name":"blue","center_wavelength":0.48,"full_width_half_max":0.06},{"gsd":30,"name":"B3","common_name":"green","center_wavelength":0.56,"full_width_half_max":0.06},{"gsd":30,"name":"B4","common_name":"red","center_wavelength":0.65,"full_width_half_max":0.04},{"gsd":30,"name":"B5","common_name":"nir","center_wavelength":0.86,"full_width_half_max":0.03},{"gsd":30,"name":"B6","common_name":"swir16","center_wavelength":1.6,"full_width_half_max":0.08},{"gsd":30,"name":"B7","common_name":"swir22","center_wavelength":2.2,"full_width_half_max":0.2},{"gsd":15,"name":"B8","common_name":"pan","center_wavelength":0.59,"full_width_half_max":0.18},{"gsd":30,"name":"B9","common_name":"cirrus","center_wavelength":1.37,"full_width_half_max":0.02},{"gsd":100,"name":"B10","common_name":"lwir11","center_wavelength":10.9,"full_width_half_max":0.8},{"gsd":100,"name":"B11","common_name":"lwir12","center_wavelength":12,"full_width_half_max":1}],"landsat:revision":"00","view:sun_azimuth":-148.83296771,"instrument":"OLI_TIRS","landsat:product_id":"LC08_L1GT_208161_20200212_20200212_01_RT","eo:cloud_cover":0,"landsat:tier":"RT","landsat:processing_level":"L1GT","landsat:column":"208","platform":"landsat-8","proj:epsg":32756,"view:sun_elevation":-37.30791534,"view:off_nadir":0,"height":2500,"width":2500},"links":[{"rel":"collection","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"parent","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"root","type":"application/json","href":"http://localhost:8080/"},{"rel":"self","type":"application/geo+json","href":"http://localhost:8080/collections/collection_1/items/item_1"},{"href":"http://localhost:8080/preview.html","rel":"preview","type":"application/html"}],"assets":{"ANG":{"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ANG.txt","type":"text/plain","title":"Angle Coefficients File","description":"Collection 2 Level-1 Angle Coefficients File (ANG)"},"SR_B1":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B1.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Coastal/Aerosol Band (B1)","eo:bands":[{"gsd":30,"name":"SR_B1","common_name":"coastal","center_wavelength":0.44,"full_width_half_max":0.02}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Coastal/Aerosol Band (B1) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B2":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B2.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Blue Band (B2)","eo:bands":[{"gsd":30,"name":"SR_B2","common_name":"blue","center_wavelength":0.48,"full_width_half_max":0.06}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Blue Band (B2) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B3":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B3.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Green Band (B3)","eo:bands":[{"gsd":30,"name":"SR_B3","common_name":"green","center_wavelength":0.56,"full_width_half_max":0.06}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Green Band (B3) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B4":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B4.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Red Band (B4)","eo:bands":[{"gsd":30,"name":"SR_B4","common_name":"red","center_wavelength":0.65,"full_width_half_max":0.04}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Red Band (B4) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B5":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B5.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Near Infrared Band 0.8 (B5)","eo:bands":[{"gsd":30,"name":"SR_B5","common_name":"nir08","center_wavelength":0.86,"full_width_half_max":0.03}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Near Infrared Band 0.8 (B5) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B6":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B6.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Short-wave Infrared Band 1.6 (B6)","eo:bands":[{"gsd":30,"name":"SR_B6","common_name":"swir16","center_wavelength":1.6,"full_width_half_max":0.08}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Short-wave Infrared Band 1.6 (B6) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B7":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B7.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Short-wave Infrared Band 2.2 (B7)","eo:bands":[{"gsd":30,"name":"SR_B7","common_name":"swir22","center_wavelength":2.2,"full_width_half_max":0.2}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Short-wave Infrared Band 2.2 (B7) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"ST_QA":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_QA.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Surface Temperature Quality Assessment Band","proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Surface Temperature Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"ST_B10":{"gsd":100,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_B10.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Surface Temperature Band (B10)","eo:bands":[{"gsd":100,"name":"ST_B10","common_name":"lwir11","center_wavelength":10.9,"full_width_half_max":0.8}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Surface Temperature Band (B10) Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"MTL.txt":{"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP* Connection #0 to host localhost left intact
+_108066_20210712_20210720_02_T1_MTL.txt","type":"text/plain","title":"Product Metadata File","description":"Collection 2 Level-1 Product Metadata File (MTL)"},"MTL.xml":{"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_MTL.xml","type":"application/xml","title":"Product Metadata File (xml)","description":"Collection 2 Level-1 Product Metadata File (xml)"},"ST_DRAD":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_DRAD.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Downwelled Radiance Band","eo:bands":[{"gsd":30,"name":"ST_DRAD","description":"downwelled radiance"}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Downwelled Radiance Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"ST_EMIS":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_EMIS.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Emissivity Band","eo:bands":[{"gsd":30,"name":"ST_EMIS","description":"emissivity"}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Emissivity Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"ST_EMSD":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_EMSD.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Emissivity Standard Deviation Band","eo:bands":[{"gsd":30,"name":"ST_EMSD","description":"emissivity standard deviation"}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Emissivity Standard Deviation Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]}},"collection":"collection_1"}%
+```
+
+You can view all items in the sample collection `collection_1` within stac-fastapi via:
+```
+$ curl http://localhost:8080/collections/collection_1/items
+
+
+{"type":"FeatureCollection","context":{"limit":10,"returned":1},"features":[{"id":"item_1","bbox":[149.57574,-34.25796,152.15194,-32.07915],"type":"Feature","links":[{"rel":"collection","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"parent","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"root","type":"application/json","href":"http://localhost:8080/"},{"rel":"self","type":"application/geo+json","href":"http://localhost:8080/collections/collection_1/items/item_1"},{"rel":"preview","href":"http://localhost:8080/preview.html","type":"application/html"}],"assets":{"ANG":{"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ANG.txt","type":"text/plain","title":"Angle Coefficients File","description":"Collection 2 Level-1 Angle Coefficients File (ANG)"},"SR_B1":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B1.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Coastal/Aerosol Band (B1)","eo:bands":[{"gsd":30,"name":"SR_B1","common_name":"coastal","center_wavelength":0.44,"full_width_half_max":0.02}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Coastal/Aerosol Band (B1) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B2":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B2.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Blue Band (B2)","eo:bands":[{"gsd":30,"name":"SR_B2","common_name":"blue","center_wavelength":0.48,"full_width_half_max":0.06}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Blue Band (B2) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B3":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B3.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Green Band (B3)","eo:bands":[{"gsd":30,"name":"SR_B3","common_name":"green","center_wavelength":0.56,"full_width_half_max":0.06}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Green Band (B3) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B4":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B4.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Red Band (B4)","eo:bands":[{"gsd":30,"name":"SR_B4","common_name":"red","center_wavelength":0.65,"full_width_half_max":0.04}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Red Band (B4) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B5":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B5.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Near Infrared Band 0.8 (B5)","eo:bands":[{"gsd":30,"name":"SR_B5","common_name":"nir08","center_wavelength":0.86,"full_width_half_max":0.03}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Near Infrared Band 0.8 (B5) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B6":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B6.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Short-wave Infrared Band 1.6 (B6)","eo:bands":[{"gsd":30,"name":"SR_B6","common_name":"swir16","center_wavelength":1.6,"full_width_half_max":0.08}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Short-wave Infrared Band 1.6 (B6) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"SR_B7":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_SR_B7.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Short-wave Infrared Band 2.2 (B7)","eo:bands":[{"gsd":30,"name":"SR_B7","common_name":"swir22","center_wavelength":2.2,"full_width_half_max":0.2}],"proj:shape":[7731,7591],"description":"Collection 2 Level-2 Short-wave Infrared Band 2.2 (B7) Surface Reflectance","proj:transform":[30,0,304185,0,-30,-843585]},"ST_QA":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_QA.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Surface Temperature Quality Assessment Band","proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Surface Temperature Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"ST_B10":{"gsd":100,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_B10.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Surface Temperature Band (B10)","eo:bands":[{"gsd":100,"name":"ST_B10","common_name":"lwir11","center_wavelength":10.9,"full_width_half_max":0.8}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Surface Temperature Band (B10) Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"MTL.txt":{"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_MTL.txt","type":"text/plain","title":"Product Metadata File","description":"Collection 2 Level-1 Product Metadata File (MTL)"},"MTL.xml":{"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_MTL.xml","type":"application/xml","title":"Product Metadata File (xml)","description":"Collection 2 Level-1 Product Metadata File (xml)"},"ST_DRAD":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_DRAD.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Downwelled Radiance Band","eo:bands":[{"gsd":30,"name":"ST_DRAD","description":"downwelled radiance"}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Downwelled Radiance Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"ST_EMIS":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_EMIS.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Emissivity Band","eo:bands":[{"gsd":30,"name":"ST_EMIS","description":"emissivity"}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Emissivity Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]},"ST_EMSD":{"gsd":30,"href":"https://landsateuwest.blob.core.windows.net/landsat-c2/level-2/standard/oli-tirs/2021/108/066/LC08_L2SP_108066_20210712_20210720_02_T1/LC08_L2SP_108066_20210712_20210720_02_T1_ST_EMSD.TIF","type":"image/tiff; application=geotiff; profile=cloud-optimized","title":"Emissivity Standard Deviation Band","eo:bands":[{"gsd":30,"name":"ST_EMSD","description":"emissivity standard deviation"}],"proj:shape":[7731,7591],"description":"Landsat Collection 2 Level-2 Emissivity Standard Deviation Band Surface Temperature Product","proj:transform":[30,0,304185,0,-30,-843585]}},"geometry":{"type":"Polygon","coordinates":[[[152.15052873427666,-33.82243006904891],[150.1000346138806,-34.257132625788756],[149.5776607193635,-32.514709769700254],[151.6262528041627,-32.08081674221862],[152.15052873427666,-33.82243006904891]]]},"collection":"collection_1","properties":{"gsd":15,"width":2500,"height":2500,"datetime":"2020-02-12T12:30:22Z","eo:bands":[{"gsd":30,"name":"B1","common_name":"coastal","center_wavelength":0.44,"full_width_half_max":0.02},{"gsd":30,"name":"B2","common_name":"blue","center_wavelength":0.48,"full_width_half_max":0.06},{"gsd":30,"name":"B3","common_name":"green","center_wavelength":0.56,"full_width_half_max":0.06},{"gsd":30,"name":"B4","common_name":"red","center_wavelength":0.65,"full_width_half_max":0.04},{"gsd":30,"name":"B5","common_name":"nir","center_wavelength":0.86,"full_width_half_max":0.03},{"gsd":30,"name":"B6","common_name":"swir16","center_wavelength":1.6,"full_width_half_max":0.08},{"gsd":30,"name":"B7","common_name":"swir22","center_wavelength":2.2,"full_width_half_max":0.2},{"gsd":15,"name":"B8","common_name":"pan","center_wavelength":0.59,"full_width_half_max":0.18},{"gsd":30,"name":"B9","common_name":"cirrus","center_wavelength":1.37,"full_width_half_max":0.02},{"gsd":100,"name":"B10","common_name":"lwir11","center_wavelength":10.9,"full_width_half_max":0.8},{"gsd":100,"name":"B11","common_name":"lwir12","center_wavelength":12,"full_width_half_max":1}],"platform":"landsat-8","proj:epsg":32756,"instrument":"OLI_TIRS","landsat:row":"161","landsat:tier":"RT","eo:cloud_cover":0,"landsat:column":"208","view:off_nadir":0,"landsat:revision":"00","landsat:scene_id":"LC82081612020043LGN00","view:sun_azimuth":-148.83296771,"landsat:product_id":"LC08_L1GT_208161_20200212_20200212_01_RT","view:sun_elevation":-37.30791534,"landsat:processing_level":"L1GT"},"stac_version":"1.0.0","stac_extensions":["https://stac-extensions.github.io/eo/v1.0.0/schema.json","https://stac-extensions.github.io/projection/v1.0.0/schema.json"]}],"links":[{"rel":"collection","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"parent","type":"application/json","href":"http://localhost:8080/collections/collection_1"},{"rel":"root","type":"application/json","href":"http://localhost:8080/"},{"rel":"self","type":"application/geo+json","href":"http://localhost:8080/collections/collection_1/items"}]}%
+```
+
+
+# Uninstall stac-fastapi
-To uninstall the release, do `helm delete stac`.
\ No newline at end of file
+To uninstall the release, do `helm delete stac`.
diff --git a/charts/stac-fastapi/templates/pgstac-claim0-persistentvolumeclaim.yaml b/charts/stac-fastapi/templates/pgstac-claim0-persistentvolumeclaim.yaml
new file mode 100644
index 0000000..7cb31e5
--- /dev/null
+++ b/charts/stac-fastapi/templates/pgstac-claim0-persistentvolumeclaim.yaml
@@ -0,0 +1,17 @@
+{{- if and .Values.pgStac.enabled .Values.pgStac.storage.retainPersistentVolume -}}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+ creationTimestamp: null
+ labels:
+ {{- include "pgstac.labels" . | nindent 6 }}
+ name: pgstac-claim0
+spec:
+ storageClassName: {{ .Values.pgStac.storage.storageClassName }}
+ accessModes:
+ - ReadWriteOnce
+ resources:
+ requests:
+ storage: {{ .Values.pgStac.storage.size }}
+status: {}
+{{- end }}
diff --git a/charts/stac-fastapi/templates/pgstac-deployment.yaml b/charts/stac-fastapi/templates/pgstac-deployment.yaml
index 26baa2d..7466546 100644
--- a/charts/stac-fastapi/templates/pgstac-deployment.yaml
+++ b/charts/stac-fastapi/templates/pgstac-deployment.yaml
@@ -1,3 +1,4 @@
+{{- if .Values.pgStac.enabled -}}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -24,39 +25,42 @@ spec:
- "500"
env:
- name: PGDATABASE
- valueFrom:
- secretKeyRef:
- name: stac-fastapi-secret
- key: pg_dbname
+ value: {{.Values.pgStac.dbName}}
- name: PGPASSWORD
valueFrom:
secretKeyRef:
- name: stac-fastapi-secret
- key: pg_password
+ name: {{ .Values.pgStac.passwordSecret.name }}
+ key: {{ .Values.pgStac.passwordSecret.key }}
- name: PGUSER
valueFrom:
secretKeyRef:
- name: stac-fastapi-secret
- key: pg_username
+ name: {{ .Values.pgStac.userNameSecret.name }}
+ key: {{ .Values.pgStac.userNameSecret.key }}
- name: POSTGRES_DB
- valueFrom:
- secretKeyRef:
- name: stac-fastapi-secret
- key: img_dbname
+ value: {{.Values.pgStac.dbName}}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
- name: stac-fastapi-secret
- key: img_password
+ name: {{ .Values.pgStac.passwordSecret.name }}
+ key: {{ .Values.pgStac.passwordSecret.key }}
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
- name: stac-fastapi-secret
- key: img_username
+ name: {{ .Values.pgStac.userNameSecret.name }}
+ key: {{ .Values.pgStac.userNameSecret.key }}
image: "{{ .Values.pgStac.image.repository }}:{{ .Values.pgStac.image.tag }}"
name: {{ .Values.pgStac.deployment.name }}
ports:
- containerPort: {{ .Values.pgStac.container.port }}
resources: {}
+ volumeMounts:
+ - mountPath: /pgstac
+ name: pgstac-claim0
+ workingDir: /pgstac
restartPolicy: Always
+ volumes:
+ - name: pgstac-claim0
+ persistentVolumeClaim:
+ claimName: pgstac-claim0
status: {}
+{{- end }}
diff --git a/charts/stac-fastapi/templates/pgstac-service.yaml b/charts/stac-fastapi/templates/pgstac-service.yaml
index c85aa32..023cf43 100644
--- a/charts/stac-fastapi/templates/pgstac-service.yaml
+++ b/charts/stac-fastapi/templates/pgstac-service.yaml
@@ -1,3 +1,4 @@
+{{- if .Values.pgStac.enabled -}}
apiVersion: v1
kind: Service
metadata:
@@ -7,10 +8,11 @@ metadata:
name: {{ .Values.pgStac.service.name }}
spec:
ports:
- - name: "5439"
+ - name: "{{ .Values.pgStac.service.port }}"
port: {{ .Values.pgStac.service.port }}
targetPort: {{ .Values.pgStac.service.targetPort }}
selector:
{{- include "pgstac.labels" . | nindent 6 }}
status:
loadBalancer: {}
+{{- end }}
diff --git a/charts/stac-fastapi/templates/pgstac-storage-class.yaml b/charts/stac-fastapi/templates/pgstac-storage-class.yaml
new file mode 100644
index 0000000..63e5182
--- /dev/null
+++ b/charts/stac-fastapi/templates/pgstac-storage-class.yaml
@@ -0,0 +1,11 @@
+{{- if and .Values.pgStac.enabled .Values.pgStac.storage.retainPersistentVolume -}}
+apiVersion: storage.k8s.io/v1
+kind: StorageClass
+metadata:
+ labels:
+ {{- include "pgstac.labels" . | nindent 6 }}
+ name: pgstac-retain
+provisioner: {{ .Values.pgStac.storage.provisioner }}
+reclaimPolicy: Retain
+volumeBindingMode: {{ .Values.pgStac.storage.volumeBindingMode }}
+{{- end }}
diff --git a/charts/stac-fastapi/templates/stac-fastapi-crds.yaml b/charts/stac-fastapi/templates/stac-fastapi-crds.yaml
new file mode 100644
index 0000000..5cbfd7c
--- /dev/null
+++ b/charts/stac-fastapi/templates/stac-fastapi-crds.yaml
@@ -0,0 +1,70 @@
+{{- if .Values.pgStac.enabled -}}
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+ name: {{ .Values.stacFastApi.service.serviceAccount }}
+ namespace: {{ .Release.Namespace }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: Role
+metadata:
+ name: {{ .Values.stacFastApi.service.serviceAccount }}-migration-reader
+rules:
+rules:
+- apiGroups:
+ - '*'
+ resources:
+ - statefulsets
+ - services
+ - replicationcontrollers
+ - replicasets
+ - podtemplates
+ - podsecuritypolicies
+ - pods
+ - pods/log
+ - pods/exec
+ - podpreset
+ - poddisruptionbudget
+ - persistentvolumes
+ - persistentvolumeclaims
+ - jobs
+ - endpoints
+ - deployments
+ - deployments/scale
+ - daemonsets
+ - cronjobs
+ - configmaps
+ - namespaces
+ - events
+ - secrets
+ verbs:
+ - create
+ - get
+ - watch
+ - delete
+ - list
+ - patch
+ - update
+- apiGroups:
+ - ""
+ resources:
+ - nodes
+ verbs:
+ - get
+ - list
+ - watch
+ - update
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: RoleBinding
+metadata:
+ name: {{ .Values.stacFastApi.service.serviceAccount }}-migration-reader
+subjects:
+- kind: ServiceAccount
+ name: {{ .Values.stacFastApi.service.serviceAccount }}
+roleRef:
+ kind: Role
+ name: {{ .Values.stacFastApi.service.serviceAccount }}-migration-reader
+ apiGroup: rbac.authorization.k8s.io
+apiVersion: rbac.authorization.k8s.io/v1
+{{- end }}
diff --git a/charts/stac-fastapi/templates/stac-fastapi-pgstac-deployment.yaml b/charts/stac-fastapi/templates/stac-fastapi-pgstac-deployment.yaml
index 403f922..41f256c 100644
--- a/charts/stac-fastapi/templates/stac-fastapi-pgstac-deployment.yaml
+++ b/charts/stac-fastapi/templates/stac-fastapi-pgstac-deployment.yaml
@@ -17,6 +17,16 @@ spec:
labels:
app: stac-fastapi-pgstac
spec:
+ {{ if .Values.pgStac.enabled }}
+ serviceAccountName: {{ .Values.stacFastApi.service.serviceAccount }}
+ initContainers:
+ - name: wait-for-pgstac
+ image: ghcr.io/groundnuty/k8s-wait-for:v2.0
+ imagePullPolicy: Always
+ args:
+ - "service"
+ - "-lapp={{.Values.pgStac.service.name}}"
+ {{ end }}
containers:
- env:
- name: APP_HOST
@@ -32,32 +42,31 @@ spec:
- name: GDAL_HTTP_MERGE_CONSECUTIVE_RANGES
value: "YES"
- name: POSTGRES_DBNAME
- valueFrom:
- secretKeyRef:
- name: stac-fastapi-secret
- key: img_dbname
+ value: {{.Values.pgStac.dbName}}
- name: POSTGRES_HOST_READER
- valueFrom:
- secretKeyRef:
- name: stac-fastapi-secret
- key: img_hostrw
+ {{ if .Values.pgStac.enabled }}
+ value: "{{.Values.pgStac.service.name}}.{{.Release.Namespace}}"
+ {{ else }}
+ value: {{.Values.pgStac.dbHost}}
+ {{ end}}
- name: POSTGRES_HOST_WRITER
- valueFrom:
- secretKeyRef:
- name: stac-fastapi-secret
- key: img_hostrw
+ {{ if .Values.pgStac.enabled }}
+ value: "{{.Values.pgStac.service.name}}.{{.Release.Namespace}}"
+ {{ else }}
+ value: {{.Values.pgStac.dbHost}}
+ {{ end}}
- name: POSTGRES_PASS
valueFrom:
secretKeyRef:
- name: stac-fastapi-secret
- key: img_password
+ name: {{ .Values.pgStac.passwordSecret.name }}
+ key: {{ .Values.pgStac.passwordSecret.key }}
- name: POSTGRES_PORT
- value: "5439"
+ value: "{{ .Values.pgStac.service.port }}"
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
- name: stac-fastapi-secret
- key: img_username
+ name: {{ .Values.pgStac.userNameSecret.name }}
+ key: {{ .Values.pgStac.userNameSecret.key }}
- name: USE_API_HYDRATE
value: "FALSE"
- name: VSI_CACHE
diff --git a/charts/stac-fastapi/templates/stac-fastapi-secret.yaml b/charts/stac-fastapi/templates/stac-fastapi-secret.yaml
index dbd134f..4d385ea 100644
--- a/charts/stac-fastapi/templates/stac-fastapi-secret.yaml
+++ b/charts/stac-fastapi/templates/stac-fastapi-secret.yaml
@@ -1,13 +1,10 @@
+{{- if .Values.pgStac.createPgStacSecret -}}
apiVersion: v1
kind: Secret
metadata:
name: stac-fastapi-secret
type: Opaque
data:
- img_dbname: cG9zdGdpcw==
- img_hostrw: cGdzdGFj
- img_password: cGFzc3dvcmQ=
- img_username: dXNlcm5hbWU=
- pg_dbname: cG9zdGdpcw==
- pg_password: cGFzc3dvcmQ=
- pg_username: dXNlcm5hbWU=
\ No newline at end of file
+ username: {{ .Values.pgStac.dbUser }}
+ password: {{ .Values.pgStac.dbPassword }}
+{{- end }}
diff --git a/charts/stac-fastapi/values.yaml b/charts/stac-fastapi/values.yaml
index f3e3161..569b44e 100644
--- a/charts/stac-fastapi/values.yaml
+++ b/charts/stac-fastapi/values.yaml
@@ -5,10 +5,17 @@
nameOverride: ""
fullnameOverride: ""
+local-path-provisioner:
+ enabled: true
+ storageClass:
+ provisionerName: filmdrop.io/local-pgstac-path-provisioner
+ name: local-path-class
+
pgStac:
+ enabled: true
image:
repository: ghcr.io/stac-utils/pgstac
- tag: v0.7.1
+ tag: v0.7.10
container:
port: 5432
service:
@@ -17,18 +24,37 @@ pgStac:
name: pgstac
deployment:
name: pgstac
+ createPgStacSecret: true
+ userNameSecret:
+ name: stac-fastapi-secret
+ key: username
+ passwordSecret:
+ name: stac-fastapi-secret
+ key: password
+ dbUser: dXNlcm5hbWU=
+ dbPassword: cGFzc3dvcmQ=
+ dbName: postgis
+ dbHost: pgstac.default
+ serviceAccount:
+ storage:
+ size: 1Gi
+ volumeBindingMode: WaitForFirstConsumer
+ provisioner: filmdrop.io/local-pgstac-path-provisioner
+ retainPersistentVolume: true
+ storageClassName: pgstac-retain
replicaCount: 1
stacFastApi:
image:
- repository: ghcr.io/stac-utils/stac-fastapi
- tag: main-pgstac
+ repository: ghcr.io/stac-utils/stac-fastapi-pgstac
+ tag: main
container:
port: 8080
service:
port: 8080
targetPort: 8080
name: stac-fastapi-pgstac
+ serviceAccount: stac-fastapi-pgstac
deployment:
name: stac-fastapi-pgstac
- replicaCount: 1
\ No newline at end of file
+ replicaCount: 1