Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Mar 7, 2021
1 parent b5be09c commit 45abb5c
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 79 deletions.
2 changes: 2 additions & 0 deletions .github/remark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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]: <https://github.com/stac-extensions/template/compare/v1.0.0...HEAD>
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
# Point Cloud Extension
# Point Cloud Extension Specification

- **Title:** Point Cloud
- **Identifier:** <https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json>
- **Field Name Prefix:** pc
- **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 |
| ------------- | --------------------------------- | ----------- |
Expand Down Expand Up @@ -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.
15 changes: 11 additions & 4 deletions examples/example-autzen.json
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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"
}
],
Expand Down
180 changes: 115 additions & 65 deletions json-schema/schema.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -143,4 +193,4 @@
}
}
}
}
}

0 comments on commit 45abb5c

Please sign in to comment.