{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Realverse feature dataset",
  "type": "object",
  "required": [
    "name",
    "mode",
    "attribution",
    "license",
    "geojson"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "mode": {
      "enum": [
        "augment",
        "replace",
        "enrich"
      ]
    },
    "priority": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100
    },
    "crs": {
      "enum": [
        "EPSG:4326",
        "EPSG:4979"
      ]
    },
    "altitudeMode": {
      "enum": [
        "terrain",
        "absolute"
      ]
    },
    "attribution": {
      "type": "string",
      "minLength": 1,
      "maxLength": 600
    },
    "license": {
      "type": "string",
      "minLength": 1,
      "maxLength": 600
    },
    "revision": {
      "type": "string",
      "maxLength": 100
    },
    "verticalDatum": {
      "type": "string"
    },
    "horizontalAccuracyM": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "verticalAccuracyM": {
      "type": [
        "number",
        "null"
      ],
      "minimum": 0
    },
    "capturedAt": {
      "type": "string"
    },
    "fieldMap": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "geojson": {
      "type": "object",
      "required": [
        "type",
        "features"
      ],
      "properties": {
        "type": {
          "const": "FeatureCollection"
        },
        "features": {
          "type": "array",
          "minItems": 1,
          "maxItems": 5000,
          "items": {
            "type": "object",
            "required": [
              "type",
              "properties",
              "geometry"
            ],
            "properties": {
              "type": {
                "const": "Feature"
              },
              "id": {
                "type": [
                  "string",
                  "number"
                ]
              },
              "properties": {
                "type": "object"
              },
              "geometry": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "type": "object",
                    "required": [
                      "type",
                      "coordinates"
                    ],
                    "properties": {
                      "type": {
                        "enum": [
                          "Point",
                          "MultiPoint",
                          "LineString",
                          "MultiLineString",
                          "Polygon",
                          "MultiPolygon"
                        ]
                      },
                      "coordinates": {
                        "type": "array"
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      }
    }
  },
  "description": "Additional runtime validation checks coordinate dimensions, ring closure, finite values, declared height mode, feature IDs, 3.5 MB / 150,000-vertex limits and safe attribute keys."
}