Skip to content

Commit

Permalink
fix: change linz.github.io/stac to stac.linz.govt.nz (#149)
Browse files Browse the repository at this point in the history
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
amfage and kodiakhq[bot] authored Nov 11, 2021
1 parent 7443877 commit fff84dc
Show file tree
Hide file tree
Showing 21 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion extensions/aerial-photo/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"],
"stac_extensions": ["https://stac.linz.govt.nz/_STAC_VERSION_/aerial-photo/schema.json"],
"type": "Feature",
"id": "72360",
"geometry": null,
Expand Down
4 changes: 2 additions & 2 deletions extensions/aerial-photo/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/aerial-photo/schema.json",
"title": "Aerial Photography Extension",
"description": "STAC Aerial Photography Extension for STAC Items.",
"allOf": [
Expand Down Expand Up @@ -41,7 +41,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/aerial-photo/schema.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/camera/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/camera/schema.json"],
"stac_extensions": ["https://stac.linz.govt.nz/_STAC_VERSION_/camera/schema.json"],
"type": "Feature",
"id": "72360",
"geometry": null,
Expand Down
4 changes: 2 additions & 2 deletions extensions/camera/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/camera/schema.json",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/camera/schema.json",
"title": "Camera Extension",
"description": "STAC Camera Extension for STAC Items.",
"allOf": [
Expand Down Expand Up @@ -34,7 +34,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/camera/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/camera/schema.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/film/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/film/schema.json"],
"stac_extensions": ["https://stac.linz.govt.nz/_STAC_VERSION_/film/schema.json"],
"type": "Feature",
"id": "72360",
"geometry": null,
Expand Down
4 changes: 2 additions & 2 deletions extensions/film/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/film/schema.json",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/film/schema.json",
"title": "Film Extension",
"description": "STAC Film Extension for STAC Items.",
"allOf": [
Expand Down Expand Up @@ -41,7 +41,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/film/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/film/schema.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/historical-imagery/examples/collection.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "Collection",
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/historical-imagery/schema.json"],
"stac_extensions": ["https://stac.linz.govt.nz/_STAC_VERSION_/historical-imagery/schema.json"],
"id": "01FJ0SE46TT5TGBHBVX64TMEPA",
"title": "399",
"description": "Survey 399 of the Crown Aerial Film Archive",
Expand Down
10 changes: 5 additions & 5 deletions extensions/historical-imagery/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://linz.github.io/stac/_STAC_VERSION_/historical-imagery/schema.json",
"https://stac.linz.govt.nz/_STAC_VERSION_/historical-imagery/schema.json",
"https://stac-extensions.github.io/eo/v1.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/file/v2.0.0/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/camera/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/film/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/scanning/schema.json"
"https://stac.linz.govt.nz/_STAC_VERSION_/aerial-photo/schema.json",
"https://stac.linz.govt.nz/_STAC_VERSION_/camera/schema.json",
"https://stac.linz.govt.nz/_STAC_VERSION_/film/schema.json",
"https://stac.linz.govt.nz/_STAC_VERSION_/scanning/schema.json"
],
"type": "Feature",
"id": "215354",
Expand Down
14 changes: 7 additions & 7 deletions extensions/historical-imagery/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/historical-imagery/schema.json",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/historical-imagery/schema.json",
"title": "Historical Imagery Extension",
"description": "STAC Historical Imagery Extension for STAC Items and STAC Collections.",
"oneOf": [
Expand Down Expand Up @@ -64,7 +64,7 @@
"allOf": [
{
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/historical-imagery/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/historical-imagery/schema.json"
}
},
{
Expand All @@ -84,22 +84,22 @@
},
{
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/aerial-photo/schema.json"
}
},
{
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/camera/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/camera/schema.json"
}
},
{
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/film/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/film/schema.json"
}
},
{
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/scanning/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/scanning/schema.json"
}
}
]
Expand All @@ -113,7 +113,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/historical-imagery/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/historical-imagery/schema.json"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions extensions/linz/examples/collection.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json",
"https://stac.linz.govt.nz/_STAC_VERSION_/linz/schema.json",
"https://stac.linz.govt.nz/_STAC_VERSION_/quality/schema.json",
"https://stac-extensions.github.io/file/v2.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/version/v1.0.0/schema.json"
Expand Down
2 changes: 1 addition & 1 deletion extensions/linz/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json",
"https://stac.linz.govt.nz/_STAC_VERSION_/linz/schema.json",
"https://stac-extensions.github.io/file/v2.0.0/schema.json",
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
"https://stac-extensions.github.io/version/v1.0.0/schema.json"
Expand Down
6 changes: 3 additions & 3 deletions extensions/linz/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/linz/schema.json",
"title": "LINZ STAC Extension",
"description": "LINZ STAC Extension.",
"allOf": [
Expand Down Expand Up @@ -46,7 +46,7 @@
"$ref": "https://schemas.stacspec.org/v1.0.0/collection-spec/json-schema/collection.json#"
},
{
"$ref": "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json#"
"$ref": "https://stac.linz.govt.nz/_STAC_VERSION_/quality/schema.json#"
}
]
},
Expand Down Expand Up @@ -78,7 +78,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/linz/schema.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/quality/examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json"
"https://stac.linz.govt.nz/_STAC_VERSION_/quality/schema.json"
],
"type": "Collection",
"id": "collection",
Expand Down
4 changes: 2 additions & 2 deletions extensions/quality/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json#",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/quality/schema.json#",
"description": "STAC Quality Extension for STAC Collections.",
"allOf": [
{
Expand All @@ -21,7 +21,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/quality/schema.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/scanning/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/scanning/schema.json"],
"stac_extensions": ["https://stac.linz.govt.nz/_STAC_VERSION_/scanning/schema.json"],
"type": "Feature",
"id": "72360",
"geometry": null,
Expand Down
4 changes: 2 additions & 2 deletions extensions/scanning/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/scanning/schema.json",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/scanning/schema.json",
"title": "Scanning Extension",
"description": "STAC Scanning Extension for STAC Items.",
"allOf": [
Expand Down Expand Up @@ -34,7 +34,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/scanning/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/scanning/schema.json"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/template/examples/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://linz.github.io/stac/_STAC_VERSION_/template/schema.json"
"https://stac.linz.govt.nz/_STAC_VERSION_/template/schema.json"
],
"type": "Collection",
"id": "collection",
Expand Down
2 changes: 1 addition & 1 deletion extensions/template/examples/item.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/template/schema.json"],
"stac_extensions": ["https://stac.linz.govt.nz/_STAC_VERSION_/template/schema.json"],
"type": "Feature",
"id": "item",
"bbox": [172.9, 1.3, 173, 1.4],
Expand Down
4 changes: 2 additions & 2 deletions extensions/template/schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/template/schema.json",
"$id": "https://stac.linz.govt.nz/_STAC_VERSION_/template/schema.json",
"title": "Template Extension",
"description": "STAC Template Extension for STAC Items and STAC Collections.",
"oneOf": [
Expand Down Expand Up @@ -134,7 +134,7 @@
"stac_extensions": {
"type": "array",
"contains": {
"const": "https://linz.github.io/stac/_STAC_VERSION_/template/schema.json"
"const": "https://stac.linz.govt.nz/_STAC_VERSION_/template/schema.json"
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ shopt -s failglob globstar

validator_command=(
node_modules/.bin/stac-node-validator
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/template/schema.json=extensions/template/schema.json
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/historical-imagery/schema.json=extensions/historical-imagery/schema.json
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json=extensions/aerial-photo/schema.json
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/camera/schema.json=extensions/camera/schema.json
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/film/schema.json=extensions/film/schema.json
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/scanning/schema.json=extensions/scanning/schema.json
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/quality/schema.json=extensions/quality/schema.json
--schemaMap=https://linz.github.io/stac/_STAC_VERSION_/linz/schema.json=extensions/linz/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/template/schema.json=extensions/template/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/historical-imagery/schema.json=extensions/historical-imagery/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/aerial-photo/schema.json=extensions/aerial-photo/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/camera/schema.json=extensions/camera/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/film/schema.json=extensions/film/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/scanning/schema.json=extensions/scanning/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/quality/schema.json=extensions/quality/schema.json
--schemaMap=https://stac.linz.govt.nz/_STAC_VERSION_/linz/schema.json=extensions/linz/schema.json
)

"${validator_command[@]}" ./**/examples/*.json
4 changes: 2 additions & 2 deletions validation.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export function loadSchema(uri) {
*/
export async function loadSchemaFromUri(uri) {
try {
if (uri.startsWith('https://linz.github.io/stac/_STAC_VERSION_/')) {
const schemaPath = uri.slice('https://linz.github.io/stac/_STAC_VERSION_/'.length);
if (uri.startsWith('https://stac.linz.govt.nz/_STAC_VERSION_/')) {
const schemaPath = uri.slice('https://stac.linz.govt.nz/_STAC_VERSION_/'.length);
return JSON.parse(await fs.readFile(join(__dirname, 'extensions', schemaPath)));
}

Expand Down

0 comments on commit fff84dc

Please sign in to comment.