FLOW ALGEBRA
TITLE: Location Relationship Ontology
DOMAIN: Spatial Relationships / Location
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/spatial-relationships/location-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "LocationRelationshipOntology" v1.0 {
ontology:
id: "location-relationship-ontology"
parent: "spatial-relationships"
purpose: "Represent evidence-backed location relationships between entities, places, regions and reference frames."
types:
SpatialEntity: {id: string, class: string, geometry_id: string?}
Place: {id: string, name: string, gazetteer_id: string?, geometry_id: string?}
Region: {id: string, boundary_id: string, validity: string?}
Coordinate: {values: number[], crs: string, epoch: datetime?, uncertainty: number?, unit: string?}
Geometry: {id: string, kind: enum[point, line, polygon, multipolygon, volume, other], crs: string, validity: string?}
Observation: {id: string, timestamp: datetime, method: string, provenance: string, uncertainty: number?}
LocationRelation: {id: string, subject: string, predicate: string, object: string, temporal_context: string?, confidence: number, evidence: string[]}
predicates:
located_at(entity: SpatialEntity, coordinate: Coordinate)
located_in(entity: SpatialEntity, region: Region)
contains(region: Region, entity: SpatialEntity)
overlaps(a: Region, b: Region)
adjacent_to(a: Region, b: Region)
located_near(a: SpatialEntity, b: SpatialEntity, threshold: number, unit: string, metric: string)
observed_at(entity: SpatialEntity, coordinate: Coordinate, observation: Observation)
same_location_as(a: SpatialEntity, b: SpatialEntity, tolerance: number, unit: string)
constraints:
- "All relationship endpoints must resolve to declared, compatible types."
- "Confidence lies within [0,1]; missing confidence must be marked unknown rather than invented."
- "Coordinates require a declared coordinate reference system and explicit axis ordering."
- "Convert geometries into compatible reference systems before spatial comparison."
- "Location assertions for moving entities require temporal validity or an observation time."
- "Nearness requires a stated distance metric, threshold and units."
- "Coincident coordinates do not imply identical entities."
- "Place-name equivalence alone does not prove spatial identity."
- "Boundary uncertainty and scale must be retained where relevant."
inference:
rule containment_inverse:
if located_in(e,r) and valid_boundary(r)
then contains(r,e)
confidence: "preserve spatial and temporal evidence"
rule nested_containment:
if located_in(e,r1) and region_within(r1,r2) and compatible_epoch(e,r1,r2)
then located_in(e,r2)
confidence: "account for boundary and observation uncertainty"
rule adjacency_symmetry:
if adjacent_to(r1,r2) and symmetric_adjacency_model(r1,r2)
then adjacent_to(r2,r1)
confidence: "retain source evidence"
rule proximity_symmetry:
if located_near(a,b,t,u,m) and symmetric_metric(m)
then located_near(b,a,t,u,m)
confidence: "retain original threshold and metric"
SEMANTIC_EQUIVALENCE:
- "Resolve names using versioned gazetteers and stable identifiers where available."
- "Distinguish identical places from aliases, overlapping regions and nearby entities."
- "Preserve coordinate reference system, epoch, scale and boundary versions."
CONFIDENCE:
range: [0,1]
factors: [coordinate_accuracy, boundary_quality, observation_recency, source_reliability, spatial_resolution, independent_confirmation]
policy: "Do not increase certainty solely through inference chaining."
VALIDATION:
- "Verify identifiers, geometry validity, coordinate axis order, units and reference systems."
- "Test temporal consistency before applying containment or proximity rules."
- "Flag ambiguous place names, conflicting boundaries and unsupported identity merges."
- "Retain contradictory location reports with their provenance for review."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, typed assertions, rules, spatial reference metadata and provenance"
note: "Compute at execution; no hash value is asserted here."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental update"
steps: [ingest, normalise, transform_crs, validate, reconcile, recompute_inferences, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed spatial knowledge graph with temporal and evidential qualifiers"
outputs: [location_triples, region_links, proximity_edges, uncertainty_annotations, provenance_records]
safeguards: [no_unqualified_geolocation_claims, no_unsupported_identity_merges, preserve_crs_units_epochs_and_boundary_versions]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard