{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.2/project/site.schema.json",
  "$comment": "OpenEik 0.2: folded by tools/fold-schemas.mjs from the proposal site, which 0.2 makes a rule (decision D5). Written by hand from the text, not generated.",
  "title": "A project's site",
  "description": "Where the project stands and which way north is (Part II, 2 and 2.2): true north, in degrees clockwise from the plan's +Y, alone or with the site's location, its latitude, longitude and IANA time zone, which are given together; and, with the location, the coordinate reference systems the plan is placed in on a map and its heights given in. The latitude and the longitude name the plan's origin at the project's zero.",
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "minimum": -90,
      "maximum": 90
    },
    "longitude": {
      "type": "number",
      "minimum": -180,
      "maximum": 180
    },
    "trueNorth": {
      "type": "number",
      "minimum": -360,
      "maximum": 360
    },
    "timeZone": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "crs": {
      "description": "The coordinate reference systems of the site (Part II, 2.2, rules 3 and 4), each by its code in the EPSG registry: horizontal, the projected system a bridge projects the latitude and the longitude into; vertical, the system elevationOffset is a height in. Given only with the latitude and the longitude.",
      "type": "object",
      "properties": {
        "horizontal": {
          "$ref": "#/$defs/epsg"
        },
        "vertical": {
          "$ref": "#/$defs/epsg"
        }
      },
      "required": [
        "horizontal"
      ],
      "x-eik-closed": true
    }
  },
  "required": [
    "trueNorth"
  ],
  "dependentRequired": {
    "latitude": [
      "longitude",
      "timeZone"
    ],
    "longitude": [
      "latitude",
      "timeZone"
    ],
    "timeZone": [
      "latitude",
      "longitude"
    ],
    "crs": [
      "latitude",
      "longitude"
    ]
  },
  "x-eik-closed": true,
  "$defs": {
    "epsg": {
      "description": "A coordinate reference system's code in the EPSG registry: EPSG: and its number, without a leading zero (EPSG:3006, SWEREF 99 TM; EPSG:5613, RH2000 height). OpenEik lists no systems.",
      "type": "string",
      "pattern": "^EPSG:[1-9][0-9]{0,8}$"
    }
  }
}
