E4 ยท Publication Volume 26

Geometry and Coordinate Precision

points, lines, polygons, 3D coordinates and precision

Learning objectives

  • Explain the decision and evidence boundary for points, lines, polygons, three-dimensional coordinates and precision.
  • Select and implement the relevant representation or algorithm without hidden coordinate, support or topology assumptions.
  • Separate exact predicates, approximation error, source uncertainty and visual delivery.
  • Produce a coordinate-precision contract with local-origin and quantisation tests from synthetic evidence.

The lesson is complete only when the learner can defend the representation, transform, predicates, tests and release decision. A visually clean map or 3D scene without executable invariants and provenance remains unverified.

This is a general, institution-neutral tutorial with no relationship to any company or individual. All coordinates, geometries, grids, points, surfaces, volumes, attributes and review events in the lesson are synthetic and must not be used for an operational decision.

Decision context

The first decision is what a coordinate means and how much geometric distinction the representation must preserve. A tuple of numbers is not a point until its coordinate reference, axis order, units, dimensionality, epoch where relevant, vertical reference and precision policy are declared. Storage type, displayed decimals, measurement accuracy and computational resolution are different properties. Processing is blocked when an unresolved axis, unit or reference can translate, rotate, reflect or rescale the geometry.

Write the intended use, consequence of error, required evidence, spatial support and release authority before selecting a representation or transformation. Fitness is evaluated against a versioned contract and use, not attached permanently to a file extension.

Core concept

Geometry combines coordinates with primitive structure. A line is an ordered sequence, not an unordered point set; a polygon ring carries closure and orientation; a three-dimensional point may have the same numeric ordinates as a two-dimensional point plus an unrelated attribute but not the same semantics. Canonicalisation maps declared source coordinates into one working frame while retaining the source tuple and transform. For large world coordinates, subtracting a documented local origin before sensitive calculations can preserve small differences, but the origin must be restored exactly for exchange.

Keep received evidence, accepted analytical views and derived representations as distinct objects. This allows corrected evidence, a changed transform or a new level of detail to generate a new result without rewriting history. Every coordinate and primitive therefore answers both a spatial question and a provenance question.

Algorithm and data model

Represent every coordinate array with an immutable coordinate contract and an explicit transform into computation space. The contract contains scalar type, scale and offset when integers encode coordinates, valid numeric range, missing-value policy and whether repeated closure vertices are structural or redundant. Compute predicates in a frame suited to their scale, and return the predicate result together with the frame and numerical method. Never round coordinates merely to make apparently duplicate vertices equal; derive a snapped view under a named tolerance and preserve the unsnapped source.

Define parsing, semantic validation, canonicalisation, indexing, exact or approximate calculation, quality evaluation and encoding as separate stages. Each stage emits structured output and does not depend on interface state, file order, graphics-driver behaviour or undocumented defaults.

Constraints and invariants

| Invariant | Executable or review test | | --- | --- | | Every coordinate array declares reference, axes, units, dimensions and scalar encoding. | Reject or quarantine the exact affected object and preserve the received representation. | | Non-finite ordinates are never accepted as ordinary geometry. | Evaluate this condition before creating a derived geometry, grid, surface or volume. | | Precision-changing transforms report measured displacement and affected primitives. | Record the predicate, tolerance policy, observed values and coordinate frame. | | Source coordinates and local-origin or quantised derivatives remain distinct versions. | Make every repair a new version and rerun all dependent golden cases. |

An invariant must survive import, transformation, processing, export and rerun. A failed hard invariant produces no apparently valid substitute. Diagnostics remain visible with predicate, threshold, coordinate frame, scope and evidence, and require a reviewed rule before they can trigger repair.

Quantitative reasoning

For grid quantisation step q, independent rounding places each coordinate within q/2 of its source, so the worst Euclidean displacement in d dimensions is \sqrt{d}q/2. The two-dimensional orientation determinant is \operatorname{orient2d}(a,b,c)=(b_x-a_x)(c_y-a_y)-(b_y-a_y)(c_x-a_x). Its sign, not a rounded slope, decides left, right or collinear. Report the minimum non-zero vertex separation, coordinate magnitude, local extent, quantisation step and observed round-trip displacement. Test translation by a large origin, axis permutations, unit scaling, signed zero, non-finite values and nearly collinear triples.

Every metric includes units, support, numerator and denominator where applicable, exclusions, comparison policy and evaluation version. Aggregate metrics are stratified when pooling can hide local geometry failure. A performance gain cannot overrule invalid topology, missing reference metadata or broken lineage.

Evidence and uncertainty

Keep acquisition uncertainty, interpretation uncertainty, discretisation error, numeric round-off and delivery error separate. Increasing coordinate digits or triangle count does not improve the original evidence. A sampled surface may be smooth and watertight while remaining poorly constrained between observations. Report uncertainty in the quantity and support to which it belongs.

Build an evidence packet containing immutable received objects, semantic declarations, validation findings, transform inputs and outputs, measured errors, test results, reviewer decisions and fingerprints. Contradictory evidence remains available. When a required reference, topology state or classification cannot be resolved, return unknown, conflict or blocked rather than inventing geometry.

Interfaces and storage

Interfaces transmit identity, coordinate reference, units, axis order, support, topology expectations, attribute association, null state, version and lineage beside coordinates. Structured errors identify the object, primitive, predicate, observed value, expected condition and rule. An interface that carries vertices but drops the transform or face orientation has not preserved the object.

Store authoritative received evidence separately from reproducible analytical derivatives and disposable delivery artefacts. Indexes, caches, pyramids and render meshes improve access but cannot become the only copy of source attributes or coordinate metadata. Round-trip tests verify identity, precision, topology, ordering, missingness and association after encoding changes.

Governance and review

Assign responsibilities to roles rather than named organisations or people: evidence custodian, representation author, algorithm maintainer, independent validator and release reviewer. A role may propose a repair but cannot erase the received geometry. Transform, predicate and tolerance changes are versioned and evaluated against fixed regression fixtures before release.

Exceptions are explicit decisions with scope, rationale, evidence, approving role, affected versions and review trigger. They never turn invalid topology into valid topology by label. The host website has no ownership or scientific-authority role in this workflow; it only delivers the tutorial.

Integration checkpoint

a coordinate-precision contract with local-origin and quantisation tests
a coordinate-precision contract with local-origin and quantisation tests

Read the figure as a reasoning map from preserved evidence through declared support and coordinates, controlled transformation, validation and scoped release. Each arrow represents a declared relationship. Integrate a coordinate-precision contract with local-origin and quantisation tests into SYN-SPATIAL, rerun earlier fixtures and record every changed assumption.

Synthetic worked example

Synthetic line SYN-L01 contains points near coordinates (700000.000, 6200000.000) m separated by millimetres. Converting directly to a low-precision display buffer collapses two vertices and changes the orientation of an adjacent triangle. The controlled workflow preserves double-precision world coordinates, defines a local origin at (700000, 6200000) m for computation and creates a separately versioned, quantised render buffer. The analytical orientation test and length remain stable; the delivery derivative records its maximum 0.9 mm displacement and is prohibited from becoming the analytical source.

  1. Preserve the received object and state the intended decision without repair.
  2. Resolve identity, reference, units, support, topology and evidence eligibility.
  3. Run the versioned transform or predicate while retaining intermediate diagnostics.
  4. Issue accept, reject or quarantine and show how an independent reviewer reproduces it.

Practice task

Implement the chapter artefact against a synthetic fixture containing one normal case, one boundary case, one invalid case and one unresolved-evidence case. Preserve the received fixture. Produce canonical input, validation findings, derivative output, processing manifest, measured error and a short release decision.

Acceptance criteria:

  • Every required identity, coordinate reference, unit, support and convention is explicit.
  • The implementation is deterministic under stable ordering and the declared numerical policy.
  • No repair overwrites received evidence or converts unknown into a guessed value.
  • All hard failures block the affected derivative and remain machine-readable.
  • A second implementation or reviewer can reproduce the result from the package alone.

Submit a coordinate-precision contract with local-origin and quantisation tests, golden and adversarial fixtures, exact findings, measured error and a limitations note. A screenshot is not sufficient evidence because it does not identify input versions, transforms, algorithms or rule configuration.

Common failure modes

  • Inferring coordinate accuracy from the number of printed decimals.
  • Casting large coordinates to low precision before subtracting a local origin.
  • Using one universal epsilon for metres, angles, indices and dimensionless predicates.
  • Silently snapping vertices until an invalid object appears valid.

These failures share a pattern: implicit convenience is substituted for evidence. Diagnose the earliest boundary where the assumption entered, restore the source statement, make the transform or predicate explicit, rerun all dependent derivatives and supersede rather than overwrite the affected release.

Review questions

  1. Why are displayed decimals different from measurement accuracy?
  2. What error bound follows from a coordinate quantisation step?
  3. When does a local origin improve computation without changing meaning?
  4. Why should orientation use a predicate rather than a rounded slope?

For every answer, identify the governing invariant, evidence needed to evaluate it, numerical or semantic policy involved and correct behaviour when the condition fails.

Sources and further reading