type: object
required:
  - id
  - links
properties:
  id:
    type: string
    description: identifier of the collection used, for example, in URIs
    example: dem
  title:
    type: string
    description: human readable title of the collection
    example: Digital Elevation Model
  description:
    type: string
    description: a description of the data in the collection
    example: A Digital Elevation Model.
  attribution:
    type: string
    title: Attribution for the collection
    description: |-
     Attribution for the collection that can contain markup text whose format may be indicated in the `attributionMediaType` property. That format can be either plain text (`text/plain`), HTML (`text/html`) or https://commonmark.org/[CommonMark] (`text/markdown`).
     If the 'attributionMediaType' indicates something other than `text/plain`, the `attribution` element string should be interpreted by a markup parser selected based on that media type to be presented to the user
     (e.g., `text/markdown` will be parsed by a library supporting CommonMark). By allowing markup, the attribution string can import images (e.g., organization logos) and format the text (e.g., the name of the organization in italics).
  attributionMediaType:
    title: Media type of the attribution
    description: |-
     Media type for the markup language of the attribution: It can be either plain text (`text/plain`), HTML (`text/html`) or https://commonmark.org/[CommonMark] (`text/markdown`).
    enum:
    - text/plain
    - text/html
    - text/markdown
  accessConstraints:
    description: |-
       Restrictions on the availability of the collection that the user needs to be aware of before using or redistributing the data:

       * unclassified: Available for general disclosure
       * restricted: Not for general disclosure
       * confidential: Available for someone who can be entrusted with information
       * secret: Kept or meant to be kept private, unknown, or hidden from all but a select group of people
       * topSecret: Of the highest secrecy
    enum:
    - unclassified
    - restricted
    - confidential
    - secret
    - topSecret
  publisher:
    type: string
    description: Organization or individual responsible for making the data available
  contacts:
    type: array
    description:
      A list of contacts qualified by their role(s) in association to the collection.
    minItems: 1
    items:
      $ref: '../records-core/contact.yaml'
  license:
    type: string
    description: The legal provisions under which the data of this collection is made available.
  rights:
    type: string
    description: A statement that concerns all rights not addressed by the license such as a copyright statement.
  formats:
    description: A list of formats in which the data of this collection is distributed
    type: array
    items:
      $ref: '../records-core/format.yaml'
  keywords:
    type: array
    description: The topic or topics of the resource. Typically represented using free-form keywords, tags, key phrases, or classification codes.
    items:
      type: string
  themes:
    type: array
    description:
      A knowledge organization system used to classify the resource.
    minItems: 1
    items:
      $ref: '../records-core/theme.yaml'
  resourceLanguages:
    type: array
    description: The list of languages in which the data of this collection is available.
    items:
      $ref: '../records-core/language.yaml'
  links:
    type: array
    example:
      - href: http://data.example.org/collections/dem?f=json
        rel: self
        type: application/json
        title: Digital Elevation Model
      - href: http://data.example.org/collections/dem?f=html
        rel: alternate
        type: application/json
        title: Digital Elevation Model
      - href: http://data.example.org/collections/dem/coverage
        rel: coverage
        type: image/tiff; application=geotiff
        title: Digital Elevation Model
      - href: http://data.example.org/collections/dem/coverage/domainset
        rel: domainset
        type: application/json
        title: Digital Elevation Model
      - href: http://data.example.org/collections/dem/coverage/rangetype
        rel: rangetype
        type: application/json
        title: Digital Elevation Model
      - href: http://data.example.org/collections/dem/coverage/metadata
        rel: metadata
        type: application/json
        title: Digital Elevation Model
    items:
      $ref: '../common-core/link.yaml'
  itemType:
    description: indicator about the type of the items in the collection if the collection has an accessible /collections/{collectionId}/items endpoint
    type: string
    default: feature
  dataType:
    allOf:
      - description: Type of data represented in the collection
      - $ref: '../../schemas/common-geodata/dataType.yaml'
  geoDataClasses:
     description: URIs identifying a class of data contained in the geospatial data (useful for example to determine compatibility with styles or processes)
     type: array
     items:
       type: string
       format: uri
  defaultFields:
    title: List of fields returned by default
    description: List of fields which are returned by default when a client does not explicitly select which fields to return. For features, fields are the properties that complement the geometry, and for a gridded coverage, fields are the values associated with cells.
    type: array
    items:
       type: string
       minItems: 1
  crs:
    description: the list of coordinate reference systems supported by the API; the first item is the default coordinate reference system
    type: array
    items:
      type: string
    default:
      - http://www.opengis.net/def/crs/OGC/1.3/CRS84
    example:
      - http://www.opengis.net/def/crs/OGC/1.3/CRS84
      - http://www.opengis.net/def/crs/EPSG/0/4326
  storageCrs:
    description: the native coordinate reference system (i.e., the most efficient CRS in which to request the data, possibly how the data is stored on the server); this is the default output coordinate reference system for Maps and Coverages
    type: string
    default: http://www.opengis.net/def/crs/OGC/1.3/CRS84
    example: http://www.opengis.net/def/crs/OGC/1.3/CRS84
  epoch:
    description: Epoch of the native (storage) Coordinate Reference System (CRS)
    type: number
    example: 2021.33
  geometryDimension:
    title: Number of spatial dimensions of the primary geometry for the data
    description: 'Number of spatial dimensions of the primary geometry of individual elements of the data: 0 for points, 1 for curves, 2 for surfaces, 3 for solids and unspecified when mixed or unknown. Not to be confused with the dimensions of the domain which are defined by the extent element.'
    type: integer
    minimum: 0
    maximum: 3
  minScaleDenominator:
    description: Minimum scale denominator for usage of the collection
    type: number
  maxScaleDenominator:
    description: Maximum scale denominator for usage of the collection
    type: number
  minCellSize:
    description: Minimum cell size for usage of the collection
    type: number
  maxCellSize:
    description: Maximum cell size for usage of the collection
    type: number
  created:
    allOf:
      - description: Timestamp indicating when the collection was first produced
      - $ref: 'timeStamp.yaml'
  updated:
    allOf:
      - description: Timestamp of the last change/revision to the collection
      - $ref: 'timeStamp.yaml'
  extent:
    $ref: 'extent.yaml'
