Skip to content

Commit

Permalink
Merge pull request #865 from opengeospatial/part5-schemas
Browse files Browse the repository at this point in the history
add initial version of Part 5: Schemas

Merge as discussed in the SWG meeting on 2023-10-23, also to get a baseline for the Code Sprint next week. We will use new issues and pull requests for discussions and changes.
  • Loading branch information
cportele authored Oct 25, 2023
2 parents b560244 + 3e4d414 commit 68ccec2
Show file tree
Hide file tree
Showing 28 changed files with 3,599 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ The OGC Features API SWG has identified the following extensions as the highest
* Drafts with multiple implementations. Once all comments have been resolved and at least two implementations updated to the release candidate, the release candidate will enter the OGC approval process.
* [OGC API - Features - Part 4: Create, Replace, Update and Delete](https://docs.ogc.org/DRAFTS/20-002.html)
* The draft is fairly complete, but needs more implementations, testing and review to move to the Public Review.
* OGC API - Features - Part n: Schemas
* [OGC API - Features - Part 5: Schemas](https://docs.ogc.org/DRAFTS/23-058.html)
* Incomplete draft.

## Additional information

Expand All @@ -115,8 +116,8 @@ Open issues for all parts are organized in [GitHub projects](https://github.com/
* [Open issues for Part 2: Coordinate Reference Systems by Reference](https://github.com/opengeospatial/ogcapi-features/projects/2)
* [Open issues for Part 3: Filtering / Common Query Language (CQL2)](https://github.com/opengeospatial/ogcapi-features/projects/4)
* [Open issues for Part 4: Create, Replace, Update and Delete](https://github.com/opengeospatial/ogcapi-features/projects/3)
* [Open issues for Part 5: Schemas](https://github.com/opengeospatial/ogcapi-features/projects/11)
* [Open issues for Part n: OpenAPI 3.1](https://github.com/opengeospatial/ogcapi-features/projects/7)
* [Open issues for Part n: Schemas](https://github.com/opengeospatial/ogcapi-features/projects/11)
* [Open issues for Part n: Search/Queries](https://github.com/opengeospatial/ogcapi-features/projects/10)
* [Open issues for Part n: Geometry Simplification](https://github.com/opengeospatial/ogcapi-features/projects/13)
* [Open issues for Part n: Property Selection](https://github.com/opengeospatial/ogcapi-features/projects/12)
Expand All @@ -137,6 +138,7 @@ The latest drafts of each standard in this repository are build daily (based on
* [Part 2: Coordinate Reference Systems by Reference](https://docs.ogc.org/DRAFTS/18-058r2.html)
* [Part 3: Filtering](https://docs.ogc.org/DRAFTS/19-079r1.html)
* [Part 4: Create, Replace, Update and Delete](https://docs.ogc.org/DRAFTS/20-002.html)
* [Part 5: Schemas](https://docs.ogc.org/DRAFTS/23-058.html)

* [Common Query Language (CQL2)](https://docs.ogc.org/DRAFTS/21-065.html)

Expand All @@ -155,6 +157,8 @@ asciidoctor -a data-uri -r asciidoctor-diagram extensions/filtering/standard/19-
asciidoctor -a data-uri -r asciidoctor-diagram cql2/standard/21-065.adoc
# Part 4: Create, Replace, Update and Delete
asciidoctor -a data-uri -r asciidoctor-diagram extensions/transactions/create-replace-update-delete/standard/20-002.adoc
# Part 5: Schemas
asciidoctor -a data-uri -r asciidoctor-diagram extensions/schemas/standard/23-058.adoc
```

The resulting HTML files will be built in the same directory as the AsciiDoc file, e.g. as `core/standard/17-069.html`.
Expand Down
15 changes: 15 additions & 0 deletions asciidoctor.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,20 @@
"r":[
"asciidoctor-diagram"
]
},
"6": {
"OGC_doc_number": "23-058",
"urn":"http://www.opengis.net/doc/IS/ogcapi-features-5/1.0",
"title":"OGC API - Features - Part 5: Schemas",
"path":"extensions/schemas/standard/23-058.adoc",
"options": ["--trace"],
"a":[
"data-uri",
"stylesdir=./resources/stylesheets",
"dot=/usr/bin/dot"
],
"r":[
"asciidoctor-diagram"
]
}
}
60 changes: 60 additions & 0 deletions extensions/schemas/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# OGC API - Features - Part 5: Schemas

This folder contains the content for the candidate standard [OGC API - Features - Part 5: Schemas](https://docs.ogc.org/DRAFTS/23-058.html).

The document is in the folder "standard", the document is [standard/23-058.adoc](https://github.com/opengeospatial/ogcapi-features/blob/master/extensions/schemas/standard/23-058.adoc).

## Status

The document is an initial draft. The plan is to move in parallel with Part 4 (Create, Replace, Update and Delete) through the standardization process (OGC Architecture Board Review, Public Comment, OGC Approval Votes).

## Overview

Part 5 (Schemas) specifies how geospatial data such as features can be described by a logical schema and how such schemas are published in an OGC Web API.

As logical schemas, the schemas describe the data independent of a particular format to represent the data.

To use a schema for data validation, the schema has to be converted into a schema representation suitable for validating data in the specific data format; for example, an XML Schema that is a GML application schema or a JSON Schema for GeoJSON or JSON-FG.

While the schema is a logical schema, a machine-readable representation is needed. Instead of specifying a custom schema language for geospatial data, this Standard uses JSON Schema as the schema language with

* extensions for additional aspects that are common in geospatial data; and
* recommendations for restricting the use of JSON Schema capabilities in order to simplify parsing a schema.

That is, JSON Schema is primarily used as a data description language.

The main reasons for using JSON Schema are:

* Web developers are often familiar with JSON Schema and JSON;
* JSON data types (string, number, boolean, array, object, null) are simple and easy to understand; and
* JSON is often used for encoding geospatial data, i.e., the schema of a property can be used to validate property values without conversion.

This Standard first specifies basic provisions for schemas that are applicable to any type of geospatial data. These provisions are not specific to features and as such could be moved to OGC API Common in the future.

Additional provisions are added for schemas for feature data including provisons for references to other features.

In OGC Web APIs, geospatial data is shared in collections (path `/collections/{collectionId}`). The schema of items in a collection provides information how to interact with the collection.

Examples of interactions, where information about the schema are required, include:

* An application that wants to fetch data often needs information about the properties included in the data to process, present or store the data properly ("returnable" properties or "Returnables").
* An application that wants to fetch data restricted to a subset of the available properties needs the list of the properties in the data (again, "returnable" properties or "Returnables").
* An application that wants to fetch a subset of the data needs information about the properties that can be used to filter the data ("queryable" properties or "Queryables").
* An application that wants to fetch data in a specific order needs information about the properties that can be used to sort the data ("sortable" properties or "Sortables").
* An application that wants to create or update data needs information about the required or acceptable properties of the data ("receivable" properties or "Receivables").

This Standard specifies three schema resources to support these interactions:

|Resource |Path |HTTP method |
| --- | --- |--- |
|Returnables and Receivables |`/collections/{collectionId}/schema` |GET |
|Queryables |`/collections/{collectionId}/queryables` |GET |
|Sortables |`/collections/{collectionId}/sortables` |GET |

Finally, the query parameter `profile` is specified to support requesting variations in the representation of data in the same feature format, depending on the intended use of the data.

Three profiles are specified how to encode a reference to another feature: by the `featureId` of the referenced feature, by its URI or as a web link.

## Implementations available for testing

- [ldproxy demonstration APIs](https://demo.ldproxy.net/)
141 changes: 141 additions & 0 deletions extensions/schemas/standard/23-058.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
:Title: OGC API - Features - Part 5: Schemas
:titletext: OGC API - Features - Part 5: Schemas
:standard: ogcapi-features-5
:m_n: 1.0
:m_n_o: {m_n}.0-SNAPSHOT
:doctype: book
:encoding: utf-8
:lang: en
:toc:
:toc-placement!:
:toclevels: 3
:sectnums:
:sectnumlevels: 4
:sectanchors:
:source-highlighter: pygments
:figure-id: 0
:table-id: 0
:req-id: 0
:rec-id: 0
:per-id: 0
:source-highlighter: pygments
:pygments-style: borland
:pygments-linenums-mode: table
:stem:

= {title}

<<<
[cols = ">",frame = "none",grid = "none"]
|===
|{set:cellbgcolor:#FFFFFF}
|[big]*Open Geospatial Consortium*
|Submission Date: <yyyy-mm-dd>
|Approval Date:  <yyyy-mm-dd>
|Publication Date:  <yyyy-mm-dd>
|External identifier of this OGC(R) document: http://www.opengis.net/doc/IS/{standard}/{m_n}
|Internal reference number of this OGC(R) document:    23-058
|Version: {m_n_o}
|Latest Published Draft: n/a
|Category: OGC(R) Implementation Specification
|Editors: Clemens Portele, Panagiotis (Peter) A. Vretanos
|===

[cols = "^", frame = "none"]
|===
|[big]*{titletext}*
|===

[cols = "^", frame = "none", grid = "none"]
|===
|*Copyright notice*
|Copyright (C) 2023 Open Geospatial Consortium
|To obtain additional rights of use, visit http://www.opengeospatial.org/legal/
|===

[cols = "^", frame = "none"]
|===
|*Warning*
|===

This document is not an OGC Standard. This document is distributed for review and comment. This document is subject to change without notice and may not be referred to as an OGC Standard.

Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.

[width = "50%", grid = "none"]
|===
|Document type:    OGC® Standard
|Document subtype:    Interface
|Document stage:    Draft
|Document language:  English
|===

<<<
License Agreement

[small]#Permission is hereby granted by the Open Geospatial Consortium, ("Licensor"), free of charge and subject to the terms set forth below, to any person obtaining a copy of this Intellectual Property and any associated documentation, to deal in the Intellectual Property without restriction (except as set forth below), including without limitation the rights to implement, use, copy, modify, merge, publish, distribute, and/or sublicense copies of the Intellectual Property, and to permit persons to whom the Intellectual Property is furnished to do so, provided that all copyright notices on the intellectual property are retained intact and that each person to whom the Intellectual Property is furnished agrees to the terms of this Agreement.#

[small]#If you modify the Intellectual Property, all copies of the modified Intellectual Property must include, in addition to the above copyright notice, a notice that the Intellectual Property includes modifications that have not been approved or adopted by LICENSOR.#

[small]#THIS LICENSE IS A COPYRIGHT LICENSE ONLY, AND DOES NOT CONVEY ANY RIGHTS UNDER ANY PATENTS THAT MAY BE IN FORCE ANYWHERE IN THE WORLD.#

[small]#THE INTELLECTUAL PROPERTY IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE DO NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE INTELLECTUAL PROPERTY WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION OF THE INTELLECTUAL PROPERTY WILL BE UNINTERRUPTED OR ERROR FREE. ANY USE OF THE INTELLECTUAL PROPERTY SHALL BE MADE ENTIRELY AT THE USER’S OWN RISK. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ANY CONTRIBUTOR OF INTELLECTUAL PROPERTY RIGHTS TO THE INTELLECTUAL PROPERTY BE LIABLE FOR ANY CLAIM, OR ANY DIRECT, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM ANY ALLEGED INFRINGEMENT OR ANY LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR UNDER ANY OTHER LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH THE IMPLEMENTATION, USE, COMMERCIALIZATION OR PERFORMANCE OF THIS INTELLECTUAL PROPERTY.#

[small]#This license is effective until terminated. You may terminate it at any time by destroying the Intellectual Property together with all copies in any form. The license will also terminate if you fail to comply with any term or condition of this Agreement. Except as provided in the following sentence, no such termination of this license shall require the termination of any third party end-user sublicense to the Intellectual Property which is in force as of the date of notice of such termination. In addition, should the Intellectual Property, or the operation of the Intellectual Property, infringe, or in LICENSOR's sole opinion be likely to infringe, any patent, copyright, trademark or other right of a third party, you agree that LICENSOR, in its sole discretion, may terminate this license without any compensation or liability to you, your licensees or any other party. You agree upon termination of any kind to destroy or cause to be destroyed the Intellectual Property together with all copies in any form, whether held by you or by any third party.#

[small]#Except as contained in this notice, the name of LICENSOR or of any other holder of a copyright in all or part of the Intellectual Property shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Intellectual Property without prior written authorization of LICENSOR or such copyright holder. LICENSOR is and shall at all times be the sole entity that may authorize you or any third party to use certification marks, trademarks or other special designations to indicate compliance with any LICENSOR standards or specifications. This Agreement is governed by the laws of the Commonwealth of Massachusetts. The application to this Agreement of the United Nations Convention on Contracts for the International Sale of Goods is hereby expressly excluded. In the event any provision of this Agreement shall be deemed unenforceable, void or invalid, such provision shall be modified so as to make it valid and enforceable, and as so modified the entire Agreement shall remain in full force and effect. No decision, action or inaction by LICENSOR shall be construed to be a waiver of any rights or remedies available to it.#

<<<
toc::[]

<<<

////
Make sure to complete each included document
////
include::clause_0_front_material.adoc[]

include::clause_1_scope.adoc[]

include::clause_2_conformance.adoc[]

include::clause_3_references.adoc[]

include::clause_4_terms_and_definitions.adoc[]

include::clause_5_conventions.adoc[]

include::clause_6_overview.adoc[]

include::clause_7_schemas.adoc[]

include::clause_8_core_roles_for_features.adoc[]

include::clause_9_feature_references.adoc[]

include::clause_10_returnables_and_receivables.adoc[]

include::clause_11_queryables.adoc[]

include::clause_12_sortables.adoc[]

include::clause_13_profile_parameter.adoc[]

include::clause_14_profile_references.adoc[]

include::clause_15_media_types.adoc[]

include::clause_16_security_considerations.adoc[]

<<<
include::annex_ats.adoc[]

<<<
////
Revision History should be the last annex before the Bibliography
Bibliography should be the last annex
////
include::annex_history.adoc[]

<<<
include::annex_bibliography.adoc[]
1 change: 1 addition & 0 deletions extensions/schemas/standard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This folder contains the text for part 5 of the OGC API Features standard.
6 changes: 6 additions & 0 deletions extensions/schemas/standard/annex_ats.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[ats]]
[appendix]
:appendix-caption: Annex
== Abstract Test Suite (Normative)

NOTE: Conformance classes and test cases for all requirements classes and requirements will be added once the requirements are stable.
16 changes: 16 additions & 0 deletions extensions/schemas/standard/annex_bibliography.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[appendix]
:appendix-caption: Annex
[[Bibliography]]
== Bibliography

[[link-relations]] Internet Assigned Numbers Authority (IANA). **Link Relation Types** [online, viewed 2023-10-14], Available at https://www.iana.org/assignments/link-relations/link-relations.xml

[[ogc-link-relations]] Open Geospatial Consortium (OGC). **OGC Link Relation Type Register** [online, viewed 2023-10-14], Available at http://www.opengis.net/def/rel

[[ogc-curies]] Open Geospatial Consortium (OGC). **OGC CURIE Register** [online, viewed 2023-10-14], Available at http://www.opengis.net/def/curie

[[OpenAPI]] OpenAPI Initiative (OAI). **OpenAPI Specification 3.0** [online, viewed 2023-10-14]. 2020. Available at http://spec.openapis.org/oas/v3.0.3

[[rfc6906]] Internet Engineering Task Force (IETF). RFC 6906: **The 'profile' Link Relation Type**. Edited by E. Wilde. 2013. Available at https://www.rfc-editor.org/rfc/rfc6906.html

[[rfc8288]] Internet Engineering Task Force (IETF). RFC 8288: **Web Linking**. Edited by M. Nottingham. 2017. Available at https://www.rfc-editor.org/rfc/rfc8288.html
9 changes: 9 additions & 0 deletions extensions/schemas/standard/annex_history.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[appendix]
:appendix-caption: Annex
== Revision History

[cols="12,18,12,12,46",options="header"]
|===
|Date |Release |Editor | Primary clauses modified |Description
|2023-10-22 |1.0.0-SNAPSHOT |C. Portele |all |initial version
|===
Loading

0 comments on commit 68ccec2

Please sign in to comment.