Skip to content

Commit

Permalink
item example
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesfisher-geo committed Nov 13, 2024
1 parent dc6fd34 commit b73fc74
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 44 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,38 +47,38 @@ This is the introduction for the purpose and the content of the XYZ Object...

| Field Name | Type | Description |
| ---------- | ------ | -------------------------------------------- |
| x | number | **REQUIRED**. Describe the required field... |
| y | number | **REQUIRED**. Describe the required field... |
| z | number | **REQUIRED**. Describe the required field... |
| `id` | number | **REQUIRED**. Integer ID of the license |
| `name` | string | **REQUIRED**. License name |
| `url` | string | **REQUIRED**. URL to the license text |

### Category Object

This is the introduction for the purpose and the content of the XYZ Object...

| Field Name | Type | Description |
| ---------- | ------ | -------------------------------------------- |
| x | number | **REQUIRED**. Describe the required field... |
| y | number | **REQUIRED**. Describe the required field... |
| z | number | **REQUIRED**. Describe the required field... |
| `id` | number | **REQUIRED**. Integer ID of the category |
| `name` | string | **REQUIRED**. Name of the category (e.g. 'cat') |
| `supercategory` | string | **REQUIRED**. General category (e.g. 'animal') |
<!-- | `keypoints` | /[string/] | List of names which keypoint coordinates represent |
| `skeleton` | /[/[number, number/]/] | **REQUIRED**. Describe the required field... | -->

### Annotation Object

This is the introduction for the purpose and the content of the XYZ Object...

| Field Name | Type | Description |
| ---------- | ------ | -------------------------------------------- |
| x | number | **REQUIRED**. Describe the required field... |
| y | number | **REQUIRED**. Describe the required field... |
| z | number | **REQUIRED**. Describe the required field... |
| `id ` | number | **REQUIRED**. Integer ID of the annotation |
| `image_id` | number | **REQUIRED**. Integer ID of the associated images from the 'coco:images' field |
| `category_id` | number | **REQUIRED**. Integer ID of the associated category from the 'coco:categories' field |
| `bbox` | /[number/] | **REQUIRED**. Bounding box of the annotation in pixel coordinates |
| `segmentation` | /[/[number, number/]/] | Segmentation mask of the annotation as a list of image coordinates |
| `area` | number | The area of the segmentation mask in pixels |
| `iscrowd` | bool | Tag indicating if the segmentation mask is of a single object or many objects in an image |
| `score` | number | Score 0 - 1.0 indicating the annotation confidence level |

## Relation types

The following types should be used as applicable `rel` types in the
[Link Object](https://github.com/radiantearth/stac-spec/tree/master/item-spec/item-spec.md#link-object).

| Type | Description |
| -------------- | ------------------------------------- |
| fancy-rel-type | This link points to a fancy resource. |

## Contributing

Expand Down
18 changes: 2 additions & 16 deletions examples/collection.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"stac_version": "1.0.0",
"stac_extensions": [
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json",
"https://stac-extensions.github.io/template/v1.0.0/schema.json"
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
],
"type": "Collection",
"id": "collection",
Expand All @@ -29,29 +28,16 @@
]
}
},
"template:new_field": "test",
"template:xyz": {
"x": 1,
"y": 2,
"z": 3
},
"template:another_one": [
1,
2,
3
],
"assets": {
"example": {
"href": "https://example.com/examples/file.xyz",
"template:new_field": "test"
}
},
"item_assets": {
"data": {
"roles": [
"data"
],
"template:new_field": "test"
]
}
},
"summaries": {
Expand Down
39 changes: 27 additions & 12 deletions 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://stac-extensions.github.io/template/v1.0.0/schema.json"
"https://stac-extensions.github.io/cocojson/v1.0.0/schema.json"
],
"type": "Feature",
"id": "item",
Expand Down Expand Up @@ -40,16 +40,31 @@
},
"properties": {
"datetime": "2020-12-11T22:38:32Z",
"template:new_field": "test",
"template:xyz": {
"x": 1,
"y": 2,
"z": 3
},
"template:another_one": [
1,
2,
3
"coco:license": [
{
"id": 1,
"name": "MIT License",
"url": "https://link/to/license/text"
}
],
"coco:categories": [
{
"id": 1,
"name": "locomotive",
"supercategory": "train cars"
}
],
"coco:annotations": [
{
"id": 1,
"image_id": 1,
"category_id": 1,
"bbox": [260, 177, 231, 199],
"segmentation": [[260, 177], [261, 178], [262, 179], ...],
"area": 45969,
"iscrowd": 0,
"score": 0.75
}
]
},
"links": [
Expand All @@ -64,4 +79,4 @@
"template:new_field": "test"
}
}
}
}

0 comments on commit b73fc74

Please sign in to comment.