Skip to main content

Distance 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: Distance Relationship Ontology
DOMAIN: Spatial Relationships / Distance
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/spatial-relationships/distance-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.

flow "DistanceRelationshipOntology" v1.0 {
  ontology:
    id: "distance-relationship-ontology"
    parent: "spatial-relationships"
    purpose: "Represent, measure, compare and validate distances between spatial entities under explicit metrics and reference systems."

  types:
    SpatialEntity: {id: string, geometry_ref: string?, crs: string?, valid_time: datetime?}
    Position: {coordinates: number[], crs: string, epoch: datetime?, uncertainty: number?}
    DistanceMetric: {id: string, kind: enum[euclidean, geodesic, network, manhattan, travel_distance, other], parameters: map?}
    DistanceQuantity: {value: number, unit: string, uncertainty: number?, metric_id: string, method: string?, timestamp: datetime?}
    Measurement: {id: string, instrument: string?, method: string, provenance: string, timestamp: datetime?}
    Relationship: {id: string, subject: string, predicate: string, object: string, quantity: DistanceQuantity?, context: string?, confidence: number, evidence: string[]}

  predicates:
    distance_between(a: SpatialEntity, b: SpatialEntity, d: DistanceQuantity)
    closer_than(a: SpatialEntity, b: SpatialEntity, c: SpatialEntity, metric: DistanceMetric)
    within_distance(a: SpatialEntity, b: SpatialEntity, threshold: DistanceQuantity)
    equidistant_from(a: SpatialEntity, b: SpatialEntity, c: SpatialEntity, metric: DistanceMetric)
    measured_by(d: DistanceQuantity, m: Measurement)
    uses_metric(d: DistanceQuantity, metric: DistanceMetric)

  constraints:
    - "Every distance has a numeric value, explicit unit and defined metric."
    - "Distance values must be non-negative; missing or invalid measurements are not zero."
    - "Coordinate reference systems and epochs must be compatible or explicitly transformed."
    - "Geodesic, Euclidean, network and travel distances must not be conflated."
    - "Metric symmetry and triangle inequality may be assumed only when the chosen metric satisfies them."
    - "Travel distances may be directional, route-dependent and time-dependent."
    - "Comparison requires compatible metrics, units, geometries and temporal contexts."
    - "Confidence must lie within [0, 1]."

  inference:
    rule distance_symmetry:
      if distance_between(a,b,d) and symmetric_metric(d.metric_id)
      then distance_between(b,a,d)
      confidence: "preserve evidence and metric context"
    rule threshold_membership:
      if distance_between(a,b,d) and compatible(d,t) and d.value <= t.value
      then within_distance(a,b,t)
      confidence: "account for measurement uncertainty at threshold"
    rule relative_proximity:
      if distance_between(a,b,d1) and distance_between(a,c,d2) and compatible(d1,d2) and d1.value < d2.value
      then closer_than(a,b,c,metric(d1))
      confidence: "qualify uncertain or overlapping intervals"
    rule metric_triangle_bound:
      if distance_between(a,b,d1) and distance_between(b,c,d2) and metric_axioms_hold(d1,d2)
      then upper_bound(distance(a,c),d1.value+d2.value)
      confidence: "bound only; not an exact inferred distance"

  SEMANTIC_EQUIVALENCE:
    - "Normalise unit aliases using a versioned unit vocabulary."
    - "Distinguish separation, route length, travel time and perceived proximity."
    - "Preserve metric, coordinate system, geometry interpretation and epoch."

  CONFIDENCE:
    range: [0,1]
    factors: [measurement_uncertainty, spatial_resolution, coordinate_accuracy, metric_suitability, temporal_validity, source_reliability]
    policy: "Never raise confidence solely through repeated inference."

  VALIDATION:
    - "Check entity resolution, geometry validity, CRS and unit compatibility."
    - "Check metric assumptions before applying symmetry or triangle inequalities."
    - "Flag uncertainty overlap for strict proximity rankings."
    - "Retain measurement method, source and observation time."

  FLOW_HASH:
    algorithm: "SHA-256"
    input: "canonicalised ontology version, typed assertions, metrics, 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 metric-qualified distance edges"
    outputs: [distance_triples, proximity_relations, uncertainty_annotations, metric_metadata, provenance_records]
    safeguards: [preserve_units_and_crs, distinguish_distance_metrics, respect_uncertainty, no_unjustified_metric_assumptions]
}

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