﻿# Generated trajectories need the axis order expected by pyproj

A practical investigation of generated trajectories need the axis order expected by pyproj, with explicit observations, control cases and evidence limits.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/field-synthetic-pyproj-axis-order-generated-trajectory/
Language: en

## The generated-data scenario

A generator creates geographic trajectories as longitude and latitude columns. An adapter passes them to a coordinate transformer that follows a different CRS axis order. The projected positions can remain numeric and draw a smooth path while representing the wrong location. The acceptance question is whether column meaning matches the selected transformation interface, not whether the output has the expected shape or looks like a plausible trajectory.

## The generation mechanism

Pyproj warns that axis order can differ according to the coordinate reference system. Its always_xy option uses the traditional GIS convention of longitude then latitude for geographic coordinates and easting then northing for most projected systems. This controls interpretation at the interface; it does not infer the actual meaning of arbitrary columns. A transformation can be mathematically consistent while the caller supplies coordinates in the wrong order.

## Define the dataset contract

Define the source CRS, destination CRS, units and ordered meaning of every coordinate field. Record whether the adapter uses CRS-native order or the explicit always_xy convention. Do not use column names x and y without their declared semantics. Keep temporal sampling and any speed constraint separate from spatial transformation. A smooth or slow-looking path can be wrong geographically, so a kinematic plausibility check cannot substitute for coordinate interpretation.

## A step-by-step protocol

First inspect the generator schema and transformer construction. Use invented non-symmetric coordinate pairs within the intended area, so exchanging axes does not accidentally leave the control unchanged. Compare the declared transform with an intentionally swapped-input case. Check known reference locations or independently justified expected relationships, then export and reload through the actual student loader. A round trip through the same wrong convention alone is not sufficient to establish correct source meaning.

## Evidence required for acceptance

Acceptance evidence includes CRS definitions, axis convention, units, transform settings and post-load coordinate assertions. A negative fixture should expose a swapped-axis path even when all coordinates are finite and the trajectory remains visually smooth. Preserve the applied conversion rather than relabeling transformed values as if the generator originally emitted them. If the selected operation depends on additional transformation resources, inventory them as part of the reviewed conversion path.

## Failure cases and limits

This protocol does not claim physical feasibility, geographic coverage or realistic movement distribution. Projection distortion and available transformation operations can impose further limits. It also does not make every projected unit a safe distance measure for every region. The bounded result is an explicit generator-to-transform axis contract, preventing numeric success from hiding a location error before downstream trajectory or sensor tasks consume the synthetic data.

## Primary references and related reading

Record CRS and axis order together; always_xy is an interface convention that must match the generated columns. [pyproj coordinate axis order and always_xy contract](https://pyproj4.github.io/pyproj/stable/api/transformer.html); [pyproj CRS preservation and axis-order changes](https://pyproj4.github.io/pyproj/stable/gotchas.html).

The proposed investigation of pyproj axis order generated trajectory is a proposed dataset-contract review; no production dataset was generated or evaluated. Related reading: [Argoverse sensor coordinates: supplied lidar points are already in the ego frame](/journal/fg2-argoverse2-city-ego-lidar-frame-double-extrinsic/); [Pillow EXIF orientation: transform image annotations with the pixels](/journal/data-guide-image-exif-box-coordinate/).
