generated from stac-extensions/template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6ee1f8
commit f5068f2
Showing
2 changed files
with
309 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json#", | ||
"title": "Virtual Assets Extension", | ||
"description": "STAC Virtual Assets Extension for STAC Items and STAC Collections.", | ||
"oneOf": [ | ||
{ | ||
"$comment": "This is the schema for STAC Items. Remove this object if this extension only applies to Collections.", | ||
"allOf": [ | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type", | ||
"assets" | ||
], | ||
"properties": { | ||
"type": { | ||
"const": "Feature" | ||
}, | ||
"assets": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/fields" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"$ref": "#/definitions/stac_extensions" | ||
} | ||
] | ||
}, | ||
{ | ||
"allOf": [ | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type", | ||
"assets" | ||
], | ||
"properties": { | ||
"type": { | ||
"const": "Collection" | ||
}, | ||
"assets": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/fields" | ||
} | ||
}, | ||
"item_assets": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/fields" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"$ref": "#/definitions/stac_extensions" | ||
} | ||
] | ||
} | ||
], | ||
"definitions": { | ||
"stac_extensions": { | ||
"type": "object", | ||
"required": [ | ||
"stac_extensions" | ||
], | ||
"properties": { | ||
"stac_extensions": { | ||
"type": "array", | ||
"contains": { | ||
"const": "https://stac-extensions.github.io/virtual-assets/v1.0.0/schema.json" | ||
} | ||
} | ||
} | ||
}, | ||
"fields": { | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"if": { | ||
"properties": { | ||
"roles": { | ||
"const": "virtual" | ||
} | ||
}, | ||
"required": [ | ||
"vrt:hrefs" | ||
] | ||
} | ||
} | ||
], | ||
"properties": { | ||
"vrt:hrefs": { | ||
"title": "Virtual Asset references", | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"required": [ | ||
"key", | ||
"href" | ||
], | ||
"properties": { | ||
"key": { | ||
"type": "string", | ||
"minLength": 1 | ||
}, | ||
"href": { | ||
"oneOf": [ | ||
{ | ||
"type": "string", | ||
"format": "iri-reference", | ||
"minLength": 1 | ||
}, | ||
{ | ||
"type": "string", | ||
"minLength": 2, | ||
"pattern": "^#.*$" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"vrt:algorithm": { | ||
"title": "Algorithm", | ||
"type": "string" | ||
}, | ||
"vrt:algorithm_opts": { | ||
"title": "Algorithm Options", | ||
"type": "object" | ||
} | ||
}, | ||
"patternProperties": { | ||
"^(?!vrt:)": {} | ||
}, | ||
"additionalProperties": false | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"$id": "https://stac-extensions.github.io/render/v1.0.0/schema.json#", | ||
"title": "Rendering Extension", | ||
"description": "STAC Rendering Extension for STAC Items and STAC Collections.", | ||
"oneOf": [ | ||
{ | ||
"$comment": "This is the schema for STAC Items. Remove this object if this extension only applies to Collections.", | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/stac_extensions" | ||
}, | ||
{ | ||
"type": "object", | ||
"required": [ | ||
"type", | ||
"assets", | ||
"renders" | ||
], | ||
"properties": { | ||
"type": { | ||
"const": "Feature" | ||
}, | ||
"renders": { | ||
"$comment": "This validates the fields in Item Assets, but does not require them.", | ||
"type": "object", | ||
"additionalProperties": { | ||
"$ref": "#/definitions/fields" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"$comment": "This is the schema for STAC Collections.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"required": [ | ||
"type", | ||
"renders" | ||
], | ||
"properties": { | ||
"type": { | ||
"const": "Collection" | ||
} | ||
} | ||
}, | ||
{ | ||
"$ref": "#/definitions/stac_extensions" | ||
} | ||
], | ||
"anyOf": [ | ||
{ | ||
"$comment": "This validates the fields in Collection Assets, but does not require them.", | ||
"required": [ | ||
"assets" | ||
], | ||
"properties": { | ||
"renders": { | ||
"type": "object", | ||
"not": { | ||
"additionalProperties": { | ||
"not": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/definitions/require_any_field" | ||
}, | ||
{ | ||
"$ref": "#/definitions/fields" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"definitions": { | ||
"stac_extensions": { | ||
"type": "object", | ||
"required": [ | ||
"stac_extensions" | ||
], | ||
"properties": { | ||
"stac_extensions": { | ||
"type": "array", | ||
"contains": { | ||
"const": "https://stac-extensions.github.io/render/v1.0.0/schema.json" | ||
} | ||
} | ||
} | ||
}, | ||
"require_any_field": { | ||
"$comment": "Please list all fields here so that we can force the existence of one of them in other parts of the schemas.", | ||
"anyOf": [ | ||
{"type": "object", "required": ["assets"]}, | ||
{"type": "object", "required": ["title"]}, | ||
{"type": "object", "required": ["rescale"]}, | ||
{"type": "object", "required": ["nodata"]}, | ||
{"type": "object", "required": ["colormap_name"]}, | ||
{"type": "object", "required": ["colormap"]}, | ||
{"type": "object", "required": ["color_formula"]}, | ||
{"type": "object", "required": ["resampling"]}, | ||
{"type": "object", "required": ["expression"]}, | ||
{"type": "object", "required": ["minmax_zoom"]} | ||
] | ||
}, | ||
"fields": { | ||
"$comment": "Add your new fields here. Don't require them here, do that above in the corresponding schema.", | ||
"type": "object", | ||
"required": [ | ||
"assets" | ||
], | ||
"properties": { | ||
"assets": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"title": { | ||
"type": "string" | ||
}, | ||
"rescale": { | ||
"type": "array", | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"type": "number" | ||
} | ||
} | ||
}, | ||
"nodata": { | ||
"type": "number" | ||
}, | ||
"colormap_name": { | ||
"type": "string" | ||
}, | ||
"colormap": { | ||
"type": "object" | ||
}, | ||
"color_formula": { | ||
"type": "string" | ||
}, | ||
"resampling": { | ||
"type": "string" | ||
}, | ||
"expression": { | ||
"type": "string" | ||
}, | ||
"minmax_zoom": { | ||
"type": "array", | ||
"items": { | ||
"type": "number" | ||
} | ||
} | ||
}, | ||
"additionalProperties": true | ||
} | ||
} | ||
} |