diff --git a/.github/remark.yaml b/.github/remark.yaml index d9a432a..bcaa613 100644 --- a/.github/remark.yaml +++ b/.github/remark.yaml @@ -28,6 +28,8 @@ plugins: - 70 - - remark-lint-heading-style - atx + - - remark-lint-no-shortcut-reference-link + - false # Lists - remark-lint-list-item-bullet-indent - remark-lint-ordered-list-marker-style diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..dd0fd2f --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,19 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +### Changed + +### Deprecated + +### Removed + +### Fixed + +[Unreleased]: diff --git a/README.md b/README.md index b21dca5..ea8e1cc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Point Cloud Extension +# Point Cloud Extension Specification - **Title:** Point Cloud - **Identifier:** @@ -6,17 +6,20 @@ - **Scope:** Item, Collection - **Extension [Maturity Classification](https://github.com/radiantearth/stac-spec/tree/master/extensions/README.md#extension-maturity):** Proposal - **Owner**: @matthewhanson -- **History**: [Prior to March 2nd, 2021](https://github.com/radiantearth/stac-spec/tree/3a83d75aec7f16ae597ee9779777a97e83ff46a4/extensions/pointcloud) +- **History**: [Prior to March 2, 2021](https://github.com/radiantearth/stac-spec/commits/v1.0.0-rc.1/extensions/pointcloud) -This document explains the Point Cloud Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) (STAC) -specification. It adds fields to a STAC Item, to enable STAC to more fully describe point cloud datasets. The -point clouds can come from either active or passive sensors, and data is frequently acquired using tools such as LiDAR or coincidence-matched imagery. +This document explains the Point Cloud Extension to the [SpatioTemporal Asset Catalog](https://github.com/radiantearth/stac-spec) +(STAC) specification. It adds fields to a STAC Item, to enable STAC to more fully describe point cloud datasets. +The point clouds can come from either active or passive sensors, and data is frequently acquired using tools such as +LiDAR or coincidence-matched imagery. - Examples: - [Example](examples/example-autzen.json) + - [PDAL to STAC Python script](pdal-to-stac.py) - [JSON Schema](json-schema/schema.json) +- [Changelog](./CHANGELOG.md) -## Item Properties fields +## Item Properties | Field Name | Type | Description | | ------------- | --------------------------------- | ----------- | @@ -52,7 +55,3 @@ A sequential array of Items mapping to `pc:schemas` defines per-channel statisti | minimum | number | The minimum value of the channel. | | stddev | number | The standard deviation of the channel. | | variance | number | The variance of the channel. | - -## Implementations - -None yet, still in proposal stage. diff --git a/examples/example-autzen.json b/examples/example-autzen.json index 4ecbc88..0be53d1 100644 --- a/examples/example-autzen.json +++ b/examples/example-autzen.json @@ -1,9 +1,16 @@ { - "stac_version": "1.0.0-beta.2", + "stac_version": "1.0.0-rc.1", "stac_extensions": [ - "https://stac-extensions.github.io/file/v1.0.0/schema.json" + "https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json" ], - "assets": {}, + "assets": { + "data": { + "href": "https://example.com/data/autzen/autzen-full.laz", + "role": [ + "data" + ] + } + }, "bbox": [ -123.0755422, 44.04971882, @@ -42,7 +49,7 @@ "id": "autzen-full.laz", "links": [ { - "href": "/Users/hobu/dev/git/pdal/test/data/autzen/autzen-full.laz", + "href": "https://example.com/data/autzen/example-autzen.json", "rel": "self" } ], diff --git a/json-schema/schema.json b/json-schema/schema.json index 5040e06..79533ba 100644 --- a/json-schema/schema.json +++ b/json-schema/schema.json @@ -1,89 +1,139 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://stac-extensions.github.io/file/v1.0.0/schema.json#", + "$id": "https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json#", "title": "Point Cloud Extension", - "description": "STAC Point Cloud Extension to a STAC Item", - "allOf": [ + "description": "STAC Point Cloud Extension for STAC Items and STAC Collections.", + "oneOf": [ { - "$ref": "#/definitions/item_type" + "$comment": "This is the schema for STAC Items.", + "allOf": [ + { + "type": "object", + "required": [ + "type", + "properties", + "assets" + ], + "properties": { + "type": { + "const": "Feature" + }, + "properties": { + "allOf": [ + { + "$comment": "Require fields here for item properties.", + "required": [ + "pc:count", + "pc:type", + "pc:encoding", + "pc:schemas" + ] + }, + { + "$ref": "#/definitions/fields" + } + ] + }, + "assets": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/fields" + } + } + } + }, + { + "$ref": "#/definitions/stac_extensions" + } + ] }, { - "$ref": "#/definitions/pointcloud" + "$comment": "This is the schema for STAC Collections.", + "allOf": [ + { + "type": "object", + "required": [ + "type" + ], + "properties": { + "type": { + "const": "Collection" + }, + "assets": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/fields" + } + }, + "item_assets": { + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/fields" + } + } + } + }, + { + "$comment": "Remove this and the following object if this is not an extension to a Collection.", + "$ref": "#/definitions/stac_extensions" + }, + { + "$ref": "#/definitions/fields" + } + ] } ], "definitions": { - "item_type": { + "stac_extensions": { "type": "object", "required": [ - "type" + "stac_extensions" ], "properties": { - "type": { - "type": "string", - "const": "Feature" + "stac_extensions": { + "type": "array", + "contains": { + "const": "https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json" + } } } }, - "pointcloud": { + "fields": { "type": "object", - "required": [ - "stac_extensions", - "properties" - ], "properties": { - "stac_extensions": { - "type": "array", - "contains": { - "enum": [ - "pointcloud", - "https://schemas.stacspec.org/v1.0.0-beta.2/extensions/pointcloud/json-schema/schema.json" - ] - } + "pc:count": { + "type": "integer", + "minimum": 0 }, - "properties": { - "type": "object", - "required": [ - "pc:count", - "pc:type", - "pc:encoding", - "pc:schemas" - ], - "properties": { - "pc:count": { - "type": "integer", - "minimum": 0 - }, - "pc:type": { - "type": "string" - }, - "pc:encoding": { - "type": "string" - }, - "pc:schemas": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/schema" - } - }, - "pc:density": { - "type": "number", - "minimum": 0 - }, - "pc:statistics": { - "type": "array", - "minItems": 1, - "items": { - "$ref": "#/definitions/stats" - } - } + "pc:type": { + "type": "string" + }, + "pc:encoding": { + "type": "string" + }, + "pc:schemas": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/schema" } }, - "patternProperties": { - "^(?!pc:)": {} + "pc:density": { + "type": "number", + "minimum": 0 }, - "additionalProperties": false - } + "pc:statistics": { + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/definitions/stats" + } + } + }, + "patternProperties": { + "^(?!pc:)": {} + }, + "additionalProperties": false }, "schema": { "type": "object", @@ -143,4 +193,4 @@ } } } -} +} \ No newline at end of file