Skip to content

Commit

Permalink
feat: Create aerial photography extension (#66)
Browse files Browse the repository at this point in the history
* feat: Create aerial photography extension

* fix: required field format

* fix: add non-examples

* fix: change name from aerial_photo to aerial-photo

* fix: change README.md title to Aerial Photography
  • Loading branch information
amfage authored Sep 27, 2021
1 parent e3f7058 commit d5d8c59
Show file tree
Hide file tree
Showing 9 changed files with 233 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if other data managers find them to be useful.

## Extensions

- [Aerial Photography](./extensions/aerial-photo): Aerial photography details for photos.
- [Camera](./extensions/camera): Camera details for photos.
- [Film](./extensions/film): Film details for photos.
- [Historical Imagery](./extensions/historical_imagery): Aerial survey photos.
Expand Down
20 changes: 20 additions & 0 deletions extensions/aerial-photo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Aerial Photography Extension Specification

**This is a work in progress and has not been reviewed everything is likely to change**

- **Title**: Aerial Photography
- **Identifier**:
[https://linz.github.io/stac/_STAC_VERSION_/film/aerial-photo.json]()
- **Field Name Prefix**: aerial-photo
- **Scope**: Item
- **Extension Classification**: Work In Progress (Before proposal)

## Item Properties or Asset Fields

| Field Name | Type | Description |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
| aerial-photo:run | string | **REQUIRED** A straight line/pass of sequential imagery flown during a specific survey. |
| aerial-photo:altitude | integer | Altitude in feet at which the plane was flying when the photo was taken. |
| aerial-photo:scale | integer | Denominator of the distance on the ground relative to the distance on the physical film negative for a photo. |
| aerial-photo:sequence_number | integer | **REQUIRED** Sequential order of photos taken during a run. |
| aerial-photo:anomalies | string | Comments about unusual things noticed in the image. |
26 changes: 26 additions & 0 deletions extensions/aerial-photo/examples/item.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"],
"type": "Feature",
"id": "72360",
"geometry": null,
"properties": {
"datetime": "1952-04-23T00:00:00.000Z",
"platform": "Fixed-wing Aircraft",
"instruments": ["EAGLE IV"],
"mission": "SURVEY_1",
"aerial-photo:run": "P1",
"aerial-photo:altitude": 3325,
"aerial-photo:scale": 4800,
"aerial-photo:sequence_number": 14,
"aerial-photo:anomalies": "Cloud shadow"
},
"links": [],
"assets": {
"image/tiff; application=geotiff; profile=cloud-optimized": {
"href": "./72360.tiff",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"file:checksum": "1220b7deb18ad9dc6f3f94df60c26dd235a019946b8b6b7d1a36f100a8f9f1889130"
}
}
}
26 changes: 26 additions & 0 deletions extensions/aerial-photo/non-examples/no_run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"],
"description": "This is a non-conformant STAC example using the aerial photography extension. It is missing the mandatory aerial-photo:run property.",
"type": "Feature",
"id": "72360",
"geometry": null,
"properties": {
"datetime": "1952-04-23T00:00:00.000Z",
"platform": "Fixed-wing Aircraft",
"instruments": ["EAGLE IV"],
"mission": "SURVEY_1",
"aerial-photo:altitude": 3325,
"aerial-photo:scale": 4800,
"aerial-photo:sequence_number": 14,
"aerial-photo:anomalies": "Cloud shadow"
},
"links": [],
"assets": {
"image/tiff; application=geotiff; profile=cloud-optimized": {
"href": "./72360.tiff",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"file:checksum": "1220b7deb18ad9dc6f3f94df60c26dd235a019946b8b6b7d1a36f100a8f9f1889130"
}
}
}
26 changes: 26 additions & 0 deletions extensions/aerial-photo/non-examples/no_sequence_number.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"],
"description": "This is a non-conformant STAC example using the aerial photography extension. It is missing the mandatory aerial-photo:sequence_number property.",
"type": "Feature",
"id": "72360",
"geometry": null,
"properties": {
"datetime": "1952-04-23T00:00:00.000Z",
"platform": "Fixed-wing Aircraft",
"instruments": ["EAGLE IV"],
"mission": "SURVEY_1",
"aerial-photo:run": "P1",
"aerial-photo:altitude": 3325,
"aerial-photo:scale": 4800,
"aerial-photo:anomalies": "Cloud shadow"
},
"links": [],
"assets": {
"image/tiff; application=geotiff; profile=cloud-optimized": {
"href": "./72360.tiff",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"file:checksum": "1220b7deb18ad9dc6f3f94df60c26dd235a019946b8b6b7d1a36f100a8f9f1889130"
}
}
}
27 changes: 27 additions & 0 deletions extensions/aerial-photo/non-examples/run_integer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"],
"description": "This is a non-conformant STAC example using the aerial photography extension. The aerial-photo:run field is an integer instead of a string.",
"type": "Feature",
"id": "72360",
"geometry": null,
"properties": {
"datetime": "1952-04-23T00:00:00.000Z",
"platform": "Fixed-wing Aircraft",
"instruments": ["EAGLE IV"],
"mission": "SURVEY_1",
"aerial-photo:run": 248,
"aerial-photo:altitude": 3325,
"aerial-photo:scale": 4800,
"aerial-photo:sequence_number": 14,
"aerial-photo:anomalies": "Cloud shadow"
},
"links": [],
"assets": {
"image/tiff; application=geotiff; profile=cloud-optimized": {
"href": "./72360.tiff",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"file:checksum": "1220b7deb18ad9dc6f3f94df60c26dd235a019946b8b6b7d1a36f100a8f9f1889130"
}
}
}
27 changes: 27 additions & 0 deletions extensions/aerial-photo/non-examples/sequence_number_string.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"stac_version": "1.0.0",
"stac_extensions": ["https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"],
"description": "This is a non-conformant STAC example using the aerial photography extension. The aerial-photo:sequence_number field is a string instead of an integer.",
"type": "Feature",
"id": "72360",
"geometry": null,
"properties": {
"datetime": "1952-04-23T00:00:00.000Z",
"platform": "Fixed-wing Aircraft",
"instruments": ["EAGLE IV"],
"mission": "SURVEY_1",
"aerial-photo:run": "P1",
"aerial-photo:altitude": 3325,
"aerial-photo:scale": 4800,
"aerial-photo:sequence_number": "incorrect string",
"aerial-photo:anomalies": "Cloud shadow"
},
"links": [],
"assets": {
"image/tiff; application=geotiff; profile=cloud-optimized": {
"href": "./72360.tiff",
"type": "image/tiff; application=geotiff; profile=cloud-optimized",
"file:checksum": "1220b7deb18ad9dc6f3f94df60c26dd235a019946b8b6b7d1a36f100a8f9f1889130"
}
}
}
79 changes: 79 additions & 0 deletions extensions/aerial-photo/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json",
"title": "Aerial Photography Extension",
"description": "STAC Aerial Photography Extension for STAC Items.",
"allOf": [
{
"type": "object",
"required": ["type", "properties", "assets"],
"properties": {
"type": {
"const": "Feature"
},
"properties": {
"allOf": [
{
"required": ["aerial-photo:run", "aerial-photo:sequence_number"]
},
{
"$ref": "#/definitions/fields"
}
]
},
"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://linz.github.io/stac/_STAC_VERSION_/aerial-photo/schema.json"
}
}
}
},
"fields": {
"type": "object",
"properties": {
"aerial-photo:run": {
"title": "Straight line/pass of sequential imagery",
"type": "string"
},
"aerial-photo:altitude": {
"title": "Altitude in feet",
"type": "integer"
},
"aerial-photo:scale": {
"title": "Scale denominator",
"type": "integer"
},
"aerial-photo:sequence_number": {
"title": "Sequential order",
"type": "integer"
},
"aerial-photo:anomalies": {
"title": "Image anomalies",
"type": "string"
}
},
"patternProperties": {
"^(?!aerial-photo:)": {}
},
"additionalProperties": false
}
}
}
1 change: 1 addition & 0 deletions validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ shopt -s failglob
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_/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
Expand Down

0 comments on commit d5d8c59

Please sign in to comment.