{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-weathercam-station-feature-collection-simple-v1-schema.json",
  "title": "WeathercamStationFeatureCollectionSimpleV1",
  "description": "Weathercam GeoJSON FeatureCollection object with basic information",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-weathercam-v1-api-openapi.yml#/components/schemas/WeathercamStationFeatureCollectionSimpleV1",
  "required": [
    "dataUpdatedTime",
    "features",
    "type"
  ],
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "GeoJSON Object Type"
    },
    "dataUpdatedTime": {
      "type": "string",
      "description": "Date time of the most recent metadata update",
      "format": "date-time"
    },
    "features": {
      "type": "array",
      "description": "GeoJSON Feature Objects",
      "items": {
        "$ref": "#/$defs/WeathercamStationFeatureSimpleV1"
      }
    }
  },
  "$defs": {
    "GeometryObject": {
      "required": [
        "coordinates",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "GeoJson Geometry Object type",
          "enum": [
            "Point",
            "LineString",
            "Polygon",
            "MultiPoint",
            "MultiLineString",
            "MultiPolygon"
          ]
        },
        "coordinates": {
          "type": "array",
          "description": "GeoJson Geometry Object coordinates",
          "items": {
            "type": "object",
            "description": "GeoJson Geometry Object coordinates"
          }
        }
      },
      "description": "GeoJson Geometry Object"
    },
    "Point": {
      "required": [
        "coordinates",
        "type"
      ],
      "type": "object",
      "description": "GeoJson Point Geometry Object",
      "allOf": [
        {
          "$ref": "#/$defs/GeometryObject"
        },
        {
          "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"
              }
            }
          }
        }
      ]
    },
    "WeathercamPresetSimpleV1": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of preset"
        },
        "inCollection": {
          "type": "boolean",
          "description": "Is preset in collection"
        }
      },
      "description": "Weathercam preset object with basic information"
    },
    "WeathercamStationFeatureSimpleV1": {
      "required": [
        "geometry",
        "id",
        "properties",
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "GeoJSON Object Type"
        },
        "id": {
          "type": "string",
          "description": "Id of the road station"
        },
        "geometry": {
          "$ref": "#/$defs/Point"
        },
        "properties": {
          "$ref": "#/$defs/WeathercamStationPropertiesSimpleV1"
        }
      },
      "description": "Weathercam station GeoJSON Feature object with basic information"
    },
    "WeathercamStationPropertiesSimpleV1": {
      "required": [
        "id"
      ],
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Id of the road station"
        },
        "name": {
          "type": "string",
          "description": "Common name of road station"
        },
        "collectionStatus": {
          "type": "string",
          "description": "Data collection status",
          "enum": [
            "GATHERING",
            "REMOVED_TEMPORARILY",
            "REMOVED_PERMANENTLY"
          ]
        },
        "state": {
          "type": "string",
          "description": "Road station state",
          "enum": [
            "OK",
            "OK_FAULT_DOUBT_CANCELLED",
            "FAULT_DOUBT",
            "FAULT_CONFIRMED",
            "FAULT_CONFIRMED_NOT_FIXED_IN_NEAR_FUTURE",
            "REPAIR_REQUEST_POSTED",
            "REPAIR_MAINTENANCE_DONE",
            "REPAIR_INTERRUPTED"
          ]
        },
        "dataUpdatedTime": {
          "type": "string",
          "description": "Date time of the most recent metadata update",
          "format": "date-time"
        },
        "presets": {
          "type": "array",
          "description": "Weathercam presets",
          "items": {
            "$ref": "#/$defs/WeathercamPresetSimpleV1"
          }
        }
      },
      "description": "Weathercam station properties object with basic information"
    }
  }
}