{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "OIM Coastal Feature",
  "description": "OIM profile for features in the intertidal and coastal zone (the \"white ribbon\"). Extends GeoJSON Feature with domain classification, elevation with vertical datum, tidal context, data lineage with gap-fill documentation, and resolution metadata. Implements FMSDI Best Practices 1, 3, and 5.\n",
  "allOf": [
    {
      "$ref": "https://opengeospatial.github.io/bblocks/annotated-schemas/geo/features/feature/schema.json"
    },
    {
      "type": "object",
      "required": [
        "properties"
      ],
      "properties": {
        "properties": {
          "type": "object",
          "required": [
            "featureDomain",
            "dataLineage"
          ],
          "properties": {
            "featureDomain": {
              "type": "string",
              "enum": [
                "land",
                "intertidal",
                "marine"
              ],
              "description": "Domain classification of this feature following the \"white ribbon\" model (FMSDI 2024). \"land\" = permanently exposed above MHWS; \"intertidal\" = alternates between exposed (low tide) and submerged (high tide) \u2014 the white ribbon zone; \"marine\" = permanently submerged below LAT/CD. This discriminator is required for any downstream harmonization or conflict resolution.\n",
              "x-jsonld-id": "https://w3id.org/iliad/fmsdi/featureDomain"
            },
            "elevation": {
              "type": "object",
              "description": "Elevation or depth value with associated uncertainty and vertical datum. This field encodes the 4D nature of intertidal data (FMSDI BP1): a numerical value alone is meaningless without datum and orientation context. Required whenever a height/depth is recorded.\n",
              "required": [
                "value",
                "unit",
                "verticalDatum"
              ],
              "properties": {
                "value": {
                  "type": "number",
                  "description": "Elevation or depth value. Sign and direction are defined by verticalDatum.verticalOrientation: positive = higher (orientation=up) or deeper (orientation=down).\n",
                  "x-jsonld-id": "http://qudt.org/schema/qudt/value"
                },
                "unit": {
                  "type": "string",
                  "description": "Unit of measure. Use \"m\" (SI metres).",
                  "enum": [
                    "m"
                  ],
                  "x-jsonld-id": "http://qudt.org/schema/qudt/unit"
                },
                "uncertainty": {
                  "type": "number",
                  "minimum": 0,
                  "description": "1-sigma vertical uncertainty in the same unit as value. Include this to satisfy FMSDI BP2 (ISO 19115 data quality indicators) and to support IHO CATZOC classification.\n",
                  "x-jsonld-id": "http://vocab.nerc.ac.uk/collection/P01/current/UNCEJJ01/"
                },
                "verticalDatum": {
                  "description": "The vertical datum to which this value is referenced. Inline object conforming to the vertical-datum-reference building block.\n",
                  "type": "object",
                  "required": [
                    "datumName",
                    "verticalOrientation"
                  ],
                  "properties": {
                    "datumName": {
                      "type": "string",
                      "x-jsonld-id": "http://www.w3.org/2000/01/rdf-schema#label"
                    },
                    "datumEpoch": {
                      "type": "string",
                      "x-jsonld-id": "https://w3id.org/iliad/fmsdi/datumEpoch"
                    },
                    "crsIdentifier": {
                      "type": "string",
                      "format": "uri",
                      "x-jsonld-id": "http://purl.org/dc/terms/conformsTo",
                      "x-jsonld-type": "@id"
                    },
                    "separationSurface": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "enum": [
                            "geoid",
                            "tidal",
                            "ellipsoidal",
                            "chart"
                          ]
                        },
                        "modelReference": {
                          "type": "string",
                          "x-jsonld-id": "https://w3id.org/iliad/fmsdi/modelReference"
                        }
                      },
                      "x-jsonld-id": "https://w3id.org/iliad/fmsdi/separationSurface"
                    },
                    "transformationMethod": {
                      "type": "string",
                      "x-jsonld-id": "http://www.w3.org/ns/prov#wasGeneratedBy"
                    },
                    "verticalOrientation": {
                      "type": "string",
                      "enum": [
                        "up",
                        "down"
                      ],
                      "x-jsonld-id": "https://w3id.org/iliad/fmsdi/verticalOrientation"
                    },
                    "verticalAccuracy": {
                      "type": "object",
                      "required": [
                        "value",
                        "unit"
                      ],
                      "properties": {
                        "value": {
                          "type": "number",
                          "minimum": 0,
                          "x-jsonld-id": "http://qudt.org/schema/qudt/value"
                        },
                        "unit": {
                          "type": "string",
                          "x-jsonld-id": "http://qudt.org/schema/qudt/unit"
                        },
                        "confidenceLevel": {
                          "type": "string",
                          "x-jsonld-id": "https://w3id.org/iliad/fmsdi/confidenceLevel"
                        }
                      },
                      "x-jsonld-id": "http://vocab.nerc.ac.uk/collection/P01/current/UNCEJJ01/"
                    }
                  },
                  "x-jsonld-id": "https://w3id.org/iliad/fmsdi/verticalDatum"
                }
              },
              "x-jsonld-id": "https://w3id.org/iliad/fmsdi/elevation"
            },
            "tideContext": {
              "type": "object",
              "description": "Tidal state at the time of observation or capture. Provides the 4D temporal-tidal context required for correct interpretation of intertidal features (FMSDI: \"Elevation, time, and uncertainty are critical dimensions\").\n",
              "properties": {
                "waterLevel": {
                  "type": "number",
                  "description": "Water level at the time of observation in metres, relative to the datum specified in elevation.verticalDatum.\n",
                  "x-jsonld-id": "http://vocab.nerc.ac.uk/collection/P01/current/ASLVZZ01/"
                },
                "tidalState": {
                  "type": "string",
                  "enum": [
                    "highWater",
                    "lowWater",
                    "midTide",
                    "meanHighWaterSprings",
                    "chartDatum",
                    "lowestAstronomicalTide"
                  ],
                  "description": "Qualitative tidal state at time of observation. \"chartDatum\" and \"lowestAstronomicalTide\" indicate the water level is at or near the respective datum surface.\n",
                  "x-jsonld-id": "http://vocab.nerc.ac.uk/collection/P02/current/TGRD/"
                },
                "tideGaugeRef": {
                  "type": "string",
                  "format": "uri",
                  "description": "URI identifying the tide gauge station used for water level attribution. Reference to BODC, NOAA CO-OPS, or national network station identifier.\n",
                  "x-jsonld-id": "http://vocab.nerc.ac.uk/collection/S13/current/",
                  "x-jsonld-type": "@id"
                }
              },
              "x-jsonld-id": "https://w3id.org/iliad/fmsdi/tideContext"
            },
            "dataLineage": {
              "type": "object",
              "description": "Data lineage, capture methodology, and gap-fill documentation. Required for all features. Implements FMSDI BP2 (FAIR \u2014 ISO 19115 lineage), BP3 (Mind the Gap \u2014 document all interpolation assumptions).\n",
              "required": [
                "captureMethod",
                "sourceDataset",
                "captureDate",
                "gapFilled",
                "confidenceLevel"
              ],
              "properties": {
                "captureMethod": {
                  "type": "string",
                  "enum": [
                    "lidar",
                    "bathySonar",
                    "topoBathySurvey",
                    "opticalSatellite",
                    "SAR",
                    "UAV",
                    "interpolated",
                    "modelled"
                  ],
                  "description": "Primary data capture method. \"interpolated\" and \"modelled\" indicate derived rather than directly observed data. Use \"topoBathySurvey\" for simultaneous topo-bathymetric systems (airborne topo-bathy LiDAR).\n",
                  "x-jsonld-id": "http://vocab.nerc.ac.uk/collection/L05/current/"
                },
                "sourceDataset": {
                  "type": "string",
                  "description": "Name, URI, or DOI of the source dataset. For FMSDI BP2 compliance, prefer a persistent URI from a federated catalog (OGC API Records, GeoDCAT-AP endpoint).\n",
                  "x-jsonld-id": "http://www.w3.org/ns/prov#wasDerivedFrom",
                  "x-jsonld-type": "@id"
                },
                "captureDate": {
                  "type": "string",
                  "format": "date-time",
                  "description": "ISO 8601 date-time of data capture or, for modelled/derived products, the reference date of the source data.\n",
                  "x-jsonld-id": "http://purl.org/dc/terms/created",
                  "x-jsonld-type": "http://www.w3.org/2001/XMLSchema#dateTime"
                },
                "gapFilled": {
                  "type": "boolean",
                  "description": "True if this feature represents a data void that has been filled using interpolation or modelling (FMSDI BP3: Mind the Gap). When true, interpolationMethod is required.\n",
                  "x-jsonld-id": "https://w3id.org/iliad/fmsdi/gapFilled",
                  "x-jsonld-type": "http://www.w3.org/2001/XMLSchema#boolean"
                },
                "interpolationMethod": {
                  "type": "string",
                  "description": "Interpolation or modelling method applied to fill the data void. Required when gapFilled=true. Omitting this field when gapFilled=true is a validation error. FMSDI BP3: document all assumptions introduced by interpolation \u2014 interpolation is a last resort and risk of misrepresenting morphology must be acknowledged.\n",
                  "examples": [
                    "TIN",
                    "cubicSpline",
                    "kriging",
                    "IDW",
                    "bilinear"
                  ],
                  "x-jsonld-id": "https://w3id.org/iliad/fmsdi/interpolationMethod"
                },
                "confidenceLevel": {
                  "type": "string",
                  "enum": [
                    "high",
                    "medium",
                    "low",
                    "estimated"
                  ],
                  "description": "Qualitative confidence in this feature's accuracy. \"estimated\" should be used for gap-filled features where the interpolation method introduces significant assumptions about morphology.\n",
                  "x-jsonld-id": "https://w3id.org/iliad/fmsdi/confidenceLevel"
                }
              },
              "x-jsonld-id": "http://www.w3.org/ns/prov#wasDerivedFrom"
            },
            "resolutionInfo": {
              "type": "object",
              "description": "Spatial resolution metadata supporting FMSDI BP5 (Scalable Resolution Management). Records original capture resolution and optional DGGS cell reference for scalable multi-resolution integration.\n",
              "properties": {
                "horizontalResolution": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Ground sample distance or nominal resolution in metres. Do not conflate with accuracy; high-resolution data can still have poor accuracy.\n",
                  "x-jsonld-id": "https://w3id.org/iliad/fmsdi/horizontalResolution"
                },
                "verticalResolution": {
                  "type": "number",
                  "minimum": 0,
                  "description": "Vertical resolution or contour interval in metres.",
                  "x-jsonld-id": "https://w3id.org/iliad/fmsdi/verticalResolution"
                },
                "dggsCellRef": {
                  "type": "string",
                  "description": "DGGS cell identifier for this feature location, enabling scalable multi-resolution integration without rasterization (FMSDI BP5, Pangaea DGGS demonstrator). Supported systems include H3, ISEA4T, rHEALPix. Record the system name as a prefix, e.g. \"H3:8928308280fffff\".\n",
                  "x-jsonld-id": "https://www.opengis.net/doc/AS/dggs/2.0#zoneIdentifier"
                }
              },
              "x-jsonld-id": "https://w3id.org/iliad/fmsdi/resolutionInfo"
            }
          },
          "if": {
            "properties": {
              "gapFilled": {
                "const": true
              }
            },
            "required": [
              "gapFilled"
            ]
          },
          "then": {
            "required": [
              "interpolationMethod"
            ]
          }
        }
      }
    }
  ],
  "x-jsonld-prefixes": {
    "fmsdi": "https://w3id.org/iliad/fmsdi/",
    "qudt": "http://qudt.org/schema/qudt/",
    "rdfs": "http://www.w3.org/2000/01/rdf-schema#",
    "dct": "http://purl.org/dc/terms/",
    "prov": "http://www.w3.org/ns/prov#",
    "xsd": "http://www.w3.org/2001/XMLSchema#",
    "sdo": "https://schema.org/",
    "geosparql": "http://www.opengis.net/ont/geosparql#",
    "nerc": "http://vocab.nerc.ac.uk/collection/",
    "iliad": "https://w3id.org/iliad/property/"
  }
}