Skip to content

Instantly share code, notes, and snippets.

@ialarmedalien
Created December 4, 2024 18:00
Show Gist options
  • Save ialarmedalien/7c8e6b492741b2bfe6ed35049d38ca72 to your computer and use it in GitHub Desktop.
Save ialarmedalien/7c8e6b492741b2bfe6ed35049d38ca72 to your computer and use it in GitHub Desktop.
basin 3D JSONschema
{
"$defs": {
"AbsoluteCoordinate": {
"additionalProperties": false,
"description": "Absolute coordinate describes the geo-referenced location of a feature.\nCoordinates match the feature's shape. For example, a curve is a list of points.\nCurrently collections of discrete points describing a feature are supported.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"horizontal_position": {
"description": "list of GeographicCoordinates",
"items": {
"$ref": "#/$defs/GeographicCoordinate"
},
"type": [
"array",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"vertical_extent": {
"description": "list of AltitudeCoordinates",
"items": {
"$ref": "#/$defs/AltitudeCoordinate"
},
"type": [
"array",
"null"
]
}
},
"title": "AbsoluteCoordinate",
"type": "object"
},
"AggregationAttribute": {
"additionalProperties": false,
"description": "Aggregation.",
"properties": {
"attr_mapping": {
"anyOf": [
{
"$ref": "#/$defs/AttributeMapping"
},
{
"type": "null"
}
],
"description": "AttributeMapping as described in the datasource's (i.e., plugin's mapping file)."
},
"attr_type": {
"$ref": "#/$defs/AggregationDurationEnum",
"description": "Duration of aggregation."
}
},
"title": "AggregationAttribute",
"type": "object"
},
"AggregationDurationEnum": {
"description": "Aggregation Duration enums",
"enum": [
"DAY",
"HOUR",
"MINUTE",
"MONTH",
"NONE",
"SECOND",
"YEAR"
],
"title": "AggregationDurationEnum",
"type": "string"
},
"AltitudeCoordinate": {
"additionalProperties": false,
"description": "An altitudinal vertical position (i.e., distance from sea level).\nThe reference frame or system is specified. The term \"altitude\" is used instead of the common term \"elevation\" to conform to the terminology in Federal Information Processing Standards 70-1 and 173.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"datum": {
"$ref": "#/$defs/AltitudeCoordinateEnum",
"description": "The reference coordinate system."
},
"distance_units": {
"$ref": "#/$defs/DistanceUnitEnum",
"description": "The unit of distance."
},
"encoding_method": {
"$ref": "#/$defs/EncodingMethodEnum",
"description": "The method for encoding the units of distance."
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"resolution": {
"description": "The minimum distance possible between two adjacent depth values, expressed in Distance Units used for Depth",
"type": [
"number",
"null"
]
},
"type": {
"$ref": "#/$defs/VerticalCoordinateTypeEnum",
"description": "The type of vertical position:`TYPE_ALTITUDE` or `TYPE_DEPTH`"
},
"value": {
"description": "The vertical position value",
"type": [
"number",
"null"
]
}
},
"title": "AltitudeCoordinate",
"type": "object"
},
"AltitudeCoordinateEnum": {
"description": "The reference coordinate system to specify an altitudinal vertical position (i.e., distance from sea level).",
"enum": [
"DATUM_NAVD88",
"DATUM_NGVD29"
],
"title": "AltitudeCoordinateEnum",
"type": "string"
},
"AttributeMapping": {
"additionalProperties": false,
"description": "A data class for attribute mappings between datasource vocabularies and BASIN-3D vocabularies.\nThese are the associations defined in the datasource (i.e., plugin) mapping file.",
"properties": {
"attr_type": {
"description": "Attribute Type; e.g., STATISTIC, RESULT_QUALITY, OBSERVED_PROPERTY; separate compound mappings with ':'",
"items": {
"$ref": "#/$defs/MappedAttributeEnum"
},
"type": [
"array",
"null"
]
},
"basin3d_desc": {
"description": "The BASIN-3D vocabulary descriptions; objects or enum",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"basin3d_vocab": {
"description": "The BASIN-3D vocabulary; separate compound mappings with ':'",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"datasource": {
"anyOf": [
{
"$ref": "#/$defs/DataSource"
},
{
"type": "null"
}
],
"description": "The datasource of the mapping"
},
"datasource_desc": {
"description": "The datasource vocabulary description",
"type": [
"string",
"null"
]
},
"datasource_vocab": {
"description": "The datasource vocabulary",
"type": [
"string",
"null"
]
}
},
"title": "AttributeMapping",
"type": "object"
},
"Base": {
"additionalProperties": false,
"description": "Base synthesis model class.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
}
},
"title": "Base",
"type": "object"
},
"Coordinate": {
"additionalProperties": false,
"description": "Top level coordinate class that holds `AbsoluteCoordinate` or `RepresentativeCoordinate`",
"properties": {
"absolute": {
"anyOf": [
{
"$ref": "#/$defs/AbsoluteCoordinate"
},
{
"type": "null"
}
],
"description": "Absolute coordinate"
},
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"representative": {
"anyOf": [
{
"$ref": "#/$defs/RepresentativeCoordinate"
},
{
"type": "null"
}
],
"description": "Representative coordinate"
}
},
"title": "Coordinate",
"type": "object"
},
"DataSource": {
"additionalProperties": false,
"description": "Source for data.",
"properties": {
"credentials": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"id_prefix": {
"description": "Prefix added to all data source IDs",
"type": [
"string",
"null"
]
},
"location": {
"type": [
"string",
"null"
]
},
"name": {
"type": [
"string",
"null"
]
}
},
"title": "DataSource",
"type": "object"
},
"DepthCoordinate": {
"additionalProperties": false,
"description": "A depth vertical position (i.e., the height or depth from the specified reference position).\nThe reference frame or system is specified.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"datum": {
"$ref": "#/$defs/DepthCoordinateEnum",
"description": "The reference coordinate system."
},
"distance_units": {
"$ref": "#/$defs/DistanceUnitEnum",
"description": "The unit of distance."
},
"encoding_method": {
"$ref": "#/$defs/EncodingMethodEnum",
"description": "The method for encoding the units of distance."
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"resolution": {
"description": "The minimum distance possible between two adjacent depth values, expressed in Distance Units used for Depth",
"type": [
"number",
"null"
]
},
"type": {
"$ref": "#/$defs/VerticalCoordinateTypeEnum",
"description": "The type of vertical position:`TYPE_ALTITUDE` or `TYPE_DEPTH`"
},
"value": {
"description": "The vertical position value",
"type": [
"number",
"null"
]
}
},
"title": "DepthCoordinate",
"type": "object"
},
"DepthCoordinateEnum": {
"description": "The reference coordinate system to specify a depth vertical position (i.e., the height or depth from the specified reference position).",
"enum": [
"DATUM_LOCAL_SURFACE",
"DATUM_MEAN_SEA_LEVEL"
],
"title": "DepthCoordinateEnum",
"type": "string"
},
"DistanceUnitEnum": {
"description": "The unit of distance.",
"enum": [
"DISTANCE_UNITS_FEET",
"DISTANCE_UNITS_METERS"
],
"title": "DistanceUnitEnum",
"type": "string"
},
"EncodingMethodEnum": {
"description": "The method for encoding the units of distance.",
"enum": [
"ENCODING_ATTRIBUTE",
"ENCODING_EXPLICIT",
"ENCODING_IMPLICIT"
],
"title": "EncodingMethodEnum",
"type": "string"
},
"Feature": {
"additionalProperties": false,
"description": "A general feature upon which an observation can be made. Loosely after GF_Feature (ISO).",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"description": {
"description": "The feature description",
"type": [
"string",
"null"
]
},
"feature_type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "The feature type."
},
"id": {
"description": "Unique identifier for the feature",
"type": [
"string",
"null"
]
},
"name": {
"description": "A name for the feature",
"type": [
"string",
"null"
]
},
"observed_properties": {
"description": "List of observed properties",
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/MappedAttribute"
}
],
"type": "string"
},
"type": [
"array",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
}
},
"title": "Feature",
"type": "object"
},
"FeatureTypeEnum": {
"description": "Enumeration for Feature Types",
"enum": [
"BASIN",
"HORIZONTAL_PATH",
"PLOT",
"POINT",
"REGION",
"SITE",
"SUBBASIN",
"SUBREGION",
"SUBWATERSHED",
"VERTICAL_PATH",
"WATERSHED"
],
"title": "FeatureTypeEnum",
"type": "string"
},
"GeographicCoordinate": {
"additionalProperties": false,
"description": "The latitude and longitude which define the position of a point on the Earth's surface with respect to a reference spheroid (https://www.fgdc.gov/csdgmgraphical/spref.htm).",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"datum": {
"$ref": "#/$defs/HorizontalCoordinateEnum",
"description": "The reference coordinate system."
},
"id": {
"type": [
"string",
"null"
]
},
"latitude": {
"description": "Alias for Y Coordinate",
"type": [
"number",
"null"
]
},
"longitude": {
"description": "Alias for X Coordinate",
"type": [
"number",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/$defs/HorizontalCoordinateTypeEnum",
"description": "The type of horizontal coordinates."
},
"units": {
"$ref": "#/$defs/GeographicCoordinateUnitEnum",
"description": "Latitude and longitude units."
},
"x": {
"description": "X Coordinate",
"type": [
"number",
"null"
]
},
"y": {
"description": "Y Coordinate",
"type": [
"number",
"null"
]
}
},
"title": "GeographicCoordinate",
"type": "object"
},
"GeographicCoordinateUnitEnum": {
"description": "Latitude and longitude units.",
"enum": [
"UNITS_DEC_DEGREES",
"UNITS_DEC_MINUTES",
"UNITS_DEC_SECONDS",
"UNITS_DEGREES_DEC_MINUTES",
"UNITS_DEGREES_MIN_DEC_SECS",
"UNITS_GRADS",
"UNITS_RADIANS"
],
"title": "GeographicCoordinateUnitEnum",
"type": "string"
},
"HorizontalCoordinate": {
"additionalProperties": false,
"description": "Generic XY coordinates for a point on earth (https://www.fgdc.gov/csdgmgraphical/spref.htm)",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"datum": {
"$ref": "#/$defs/HorizontalCoordinateEnum",
"description": "The reference coordinate system."
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"type": {
"$ref": "#/$defs/HorizontalCoordinateTypeEnum",
"description": "The type of horizontal coordinates."
},
"x": {
"description": "X Coordinate",
"type": [
"number",
"null"
]
},
"y": {
"description": "Y Coordinate",
"type": [
"number",
"null"
]
}
},
"title": "HorizontalCoordinate",
"type": "object"
},
"HorizontalCoordinateEnum": {
"description": "The reference coordinate system for generic XY coordinates for a point on earth (https://www.fgdc.gov/csdgmgraphical/spref.htm).",
"enum": [
"DATUM_NAD27",
"DATUM_NAD83",
"DATUM_WGS84"
],
"title": "HorizontalCoordinateEnum",
"type": "string"
},
"HorizontalCoordinateTypeEnum": {
"description": "The type of horizontal coordinates.",
"enum": [
"TYPE_GEOGRAPHIC",
"TYPE_LOCAL",
"TYPE_PLANAR_GRID",
"TYPE_PLANAR_LOCAL",
"TYPE_PLANAR_MAP_PROJECTION"
],
"title": "HorizontalCoordinateTypeEnum",
"type": "string"
},
"MappedAttribute": {
"additionalProperties": false,
"description": "A data class for an attribute that is translated (i.e., mapped) from a datasource vocabulary to BASIN-3D vocabulary.\nNote that this model holds an AttributeMapping that maybe compound in nature; however this class specifies only one attribute types.\nFor example, if the AttributeMapping is for a compound mapping of attribute types OBSERVED_PROPERTY:SAMPLING_MEDIUM, the attr_type field would be either OBSERVED_PROPERTY or SAMPLING_MEDIUM but not both.",
"properties": {
"attr_mapping": {
"anyOf": [
{
"$ref": "#/$defs/AttributeMapping"
},
{
"type": "null"
}
],
"description": "AttributeMapping as described in the datasource's (i.e., plugin's mapping file)."
},
"attr_type": {
"$ref": "#/$defs/MappedAttributeEnum",
"description": "Attribute Type; e.g., STATISTIC, RESULT_QUALITY, OBSERVED_PROPERTY, etc; single type only"
}
},
"title": "MappedAttribute",
"type": "object"
},
"MappedAttributeEnum": {
"description": "Enumeration for mapped attributes",
"enum": [
"AGGREGATION_DURATION",
"OBSERVED_PROPERTY",
"RESULT_QUALITY",
"SAMPLING_MEDIUM",
"STATISTIC"
],
"title": "MappedAttributeEnum",
"type": "string"
},
"MeasurementTimeseriesTVPObservation": {
"additionalProperties": false,
"description": "Series of measurement (numerical) observations in TVP format grouped by time (i.e., a time series).\nAnything specified at the group level automatically applies to the individual observation.",
"properties": {
"aggregation_duration": {
"anyOf": [
{
"$ref": "#/$defs/AggregationAttribute"
},
{
"type": "null"
}
],
"description": "Time period represented by the observation. Follows OGC TM_PeriodDuration. Use constants prefixed with `AGGREGATION_DURATION` from :class:`TimeseriesMetadataMixin`"
},
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"feature_of_interest": {
"anyOf": [
{
"$ref": "#/$defs/MonitoringFeature"
},
{
"type": "null"
}
],
"description": "The feature on which the observed property was observed"
},
"feature_of_interest_type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "The type of feature that was observed."
},
"id": {
"description": "Unique observation identifier",
"type": [
"string",
"null"
]
},
"observed_property": {
"anyOf": [
{
"$ref": "#/$defs/MappedAttribute"
},
{
"type": "null"
}
],
"description": "The property that was observed"
},
"original_id": {
"type": [
"string",
"null"
]
},
"phenomenon_time": {
"description": "datetime of the observation (required OGC attribute timePhenomenon). For timeseries, start and end datetimes can be provided.",
"type": [
"string",
"null"
]
},
"result": {
"anyOf": [
{
"$ref": "#/$defs/ResultListTVP"
},
{
"type": "null"
}
],
"description": "A list of results"
},
"result_quality": {
"description": "The result quality assessment.",
"items": {
"$ref": "#/$defs/ResultQualityAttribute"
},
"type": [
"array",
"null"
]
},
"sampling_medium": {
"anyOf": [
{
"$ref": "#/$defs/SamplingMediumAttribute"
},
{
"type": "null"
}
],
"description": "Sampling medium in which the observed property was measured"
},
"statistic": {
"$ref": "#/$defs/StatisticEnum",
"description": "The statistical property of the observation result."
},
"time_reference_position": {
"$ref": "#/$defs/TimeReferenceEnum",
"description": "Position of timestamp in aggregated_duration. Encompassed as part of OGC interpolationType."
},
"type": {
"$ref": "#/$defs/ObservationTypeEnum",
"description": "Type of observation."
},
"unit_of_measurement": {
"description": "Unit of measurement",
"type": [
"string",
"null"
]
},
"utc_offset": {
"description": "Coordinated Universal Time (UTC) offset in hours (e.g. +/-9)"
}
},
"title": "MeasurementTimeseriesTVPObservation",
"type": "object"
},
"MonitoringFeature": {
"additionalProperties": false,
"description": "A feature upon which monitoring is made. OGC Timeseries Profile OM_MonitoringFeature.",
"properties": {
"coordinates": {
"anyOf": [
{
"$ref": "#/$defs/Coordinate"
},
{
"type": "null"
}
],
"description": "Description of feature location."
},
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"description": {
"description": "The feature description",
"type": [
"string",
"null"
]
},
"description_reference": {
"description": "Extra information about the Monitoring Feature",
"type": [
"string",
"null"
]
},
"feature_type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "The feature type."
},
"id": {
"description": "Unique identifier for the feature",
"type": [
"string",
"null"
]
},
"name": {
"description": "A name for the feature",
"type": [
"string",
"null"
]
},
"observed_properties": {
"description": "List of observed properties",
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/MappedAttribute"
}
],
"type": "string"
},
"type": [
"array",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"related_party": {
"description": "list of Person, people or organizations responsible for Feature. To be extended in future to full OGC Responsible_Party",
"items": {
"$ref": "#/$defs/Person"
},
"type": [
"array",
"null"
]
},
"related_sampling_feature_complex": {
"description": "List of related sampling features.",
"items": {
"$ref": "#/$defs/SamplingFeature"
},
"type": [
"array",
"null"
]
},
"shape": {
"$ref": "#/$defs/SpatialSamplingShapes",
"description": "The shape of the feature."
},
"utc_offset": {
"description": "Coordinated Universal Time (UTC) offset in hours (e.g. +/-9)"
}
},
"title": "MonitoringFeature",
"type": "object"
},
"Observation": {
"additionalProperties": false,
"description": "OGC OM_Observation feature type. This is a parent class to which Mixins should be added to create observation types with metadata and result.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"feature_of_interest": {
"anyOf": [
{
"$ref": "#/$defs/MonitoringFeature"
},
{
"type": "null"
}
],
"description": "The feature on which the observed property was observed"
},
"feature_of_interest_type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "The type of feature that was observed."
},
"id": {
"description": "Unique observation identifier",
"type": [
"string",
"null"
]
},
"observed_property": {
"anyOf": [
{
"$ref": "#/$defs/MappedAttribute"
},
{
"type": "null"
}
],
"description": "The property that was observed"
},
"original_id": {
"type": [
"string",
"null"
]
},
"phenomenon_time": {
"description": "datetime of the observation (required OGC attribute timePhenomenon). For timeseries, start and end datetimes can be provided.",
"type": [
"string",
"null"
]
},
"result_quality": {
"description": "The result quality assessment.",
"items": {
"$ref": "#/$defs/ResultQualityAttribute"
},
"type": [
"array",
"null"
]
},
"type": {
"$ref": "#/$defs/ObservationTypeEnum",
"description": "Type of observation."
},
"utc_offset": {
"description": "Coordinated Universal Time (UTC) offset in hours (e.g. +/-9)"
}
},
"title": "Observation",
"type": "object"
},
"ObservationTypeAttribute": {
"additionalProperties": false,
"description": "Observation type.",
"properties": {
"attr_mapping": {
"anyOf": [
{
"$ref": "#/$defs/AttributeMapping"
},
{
"type": "null"
}
],
"description": "AttributeMapping as described in the datasource's (i.e., plugin's mapping file)."
},
"attr_type": {
"$ref": "#/$defs/ObservationTypeEnum",
"description": "Type of observation performed."
}
},
"title": "ObservationTypeAttribute",
"type": "object"
},
"ObservationTypeEnum": {
"description": "Type of observation.",
"enum": [
"TYPE_MEASUREMENT",
"TYPE_MEASUREMENT_TVP_TIMESERIES"
],
"title": "ObservationTypeEnum",
"type": "string"
},
"ObservedProperty": {
"additionalProperties": false,
"description": "Defining the properties being observed (measured). See http://vocabulary.odm2.org/variablename/ for controlled vocabulary.\nSee http://vocabulary.odm2.org/variabletype/ for options, although I think we should have our own list (theirs is a bit funky).",
"properties": {
"basin3d_vocab": {
"type": [
"string",
"null"
]
},
"categories": {
"description": "List of categories, in order of priority.",
"items": {
"type": "string"
},
"type": [
"array",
"null"
]
},
"full_name": {
"type": [
"string",
"null"
]
},
"units": {
"type": [
"string",
"null"
]
}
},
"title": "ObservedProperty",
"type": "object"
},
"Person": {
"additionalProperties": false,
"description": "A person or organization",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"email": {
"description": "Email address",
"type": [
"string",
"null"
]
},
"first_name": {
"description": "First (given) name of person",
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"institution": {
"description": "Institution or organization name",
"type": [
"string",
"null"
]
},
"last_name": {
"description": "Last (family) name",
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"role": {
"description": "Role of person in relation to responsibility",
"type": [
"string",
"null"
]
}
},
"title": "Person",
"type": "object"
},
"RelatedSamplingFeature": {
"additionalProperties": false,
"description": "Class that represents a related sampling feature and its role relative to\nthe sampling feature to which it is related. Spatial hierarchies of features\nare built by specifying related sampling features.\nData model from OGC Observations and Measurements.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"related_sampling_feature": {
"anyOf": [
{
"$ref": "#/$defs/SamplingFeature"
},
{
"type": "null"
}
],
"description": "A sampling feature relation"
},
"related_sampling_feature_type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "Feature type of the related sampling feature."
},
"role": {
"$ref": "#/$defs/RelatedSamplingFeatureRoleEnum",
"description": "Currently the only Related Sampling Feature role is `RelatedSamplingFeature.PARENT`"
}
},
"title": "RelatedSamplingFeature",
"type": "object"
},
"RelatedSamplingFeatureRoleEnum": {
"description": "Role of related sampling feature.",
"enum": [
"ROLE_PARENT"
],
"title": "RelatedSamplingFeatureRoleEnum",
"type": "string"
},
"RepresentativeCoordinate": {
"additionalProperties": false,
"description": "Representative coordinates describe the location of a feature by a representative shape / location.\nFor example, a study area may be represented by the center point.\nThe vertical position from a reference position (e.g., height, depth) is also described in this class.\nCurrently representative points are supported. The class is extendable to other forms of representing\n(e.g., diameter, area, side_length)\nRepresentative point types are also expandable as use cases require.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"representative_point": {
"anyOf": [
{
"$ref": "#/$defs/AbsoluteCoordinate"
},
{
"type": "null"
}
],
"description": "A point representation of the feature."
},
"representative_point_type": {
"$ref": "#/$defs/RepresentativePointTypeEnum",
"description": "The type of representative point relative to the feature's geometry. Currently the point is assumed to be located at the local surface (CV)."
},
"vertical_position": {
"anyOf": [
{
"$ref": "#/$defs/DepthCoordinate"
},
{
"type": "null"
}
],
"description": "The vertical position of the feature from a reference position (e.g., height or depth)."
}
},
"title": "RepresentativeCoordinate",
"type": "object"
},
"RepresentativePointTypeEnum": {
"description": "Types of representative points.",
"enum": [
"REPRESENTATIVE_POINT_TYPE_CENTER_LOCAL_SURFACE",
"REPRESENTATIVE_POINT_TYPE_LOWER_LEFT_CORNER",
"REPRESENTATIVE_POINT_TYPE_LOWER_RIGHT_CORNER",
"REPRESENTATIVE_POINT_TYPE_UPPER_LEFT_CORNER",
"REPRESENTATIVE_POINT_TYPE_UPPER_RIGHT_CORNER"
],
"title": "RepresentativePointTypeEnum",
"type": "string"
},
"ResultListTVP": {
"additionalProperties": false,
"description": "Result Point Float",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"result_quality": {
"description": "Result that was measured",
"items": {
"$ref": "#/$defs/ResultQualityAttribute"
},
"type": [
"array",
"null"
]
},
"value": {
"description": "Result that was measured",
"items": {
"$ref": "#/$defs/TimeValuePair"
},
"type": [
"array",
"null"
]
}
},
"title": "ResultListTVP",
"type": "object"
},
"ResultPointFloat": {
"additionalProperties": false,
"description": "Result Point Float",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"result_quality": {
"anyOf": [
{
"$ref": "#/$defs/ResultQualityAttribute"
},
{
"type": "null"
}
],
"description": "Result that was measured"
},
"value": {
"description": "Result that was measured",
"type": [
"number",
"null"
]
}
},
"title": "ResultPointFloat",
"type": "object"
},
"ResultQualityAttribute": {
"additionalProperties": false,
"description": "Result quality.",
"properties": {
"attr_mapping": {
"anyOf": [
{
"$ref": "#/$defs/AttributeMapping"
},
{
"type": "null"
}
],
"description": "AttributeMapping as described in the datasource's (i.e., plugin's mapping file)."
},
"attr_type": {
"$ref": "#/$defs/ResultQualityEnum",
"description": "The quality of a result."
}
},
"title": "ResultQualityAttribute",
"type": "object"
},
"ResultQualityEnum": {
"description": "Enumeration for Result Quality",
"enum": [
"ESTIMATED",
"NOT_SUPPORTED",
"REJECTED",
"SUSPECTED",
"UNVALIDATED",
"VALIDATED"
],
"title": "ResultQualityEnum",
"type": "string"
},
"SamplingFeature": {
"additionalProperties": false,
"description": "A feature where sampling is conducted. OGC Observation & Measurements SF_SamplingFeature.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"description": {
"description": "The feature description",
"type": [
"string",
"null"
]
},
"feature_type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "The feature type."
},
"id": {
"description": "Unique identifier for the feature",
"type": [
"string",
"null"
]
},
"name": {
"description": "A name for the feature",
"type": [
"string",
"null"
]
},
"observed_properties": {
"description": "List of observed properties",
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/MappedAttribute"
}
],
"type": "string"
},
"type": [
"array",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"related_sampling_feature_complex": {
"description": "List of related sampling features.",
"items": {
"$ref": "#/$defs/SamplingFeature"
},
"type": [
"array",
"null"
]
}
},
"title": "SamplingFeature",
"type": "object"
},
"SamplingMediumAttribute": {
"additionalProperties": false,
"description": "Sampling medium.",
"properties": {
"attr_mapping": {
"anyOf": [
{
"$ref": "#/$defs/AttributeMapping"
},
{
"type": "null"
}
],
"description": "AttributeMapping as described in the datasource's (i.e., plugin's mapping file)."
},
"attr_type": {
"$ref": "#/$defs/SamplingMediumEnum",
"description": "The type of sampling medium."
}
},
"title": "SamplingMediumAttribute",
"type": "object"
},
"SamplingMediumEnum": {
"description": "Types of sampling mediums for Observed Properties.",
"enum": [
"GAS",
"NOT_APPLICABLE",
"NOT_SUPPORTED",
"OTHER",
"SOLID_PHASE",
"WATER"
],
"title": "SamplingMediumEnum",
"type": "string"
},
"SpatialSamplingFeature": {
"additionalProperties": false,
"description": "A spatially-defined feature where sampling is conducted. OGC Observation & Measurements SF_SpatialSamplingFeature.",
"properties": {
"coordinates": {
"anyOf": [
{
"$ref": "#/$defs/Coordinate"
},
{
"type": "null"
}
],
"description": "Description of feature location."
},
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"description": {
"description": "The feature description",
"type": [
"string",
"null"
]
},
"feature_type": {
"$ref": "#/$defs/FeatureTypeEnum",
"description": "The feature type."
},
"id": {
"description": "Unique identifier for the feature",
"type": [
"string",
"null"
]
},
"name": {
"description": "A name for the feature",
"type": [
"string",
"null"
]
},
"observed_properties": {
"description": "List of observed properties",
"items": {
"anyOf": [
{
"type": "string"
},
{
"$ref": "#/$defs/MappedAttribute"
}
],
"type": "string"
},
"type": [
"array",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"related_sampling_feature_complex": {
"description": "List of related sampling features.",
"items": {
"$ref": "#/$defs/SamplingFeature"
},
"type": [
"array",
"null"
]
},
"shape": {
"$ref": "#/$defs/SpatialSamplingShapes",
"description": "The shape of the feature."
}
},
"title": "SpatialSamplingFeature",
"type": "object"
},
"SpatialSamplingShapes": {
"description": "Spatial sampling shape describing a spatial sampling feature\nControlled CV list as defined by OGC Observation & Measurement GM_Shape.",
"enum": [
"SHAPE_CURVE",
"SHAPE_POINT",
"SHAPE_SOLID",
"SHAPE_SURFACE"
],
"title": "SpatialSamplingShapes",
"type": "string"
},
"StatisticAttribute": {
"additionalProperties": false,
"description": "Statistic.",
"properties": {
"attr_mapping": {
"anyOf": [
{
"$ref": "#/$defs/AttributeMapping"
},
{
"type": "null"
}
],
"description": "AttributeMapping as described in the datasource's (i.e., plugin's mapping file)."
},
"attr_type": {
"$ref": "#/$defs/StatisticEnum",
"description": "The type of statistic used."
}
},
"title": "StatisticAttribute",
"type": "object"
},
"StatisticEnum": {
"description": "Enumeration for Statistics",
"enum": [
"INSTANT",
"MAX",
"MEAN",
"MIN",
"NOT_SUPPORTED",
"TOTAL"
],
"title": "StatisticEnum",
"type": "string"
},
"TimeFrequencyEnum": {
"description": "Enumeration for time frequencies",
"enum": [
"DAY",
"HOUR",
"MINUTE",
"MONTH",
"NONE",
"NOT_SUPPORTED",
"SECOND",
"YEAR"
],
"title": "TimeFrequencyEnum",
"type": "string"
},
"TimeReferenceEnum": {
"description": "Position of timestamp in aggregated_duration. Encompassed as part of OGC interpolationType.",
"enum": [
"TIME_REFERENCE_END",
"TIME_REFERENCE_MIDDLE",
"TIME_REFERENCE_START"
],
"title": "TimeReferenceEnum",
"type": "string"
},
"TimeValuePair": {
"additionalProperties": false,
"description": "Tuple that represents a time value pair in the form `(timestamp, value)`.",
"properties": {
"timestamp": {
"description": "timestamp in ISO format (i.e. python's isoformat() function)",
"type": [
"string",
"null"
]
},
"value": {
"description": "Value at the given point in time.",
"type": [
"string",
"null"
]
}
},
"title": "TimeValuePair",
"type": "object"
},
"VerticalCoordinate": {
"additionalProperties": false,
"description": "The vertical position of the feature (altitudes or depths). The reference frame or system is specified.",
"properties": {
"datasource": {
"type": [
"string",
"null"
]
},
"datasource_ids": {
"type": [
"string",
"null"
]
},
"datum": {
"anyOf": [
{
"$ref": "#/$defs/AltitudeCoordinateEnum"
},
{
"$ref": "#/$defs/DepthCoordinateEnum"
},
{
"type": "null"
}
],
"description": "The reference coordinate system.",
"type": "string"
},
"distance_units": {
"$ref": "#/$defs/DistanceUnitEnum",
"description": "The unit of distance."
},
"encoding_method": {
"$ref": "#/$defs/EncodingMethodEnum",
"description": "The method for encoding the units of distance."
},
"id": {
"type": [
"string",
"null"
]
},
"original_id": {
"type": [
"string",
"null"
]
},
"resolution": {
"description": "The minimum distance possible between two adjacent depth values, expressed in Distance Units used for Depth",
"type": [
"number",
"null"
]
},
"type": {
"$ref": "#/$defs/VerticalCoordinateTypeEnum",
"description": "The type of vertical position:`TYPE_ALTITUDE` or `TYPE_DEPTH`"
},
"value": {
"description": "The vertical position value",
"type": [
"number",
null
]
}
},
"title": "VerticalCoordinate",
"type": "object"
},
"VerticalCoordinateTypeEnum": {
"description": "The type of vertical position, altitude or depth.",
"enum": [
"TYPE_ALTITUDE",
"TYPE_DEPTH"
],
"title": "VerticalCoordinateTypeEnum",
"type": "string"
}
},
"$id": "https://github.com/kbase/cdm-schema",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"additionalProperties": true,
"metamodel_version": "1.7.0",
"title": "kbase_cdm",
"type": "object",
"version": "0.0.1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment