{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Survey Dataset",
  "description": "A geometric survey dataset (point cloud, photogrammetric model, etc.) acquired from a heritage asset. Profiles ogc.heritage.digital-representation-feature (CRMdig D1 / E73 Information Object over PROV-O Entity, wrapped as a GeoJSON/JSON-FG Feature or topo-feature) and adds a CRMdig D7 acquisition event sub-object. `properties.choType` is pinned to `\"SurveyDataset\"`. Coverage is either the top-level embedded `geometry` (mandatory unless `topology` is used instead) or a `topology` reference into geometry already recorded elsewhere (e.g. the surveyed space's own footprint).",
  "allOf": [
    {
      "$ref": "https://ogcincubator.github.io/bblocks-heritage/build/annotated/heritage/digital-representation-feature/schema.json"
    },
    {
      "anyOf": [
        {
          "required": [
            "topology"
          ]
        },
        {
          "required": [
            "geometry"
          ],
          "properties": {
            "geometry": {
              "type": "object",
              "required": [
                "type",
                "coordinates"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "Point",
                    "LineString",
                    "Polygon",
                    "MultiPoint",
                    "MultiLineString",
                    "MultiPolygon",
                    "GeometryCollection"
                  ]
                }
              }
            }
          }
        }
      ]
    },
    {
      "type": "object",
      "properties": {
        "properties": {
          "type": "object",
          "required": [
            "choType",
            "title",
            "acquisitionEvent"
          ],
          "properties": {
            "choType": {
              "const": "SurveyDataset",
              "description": "CRMdig class discriminator for this record (maps to crmdig:D1_Digital_Object via a second alias to @type, alongside the fixed GeoJSON `type: \"Feature\"`).",
              "x-jsonld-id": "@type"
            },
            "hdtoType": {
              "const": "hdto:HC5_Digital_Representation",
              "description": "Pins the inherited hdtoType (from digital-representation, otherwise an enum of HC5/HC7/HC8) to HC5. D7.1's HC5-8 table lists \"HC6 Sensor Data\" as a possible anchor for sensor-derived survey datasets specifically, but this block covers both sensor- and non-sensor-derived acquisitions \u2014 HC5 (\u2292 HC6) is used as the safe, always-correct co-type until real pilot data shows which instances are actually sensor-derived and worth narrowing to HC6."
            },
            "title": {
              "type": "string",
              "description": "Human-readable title of the dataset (dct:title).",
              "x-jsonld-id": "http://purl.org/dc/terms/title"
            },
            "acquisitionEvent": {
              "type": "object",
              "description": "CRMdig D7 Digital Machine Event recording the survey acquisition: the method, equipment, operator, date and spatial/quality parameters.",
              "required": [
                "acquisitionMethod",
                "acquisitionDate"
              ],
              "properties": {
                "acquisitionMethod": {
                  "type": "string",
                  "description": "Acquisition technique label or controlled-vocabulary URI (e.g. \"TLS\", \"UAV-photogrammetry\", \"SLAM\", \"structured-light\", \"terrestrial-photogrammetry\")."
                },
                "acquisitionDate": {
                  "type": "string",
                  "format": "date",
                  "description": "Date (ISO 8601) on which the survey data was collected."
                },
                "operator": {
                  "type": "string",
                  "format": "uri",
                  "description": "URI of the person or organisation who carried out the survey."
                },
                "equipment": {
                  "type": "string",
                  "description": "Make and model of the primary acquisition instrument."
                },
                "crs": {
                  "type": "string",
                  "format": "uri",
                  "description": "EPSG URI for the coordinate reference system of the output data (e.g. https://www.opengis.net/def/crs/EPSG/0/32632)."
                },
                "density": {
                  "type": "string",
                  "description": "Point density or ground sampling distance (e.g. \"~3500 pts/m\u00b2\", \"3 cm/pixel GSD\")."
                },
                "accuracy": {
                  "type": "string",
                  "description": "Stated absolute or relative accuracy of the dataset (e.g. \"\u00b13 mm\")."
                },
                "processingHistory": {
                  "type": "string",
                  "description": "Software and processing steps applied before delivery (registration, noise filtering, etc.)."
                }
              },
              "x-jsonld-id": "http://www.cidoc-crm.org/extensions/crmdig/L11i_was_output_of",
              "x-jsonld-type": "@json"
            },
            "limitations": {
              "type": "string",
              "description": "Known limitations, coverage gaps or quality caveats of the dataset.",
              "x-jsonld-id": "http://purl.org/dc/terms/description"
            },
            "reviewStatus": {
              "type": "string",
              "description": "Workflow status of this record (e.g. draft, reviewed, approved)."
            }
          }
        }
      }
    }
  ],
  "x-jsonld-extra-terms": {
    "SurveyDataset": "http://www.cidoc-crm.org/extensions/crmdig/D1_Digital_Object"
  },
  "x-jsonld-prefixes": {
    "crmdig": "http://www.cidoc-crm.org/extensions/crmdig/",
    "dct": "http://purl.org/dc/terms/"
  }
}