FLOW ALGEBRA
Ontology: Coordinate System Ontology
Domain: Metadata Ontologies > Spatial Metadata
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/spatial-metadata/coordinate-system-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)
flow "CoordinateSystemOntology" v1.0
# ---------- DOMAIN ----------
domain:
class: MetadataOntology
category: SpatialMetadata
subject: CoordinateSystem
purpose:
- represent systems used to express spatial positions
- define coordinate axes, dimensions, units, and origins
- provide machine-readable spatial reference context
- support coordinate interpretation and transformation
- prevent ambiguity in spatial data exchange and reasoning
# ---------- CORE ENTITY ----------
entity CoordinateSystem:
type: SpatialReferenceStructure
defines:
- dimensions
- axes
- axis_order
- units
may_include:
- origin
- orientation
- handedness
- datum
- projection
- identifier
- coordinate_domain
- provenance
entity Coordinate:
type: PositionTuple
belongs_to: CoordinateSystem
composed_of: CoordinateValue
entity CoordinateValue:
type: NumericOrOrdinalSpatialValue
associated_with: CoordinateAxis
expressed_in: Unit
entity CoordinateAxis:
type: SpatialAxis
properties:
- axis_name
- axis_direction
- axis_unit
- axis_order
entity Origin:
type: ReferencePoint
defines: CoordinateSystemZeroReference
entity Dimension:
type: StructuralProperty
represents: NumberOfIndependentCoordinateAxes
entity Unit:
type: MeasurementUnit
applies_to: CoordinateAxis
entity Datum:
type: ReferenceDefinition
anchors: CoordinateSystem
entity Projection:
type: SpatialTransformationModel
maps:
- source_surface
- coordinate_plane
# ---------- COORDINATE SYSTEM TYPES ----------
coordinate_system_types:
- CartesianCoordinateSystem
- GeographicCoordinateSystem
- ProjectedCoordinateSystem
- PolarCoordinateSystem
- CylindricalCoordinateSystem
- SphericalCoordinateSystem
- VerticalCoordinateSystem
- LocalCoordinateSystem
entity CartesianCoordinateSystem:
subtype_of: CoordinateSystem
axes:
- x
- y
- optional_z
entity GeographicCoordinateSystem:
subtype_of: CoordinateSystem
typical_axes:
- latitude
- longitude
- optional_ellipsoidal_height
entity ProjectedCoordinateSystem:
subtype_of: CoordinateSystem
derived_from: GeographicCoordinateSystem
uses: Projection
entity PolarCoordinateSystem:
subtype_of: CoordinateSystem
typical_components:
- radial_distance
- angle
entity SphericalCoordinateSystem:
subtype_of: CoordinateSystem
typical_components:
- radial_distance
- angular_coordinate_1
- angular_coordinate_2
# ---------- RELATIONSHIPS ----------
relationships:
CoordinateSystem -> DEFINES -> CoordinateAxis
CoordinateSystem -> HAS_DIMENSION -> Dimension
CoordinateSystem -> MAY_HAVE_ORIGIN -> Origin
CoordinateSystem -> MAY_USE -> Datum
CoordinateSystem -> MAY_USE -> Projection
Coordinate -> EXPRESSED_IN -> CoordinateSystem
Coordinate -> HAS_COMPONENT -> CoordinateValue
CoordinateValue -> CORRESPONDS_TO -> CoordinateAxis
CoordinateAxis -> USES -> Unit
ProjectedCoordinateSystem -> DERIVED_FROM -> GeographicCoordinateSystem
Projection -> TRANSFORMS -> SpatialRepresentation
CoordinateSystem -> MAY_HAVE_IDENTIFIER -> Identifier
CoordinateSystem -> MAY_REFERENCE -> Provenance
# ---------- DIMENSION RULES ----------
rule dimension_consistency:
number_of_coordinate_components SHOULD equal CoordinateSystem.dimension
unless optional dimensions are explicitly supported
rule axis_uniqueness:
each CoordinateAxis within CoordinateSystem MUST have a distinct semantic role
rule axis_order:
coordinate values MUST be interpreted according_to declared axis order
# ---------- AXIS RULES ----------
rule axis_definition:
each axis SHOULD declare:
- name
- direction
- unit
- order
rule axis_direction:
axis direction MUST be semantically compatible with CoordinateSystem type
rule axis_unit:
coordinate value MUST use axis-compatible unit
OR be transformed to compatible unit before comparison
# ---------- ORIGIN AND ORIENTATION ----------
rule origin:
IF CoordinateSystem depends on explicit Origin
THEN Origin MUST be available for deterministic position interpretation
rule orientation:
IF orientation affects coordinate interpretation
THEN orientation MUST be declared
rule handedness:
IF CoordinateSystem is directional Cartesian 3D
THEN handedness SHOULD be declared where ambiguity is possible
# ---------- DATUM ----------
rule datum_requirement:
IF CoordinateSystem represents Earth-referenced coordinates
AND datum materially affects position
THEN Datum MUST be explicit or unambiguously implied by declared reference system
rule datum_difference:
coordinates using different datums MUST NOT be assumed spatially identical
# ---------- PROJECTION ----------
rule projection:
IF CoordinateSystem.type = ProjectedCoordinateSystem
THEN Projection MUST be defined
rule projection_source:
ProjectedCoordinateSystem SHOULD reference source GeographicCoordinateSystem
rule projection_distortion:
projection MAY introduce:
- distance_distortion
- area_distortion
- angle_distortion
- shape_distortion
therefore projected measurements MUST be interpreted in projection context
# ---------- COORDINATE TRANSFORMATION ----------
operation transform_coordinate(source_coordinate, target_system):
require:
- source_coordinate
- source_coordinate_system
- target_system
- valid_transformation_path
process:
1. validate source coordinate
2. resolve source axes and units
3. resolve datum if required
4. resolve projection if required
5. transform into target reference
6. validate target coordinate
preserve:
- source_coordinate
- source_coordinate_system
- transformation_method
- transformation_parameters
- provenance
output:
- transformed_coordinate
- target_coordinate_system
- confidence
# ---------- COMPATIBILITY ----------
rule direct_comparison:
coordinates MAY be directly compared
ONLY IF coordinate systems are semantically compatible
rule conversion:
IF units differ but axes and reference semantics are compatible
THEN convert units before comparison
rule transformation_required:
IF coordinate systems differ in datum, projection, origin, orientation, or axis semantics
THEN explicit transformation MAY be required
# ---------- VALIDATION ----------
validation:
require:
- identifiable_coordinate_system
- defined_dimensions
- interpretable_axes
validate_if_present:
- axis_order
- units
- origin
- datum
- projection
- orientation
- handedness
- identifier
reject:
- coordinate_dimension_mismatch
- undefined_axis_semantics
- incompatible_axis_unit
- missing_required_projection
- unresolved_reference_context
- invalid_direct_coordinate_comparison
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
"coordinate system" ~= "coordinate framework" WHEN defining positional axes
"coordinate axis" ~= "axis" WHEN context = coordinate_system
"coordinate tuple" ~= "coordinate" WHEN tuple represents one spatial position
"projected coordinate system" ~= "projected CRS component" ONLY WHEN reference semantics match
"geographic coordinate system" ~= "geodetic coordinate system" WHEN geodetic semantics apply
PRESERVE distinctions:
coordinate_system != coordinate_reference_system
coordinate_system != datum
coordinate_system != projection
coordinate != coordinate_system
axis_order != axis_direction
unit_conversion != coordinate_transformation
# ---------- CONFIDENCE ----------
CONFIDENCE:
explicit_coordinate_system:
score: 1.00
explicit_axis_definition:
score: 1.00
explicit_reference_identifier:
score: 1.00
validated_coordinate_transformation:
score: 0.95
inferred_axis_order:
score: 0.75
inferred_coordinate_system:
score: 0.70
ambiguous_reference_context:
score: <= 0.60
action: preserve uncertainty
# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
on_axis_change:
- preserve previous axis definition
- update coordinate interpretation rules
- revalidate stored coordinates
- update provenance
on_unit_change:
- preserve original units
- transform values where valid
- revalidate coordinates
- record conversion provenance
on_datum_change:
- preserve original datum
- require valid transformation
- transform affected coordinates
- revalidate spatial relationships
- update provenance
on_projection_change:
- preserve original projection
- recalculate projected coordinates where required
- preserve source geographic coordinates
- update provenance
# ---------- FLOW HASH ----------
FLOW_HASH:
inputs:
- ontology
- coordinate_system_entities
- relationships
- dimension_rules
- axis_rules
- transformation_rules
- validation
- semantic_equivalence
- confidence
- update_model
canonicalisation:
- normalise_whitespace
- preserve_case_sensitive_identifiers
- sort_unordered_property_sets
- preserve_rule_order
output:
deterministic_semantic_hash
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpret_as:
- coordinate ontology
- spatial reference model
- coordinate validation model
- transformation reasoning structure
operations:
- identify coordinate systems
- interpret coordinate tuples
- resolve axes
- resolve units
- validate dimensions
- determine coordinate compatibility
- transform coordinates
- distinguish datum and projection semantics
- preserve provenance
- expose uncertainty
constraints:
- do_not_assume_axis_order_without evidence
- do_not_assume_units_without evidence
- do_not_assume_datum_without evidence
- do_not_compare_incompatible_coordinates directly
- do_not_discard_original_coordinates_after transformation
- preserve coordinate-system semantics
# ---------- QUERY MODEL ----------
query:
input:
- coordinate
- coordinate_system
- axis
- unit
- datum
- projection
- target_coordinate_system
resolve:
1. identify CoordinateSystem
2. resolve dimensions
3. resolve axes and axis order
4. resolve units
5. resolve origin and orientation
6. resolve datum where applicable
7. resolve projection where applicable
8. determine transformation requirements
9. validate result
output:
- interpreted_coordinate
- coordinate_system
- reference_context
- compatibility_state
- transformation_path
- confidence
- provenance
# ---------- INFERENCE ----------
inference:
IF coordinate has explicit system identifier
THEN resolve CoordinateSystem
WITH confidence = 1.00
IF axes, units, datum, and projection uniquely identify system
THEN infer CoordinateSystem
WITH confidence >= 0.90
IF source and target systems differ only by compatible units
THEN infer unit_conversion_required
IF source and target systems differ in spatial reference semantics
THEN infer coordinate_transformation_required
IF reference context remains ambiguous
THEN do_not_force_coordinate_system_resolution
AND preserve candidate interpretations
# ---------- OUTPUT CONTRACT ----------
output:
ontology_entity: CoordinateSystem
coordinate_structure: machine_interpretable
dimensions: explicit
axes: explicit
units: explicit
spatial_reference_context: preserved
transformations: traceable
provenance: preserved
uncertainty: explicit
semantic_retrieval: enabled
end flow
Download Code
Copy to Clipboard