Skip to main content

Spatial Relationship Ontology

Spatial Relationships
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 10 October 2026
Audio Overview
FLOW ALGEBRA
TITLE: Spatial Relationship Ontology
DOMAIN: Relationship Ontologies / Spatial Relationships
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/spatial-relationships/spatial-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.

flow "SpatialRelationshipOntology" v1.0 {
  ontology:
    id: "spatial-relationship-ontology"
    parent: "spatial-relationships"
    purpose: "Represent, evaluate and validate spatial relationships between entities across coordinate systems, scales and temporal contexts."

  types:
    SpatialEntity: {id: string, kind: enum[point, line, polygon, volume, region, object, place, other], geometry_id: string?}
    Geometry: {id: string, geometry_type: string, coordinates: array, crs: string, dimensionality: integer, validity_time: datetime?}
    SpatialReference: {crs: string, datum: string?, axis_order: string?, unit: string, epoch: datetime?}
    SpatialMeasurement: {value: number, unit: string, uncertainty: number?, method: string?, reference: SpatialReference?}
    Observation: {id: string, timestamp: datetime?, method: string, provenance: string, uncertainty: number?}
    Relationship: {id: string, subject: string, predicate: string, object: string, context: string?, confidence: number, evidence: string[]}

  predicates:
    located_in(entity: SpatialEntity, region: SpatialEntity)
    contains(region: SpatialEntity, entity: SpatialEntity)
    within(entity: SpatialEntity, region: SpatialEntity)
    intersects(a: SpatialEntity, b: SpatialEntity)
    disjoint_from(a: SpatialEntity, b: SpatialEntity)
    touches(a: SpatialEntity, b: SpatialEntity)
    overlaps(a: SpatialEntity, b: SpatialEntity)
    adjacent_to(a: SpatialEntity, b: SpatialEntity)
    near(a: SpatialEntity, b: SpatialEntity, threshold: SpatialMeasurement)
    distance_between(a: SpatialEntity, b: SpatialEntity, distance: SpatialMeasurement)
    direction_from(a: SpatialEntity, b: SpatialEntity, bearing: SpatialMeasurement)

  constraints:
    - "Relationship endpoints must resolve to typed spatial entities."
    - "Confidence must lie within [0, 1]."
    - "Geometries must specify coordinate reference systems and axis order where needed."
    - "Distance and direction measurements must declare units and calculation conventions."
    - "Near requires an explicit threshold, metric and scale."
    - "Topological relationships must be evaluated on geometries with compatible dimensionality and valid geometry definitions."
    - "Spatial predicates are not assumed transitive unless the formal semantics support transitivity."
    - "Time-dependent spatial relationships must preserve observation epoch and validity interval."
    - "Containment, overlap, adjacency and proximity must not be treated as synonyms."

  inference:
    rule containment_inverse:
      if contains(a,b) and same_spatial_context(a,b)
      then within(b,a)
      confidence: "preserve source evidence and geometry validity"
    rule intersection_symmetry:
      if intersects(a,b) and same_spatial_context(a,b)
      then intersects(b,a)
      confidence: "retain original confidence and context"
    rule disjoint_symmetry:
      if disjoint_from(a,b) and same_spatial_context(a,b)
      then disjoint_from(b,a)
      confidence: "retain original confidence and context"
    rule containment_chain:
      if contains(a,b) and contains(b,c) and compatible_geometry_and_time(a,b,c)
      then contains(a,c)
      confidence: "propagate weakest evidence; do not manufacture certainty"
    rule measured_proximity:
      if distance_between(a,b,d) and comparable_units(d,threshold) and d.value <= threshold.value
      then near(a,b,threshold)
      confidence: "account for measurement uncertainty and threshold boundary"

  SEMANTIC_EQUIVALENCE:
    - "Normalise spatial predicate aliases against versioned definitions."
    - "Distinguish strict containment from boundary-inclusive coverage."
    - "Preserve coordinate system, units, scale, topology and temporal context."
    - "Never infer identity solely from coincident coordinates or overlapping geometries."

  CONFIDENCE:
    range: [0,1]
    factors: [geometry_accuracy, positional_uncertainty, source_reliability, scale, temporal_validity, transformation_error]
    policy: "Do not increase confidence solely by chaining spatial inferences."

  VALIDATION:
    - "Check entity types, geometry integrity, coordinate reference compatibility and dimensionality."
    - "Verify unit conversion, distance metric, topology semantics and epoch alignment."
    - "Flag contradictory assertions under the same spatial and temporal context."
    - "Retain alternative geometries and unresolved observations with provenance."

  FLOW_HASH:
    algorithm: "SHA-256"
    input: "canonicalised ontology version, geometries, typed assertions, rules and provenance"
    note: "Compute hash at execution; no hash value is claimed here."

  UPDATE_MODEL:
    strategy: "versioned, provenance-preserving incremental update"
    steps: [ingest, normalise, transform_crs, validate, compare, reconcile, recompute_inferences, publish]
    rollback: true

  AI_CONSUMPTION:
    representation: "typed spatial knowledge graph with geometry-linked, evidence-backed edges"
    outputs: [spatial_entities, relation_triples, geometry_references, uncertainty_annotations, inferred_edges, provenance_records]
    safeguards: [no_unqualified_location_merges, preserve_crs_units_and_epochs, no_unsupported_topological_inference]
}

END FLOW ALGEBRA
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ