Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 40 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,36 @@ default:
tags:
- gcp-gitlab-runner

build:
build-branch:
stage: build
image: us.gcr.io/planet-gcr/starport/docker-make:20.10.7
services:
- us.gcr.io/planet-gcr/starport/dind:20.10.7
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
when: never
- if: $CI_COMMIT_BRANCH
when: always
script:
- make stats validate build browser
- CATALOG_URL=https://static.prod.planet-labs.com/${CI_PROJECT_NAME}/${CI_COMMIT_REF_SLUG}/catalog.json PATH_PREFIX=/${CI_PROJECT_NAME}/${CI_COMMIT_REF_SLUG}/browser/ make stats validate build browser
artifacts:
expire_in: 48 hrs
paths:
- build

deploy:
deploy-branch:
stage: deploy
image: us.gcr.io/planet-gcr/static
dependencies:
- build
- build-branch
environment:
name: $CI_COMMIT_REF_SLUG
url: https://static.prod.planet-labs.com/${CI_PROJECT_NAME}/${CI_COMMIT_REF_SLUG}/
on_stop: undeploy
on_stop: undeploy-branch
script:
- static deploy --dir build/stac --config static.json

undeploy:
undeploy-branch:
stage: deploy
image: us.gcr.io/planet-gcr/static
when: manual
Expand All @@ -41,3 +46,32 @@ undeploy:
action: stop
script:
- static undeploy

build-production:
stage: build
image: us.gcr.io/planet-gcr/starport/docker-make:20.10.7
services:
- us.gcr.io/planet-gcr/starport/dind:20.10.7
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
when: always
script:
- make stats validate build browser
artifacts:
expire_in: 48 hrs
paths:
- build

deploy-production:
stage: deploy
image: us.gcr.io/planet-gcr/static
dependencies:
- build-production
rules:
- if: '$CI_COMMIT_BRANCH == "main"'
when: on_success
environment:
name: $CI_COMMIT_REF_SLUG
url: https://www.planet.com/data/stac/
script:
- static deploy --dir build/stac --config static.json
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ GO_STAC := ghcr.io/planetlabs/go-stac:v0.33.0
NODE := docker.io/library/node:20-alpine3.17
STAC_BROWSER_URL := https://github.com/planetlabs/stac-browser.git
STAC_BROWSER_SHA := 5de6b74ce27eb861baad5c43f803b2ebca760157
CATALOG_URL ?= https://www.planet.com/data/stac/catalog.json
PATH_PREFIX ?= /data/stac/browser/

.PHONY: help
help:
Expand All @@ -18,7 +20,7 @@ build: ## Rewrite all STAC files referenced by ./stac/catalog.json to use absolu
--volume $$(pwd):/work \
$(GO_STAC) make-links-absolute \
--entry /work/stac/catalog.json \
--url https://www.planet.com/data/stac/catalog.json \
--url $(CATALOG_URL) \
--output /work/build/stac


Expand Down Expand Up @@ -64,7 +66,7 @@ build/.browser-$(STAC_BROWSER_SHA):
@docker run \
--volume $$(pwd)/stac-browser:/stac-browser \
--workdir /stac-browser \
$(NODE) sh -c 'npm install && npm run build:minimal -- --pathPrefix="/data/stac/browser/"'
$(NODE) sh -c 'npm install && npm run build:minimal -- --pathPrefix=$(PATH_PREFIX) --catalogUrl=$(CATALOG_URL)'
@mkdir -p build/stac/browser
@cp -r stac-browser/dist/* build/stac/browser
touch $@
Expand Down
25 changes: 16 additions & 9 deletions stac/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
"title": "Open SkySat Data",
"type": "application/json"
},
{
"href": "./open-canada/catalog.json",
"rel": "child",
"title": "Open Canada",
"type": "application/json"
},
{
"href": "./disasters/collection.json",
"rel": "child",
Expand Down Expand Up @@ -63,42 +69,43 @@
}
],
"stats:catalogs": {
"count": 10,
"count": 12,
"extensions": {
"https://stac-extensions.github.io/stereo-imagery/v1.0.0/schema.json": 4,
"https://stac-extensions.github.io/version/v1.2.0/schema.json": 4
},
"versions": {
"1.0.0": 9,
"1.1.0": 1
"1.1.0": 3
}
},
"stats:collections": {
"count": 19,
"count": 28,
"extensions": {
"https://stac-extensions.github.io/version/v1.2.0/schema.json": 3,
"https://stac-extensions.github.io/web-map-links/v1.1.0/schema.json": 4
},
"versions": {
"1.0.0": 13,
"1.1.0": 6
"1.1.0": 15
}
},
"stats:items": {
"assets": {
"application/geo+json": 1423,
"application/json": 28,
"application/json": 48,
"application/vnd.laszip+copc": 4,
"application/x-hdf5": 91,
"application/x-hdf5": 93,
"application/xml": 11,
"application/zip": 16,
"image/jpeg": 1,
"image/png": 108,
"image/tiff": 3,
"image/tiff; application=geotiff": 2253,
"image/tiff; application=geotiff; profile=cloud-optimized": 438,
"image/tiff; application=geotiff; profile=cloud-optimized": 13995,
"text/xml": 4
},
"count": 3814,
"count": 10731,
"extensions": {
"https://planetlabs.github.io/stac-extension/v1.0.0-beta.3/schema.json": 30,
"https://stac-extensions.github.io/eo/v1.0.0/schema.json": 2,
Expand All @@ -114,7 +121,7 @@
},
"versions": {
"1.0.0": 3723,
"1.1.0": 91
"1.1.0": 7008
}
}
}
25 changes: 25 additions & 0 deletions stac/open-canada/catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"stac_version": "1.1.0",
"type": "Catalog",
"id": "open-canada",
"title": "Open Canada",
"description": "Designed for Canadian government agencies, the Open Canada Program provides access to a range of sample Planet satellite data and Planetary Variables to drive multi-dimensional geospatial innovation.",
"links": [
{
"href": "../catalog.json",
"rel": "root",
"type": "application/json"
},
{
"href": "./ft-mckay/catalog.json",
"rel": "child",
"title": "Open Canada - Fort McKay",
"type": "application/json"
},
{
"href": "../catalog.json",
"rel": "parent",
"type": "application/json"
}
]
}
83 changes: 83 additions & 0 deletions stac/open-canada/ft-mckay/arps/2022-03-22/2022-03-22.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"stac_version": "1.1.0",
"stac_extensions": [],
"type": "Feature",
"id": "2022-03-22",
"collection": "arps",
"properties": {
"datetime": "2022-03-22T00:00:00Z",
"gsd": 3,
"license": "CC-BY-4.0"
},
"bbox": [
-112.25295215535878,
57.103204652206315,
-111.65726808070603,
57.59303229695448
],
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-112.25295215535878,
57.103204652206315
],
[
-111.65726808070603,
57.103204652206315
],
[
-111.65726808070603,
57.59303229695448
],
[
-112.25295215535878,
57.59303229695448
],
[
-112.25295215535878,
57.103204652206315
]
]
]
},
"assets": {
"qa": {
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Quality Assurance Bands",
"href": "https://storage.googleapis.com/open-cogs/planet-stac/open-canada/ft-mckay/arps/2022-03-22/2022-03-22_analysis_ready_ps_qa.tiff",
"roles": [
"data"
]
},
"sr": {
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Surface Reflectance",
"href": "https://storage.googleapis.com/open-cogs/planet-stac/open-canada/ft-mckay/arps/2022-03-22/2022-03-22_analysis_ready_ps_sr.tiff",
"roles": [
"data",
"reflectance"
]
}
},
"links": [
{
"href": "../../../../catalog.json",
"rel": "root",
"type": "application/json"
},
{
"href": "../collection.json",
"rel": "collection",
"title": "Analysis-Ready PlanetScope",
"type": "application/json"
},
{
"href": "../collection.json",
"rel": "parent",
"title": "Analysis-Ready PlanetScope",
"type": "application/json"
}
]
}
83 changes: 83 additions & 0 deletions stac/open-canada/ft-mckay/arps/2022-03-23/2022-03-23.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"stac_version": "1.1.0",
"stac_extensions": [],
"type": "Feature",
"id": "2022-03-23",
"collection": "arps",
"properties": {
"datetime": "2022-03-23T00:00:00Z",
"gsd": 3,
"license": "CC-BY-4.0"
},
"bbox": [
-112.25295215535878,
57.103204652206315,
-111.65726808070603,
57.59303229695448
],
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-112.25295215535878,
57.103204652206315
],
[
-111.65726808070603,
57.103204652206315
],
[
-111.65726808070603,
57.59303229695448
],
[
-112.25295215535878,
57.59303229695448
],
[
-112.25295215535878,
57.103204652206315
]
]
]
},
"assets": {
"qa": {
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Quality Assurance Bands",
"href": "https://storage.googleapis.com/open-cogs/planet-stac/open-canada/ft-mckay/arps/2022-03-23/2022-03-23_analysis_ready_ps_qa.tiff",
"roles": [
"data"
]
},
"sr": {
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"title": "Surface Reflectance",
"href": "https://storage.googleapis.com/open-cogs/planet-stac/open-canada/ft-mckay/arps/2022-03-23/2022-03-23_analysis_ready_ps_sr.tiff",
"roles": [
"data",
"reflectance"
]
}
},
"links": [
{
"href": "../../../../catalog.json",
"rel": "root",
"type": "application/json"
},
{
"href": "../collection.json",
"rel": "collection",
"title": "Analysis-Ready PlanetScope",
"type": "application/json"
},
{
"href": "../collection.json",
"rel": "parent",
"title": "Analysis-Ready PlanetScope",
"type": "application/json"
}
]
}
Loading