dev.sensorthings.observation

sensorthings.dev

{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "arrayResult": {
      "description": "Array of scaled integer values sharing the parent Datastream's resultScaleFactor. Used for wave spectra (energy at frequency bins), current profiles (speed at depth bins), and similar array-valued observations.",
      "properties": {
        "labels": {
          "description": "Optional labels identifying each element (e.g. frequency bin edges in Hz, depth bin centres in m). Must be same length as values if present.",
          "items": {
            "maxLength": 32,
            "type": "string"
          },
          "maxLength": 1024,
          "type": "array"
        },
        "values": {
          "description": "Ordered array of scaled integer values",
          "items": {
            "type": "integer"
          },
          "maxLength": 1024,
          "type": "array"
        }
      },
      "required": [
        "values"
      ],
      "type": "object"
    },
    "booleanResult": {
      "description": "True/false observation. Used for threshold exceedances, detection flags, binary sensor states.",
      "properties": {
        "value": {
          "type": "boolean"
        }
      },
      "required": [
        "value"
      ],
      "type": "object"
    },
    "categoryResult": {
      "description": "Categorical observation from a controlled vocabulary. Used for weather codes, flood alert levels, land cover classes, sea state.",
      "properties": {
        "value": {
          "description": "Code or label from the vocabulary",
          "maxLength": 256,
          "type": "string"
        },
        "vocabulary": {
          "description": "URI of the code list or vocabulary (e.g. https://codes.wmo.int/306/4677 for WMO present weather codes)",
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "value"
      ],
      "type": "object"
    },
    "geoPointResult": {
      "description": "Geographic position result for position-as-observation (e.g. GPS fix from a drifting buoy). Uses the same encoding as Thing.location.",
      "properties": {
        "altMm": {
          "description": "Altitude in mm above WGS84 ellipsoid",
          "type": "integer"
        },
        "latE7": {
          "maximum": 900000000,
          "minimum": -900000000,
          "type": "integer"
        },
        "lonE7": {
          "maximum": 1800000000,
          "minimum": -1800000000,
          "type": "integer"
        }
      },
      "required": [
        "latE7",
        "lonE7"
      ],
      "type": "object"
    },
    "main": {
      "description": "A single act of observation. The result type is determined by the $type discriminator on the result object.",
      "key": "any",
      "record": {
        "properties": {
          "datastream": {
            "description": "AT-URI of the parent Datastream",
            "format": "at-uri",
            "type": "string"
          },
          "derivedFrom": {
            "description": "AT-URIs of source observations or datastreams from which this observation was derived (e.g. tidal residual derived from observed and predicted level datastreams)",
            "items": {
              "format": "at-uri",
              "type": "string"
            },
            "maxLength": 16,
            "type": "array"
          },
          "featureOfInterest": {
            "description": "AT-URI of the feature being observed, if different from the Thing's location",
            "format": "at-uri",
            "type": "string"
          },
          "parameters": {
            "description": "Additional name-value pairs (e.g. depth, height above ground)",
            "type": "unknown"
          },
          "phenomenonTime": {
            "description": "Time the phenomenon was observed (ISO 8601). Start of interval if phenomenonTimeEnd is present.",
            "format": "datetime",
            "type": "string"
          },
          "phenomenonTimeEnd": {
            "description": "End of observation interval (ISO 8601). If absent, the observation is an instant. Used for aggregates (daily means), processing windows (wave burst statistics), and accumulations (hourly rainfall).",
            "format": "datetime",
            "type": "string"
          },
          "result": {
            "description": "The observation result. Type determined by $type discriminator.",
            "refs": [
              "#numericResult",
              "#categoryResult",
              "#booleanResult",
              "#arrayResult",
              "#geoPointResult"
            ],
            "type": "union"
          },
          "resultQuality": {
            "description": "Quality flag as a token reference",
            "knownValues": [
              "dev.sensorthings.quality#good",
              "dev.sensorthings.quality#suspect",
              "dev.sensorthings.quality#missing"
            ],
            "maxLength": 64,
            "type": "string"
          },
          "resultTime": {
            "description": "Time the result became available (if different from phenomenonTime)",
            "format": "datetime",
            "type": "string"
          }
        },
        "required": [
          "datastream",
          "result",
          "phenomenonTime"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "numericResult": {
      "description": "Scaled integer result. Real value = value × 10^(−resultScaleFactor). The common case for continuous measurements.",
      "properties": {
        "value": {
          "type": "integer"
        }
      },
      "required": [
        "value"
      ],
      "type": "object"
    }
  },
  "id": "dev.sensorthings.observation",
  "lexicon": 1
}

Validate Record

Validate a record against dev.sensorthings.observation

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:gqcmwsromoknyigx2afqcvqk
CID
bafyreiawpa4imnxrprvevjsxi7h5mcnyqku277izsxeq54ubqrlaezjljq
Indexed At
2026-03-27 18:59 UTC
AT-URI
at://did:plc:gqcmwsromoknyigx2afqcvqk/com.atproto.lexicon.schema/dev.sensorthings.observation

Version History (2 versions)

Similar Lexicons

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • A composite observation bundling multiple co-produced results from a single act of sensing. Each entry carries its own ObservedProperty, unit, and scale metadata. Use this instead of separate Observations when the resul…

  • Groups Observations of one ObservedProperty by one Sensor on one Thing. Carries all context needed to interpret observation results.

  • A batch of observations for a single Datastream, covering a contiguous time window. Trades individual addressability for reduced commit overhead.

  • The new or changed readings from one collector tick, for many Datastreams in the same repo. Created once and never updated. After the correction horizon has passed, the readings are sealed into dev.sensorthings.observat…

  • The real-world feature that an Observation is about.

Lexicon Garden

@