{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-sse-feature-collection-v1-schema.json",
  "title": "SseFeatureCollectionV1",
  "description": "GeoJSON FeatureCollection object of sea state estimate (SSE)",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-sse-v1-api-openapi.yml#/components/schemas/SseFeatureCollectionV1",
  "required": [
    "dataUpdatedTime",
    "features"
  ],
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "GeoJSON object type"
    },
    "dataUpdatedTime": {
      "type": "string",
      "description": "Data last updated time",
      "format": "date-time"
    },
    "features": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SseFeatureV1"
      }
    },
    "additionalProperties": {
      "type": "object",
      "additionalProperties": {
        "type": "object"
      }
    }
  },
  "$defs": {
    "Point": {
      "required": [
        "coordinates",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Point"
          ]
        },
        "coordinates": {
          "type": "array",
          "description": "An array of coordinates. Coordinates are in WGS84 format in decimal degrees: [LONGITUDE, LATITUDE, {ALTITUDE}]. Altitude is optional and measured in meters.",
          "items": {
            "type": "number",
            "description": "An array of coordinates. Coordinates are in WGS84 format in decimal degrees: [LONGITUDE, LATITUDE, {ALTITUDE}]. Altitude is optional and measured in meters.",
            "format": "double"
          }
        },
        "additionalProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        }
      },
      "description": "GeoJSON Point Geometry object"
    },
    "SseFeatureV1": {
      "required": [
        "geometry",
        "properties"
      ],
      "type": "object",
      "properties": {
        "siteNumber": {
          "type": "integer",
          "description": "Identifier of the site",
          "format": "int32"
        },
        "type": {
          "type": "string",
          "description": "GeoJSON object type"
        },
        "geometry": {
          "$ref": "#/$defs/Point"
        },
        "properties": {
          "$ref": "#/$defs/SsePropertiesV1"
        },
        "additionalProperties": {
          "type": "object",
          "additionalProperties": {
            "type": "object"
          }
        }
      },
      "description": "GeoJSON Feature object of sea state estimate (SSE)"
    },
    "SsePropertiesV1": {
      "required": [
        "confidence",
        "lastUpdate",
        "siteName",
        "siteType"
      ],
      "type": "object",
      "properties": {
        "siteNumber": {
          "type": "integer",
          "description": "Identifier of the site",
          "format": "int32"
        },
        "siteName": {
          "type": "string",
          "description": "Site name of the buoy"
        },
        "siteType": {
          "type": "string",
          "description": "Type of the site. FLOATING is floating in the water and FIXED it is standing on the ground.",
          "enum": [
            "FIXED",
            "FLOATING"
          ]
        },
        "lastUpdate": {
          "type": "string",
          "description": "Data last updated timestamp in ISO 8601 format with time offsets from UTC (eg. 2016-04-20T12:38:16.328+03:00 or 2018-11-09T09:41:09Z)",
          "format": "date-time"
        },
        "seaState": {
          "type": "string",
          "description": "Sea state. If seaState is CALM, the windWaveDir is not reliable. This field is available only for FLOATING siteType",
          "enum": [
            "CALM",
            "LIGHT",
            "MODERATE",
            "BREEZE",
            "GALE",
            "STORM"
          ]
        },
        "trend": {
          "type": "string",
          "description": "Trend of condition change. This field is available only for FLOATING siteType",
          "enum": [
            "UNKNOWN",
            "NO_CHANGE",
            "ASCENDING",
            "DESCENDING"
          ]
        },
        "windWaveDir": {
          "type": "integer",
          "description": "Wind and wave direction in degrees from north. If seaState is CALM, the windWaveDir is not reliable. This field is available only for FLOATING siteType",
          "format": "int32",
          "enum": [
            null
          ]
        },
        "confidence": {
          "type": "string",
          "description": "Provides information on estimated confidence of mainly the directional information based on the Horizontal Dilution of precision (HDOP) figure obtained from the GPS receiver:\n* POOR: More than 10\n* MODERATE: 2-10\n* GOOD: Less than 2",
          "enum": [
            "POOR",
            "MODERATE",
            "GOOD"
          ]
        },
        "heelAngle": {
          "type": "number",
          "description": "Heel angle of the buoy in degrees (°), 0 is upright and it´s unsigned. This field is available only for FLOATING siteType",
          "enum": [
            null
          ]
        },
        "lightStatus": {
          "type": "string",
          "description": "Status of the flashlight. Normally ON at nighttime and OFF at daytime. ON_D means that light characteristics are alternated (ie. intensity and frequency) compared to normal ON operation, used normally on daytime.",
          "enum": [
            "ON",
            "OFF",
            "ON_D"
          ]
        },
        "temperature": {
          "type": "integer",
          "description": "Temperature of the air in celsius degree (°C). Since the sensor is inside of the buoy and sunlight can heat up the enclosure this can be used only as a reference measurement as it can show higher readings than the actual air temperature",
          "format": "int32"
        }
      },
      "description": "GeoJSON Properties object of sea state estimate (SSE)"
    }
  }
}