Diagnose a refused transform or failed coordinate#

Start with where the symptom appeared: while creating a transform, submitting device work, or inspecting returned coordinates.

Creation failed#

Symptom

Check

Invalid CRS

Check the CRS definition.

Valid pair, unsupported route

Inspect operation admission. A direct projection plan can refuse a pair that requires per-point choice. Check whether the general Transformer supports that selection.

Missing grid

Check the local resource directory for the named resource.

Minimum-version exception

Check the loaded PROJ runtime version.

Device submission was rejected#

For a buffer error, inspect the named descriptor, its capacity, memory context and overlap. If CUDA is unavailable, inspect which native payload was selected. To verify that payload with a device transform, follow Install Proj for your CUDA version.

A returned row failed#

Retain input indices and request both statuses and optional failure causes. This candidate batch includes a control at longitude 3°, latitude 0° and a second row whose latitude exceeds the geographic range.

import numpy as np
from cugeo.proj import Transformer

x = np.array([3.0, 3.0])
y = np.array([0.0, 95.0])

with Transformer.from_crs("EPSG:4326", "EPSG:32631", always_xy=True) as transformer:
    out_x, out_y, status, cause = transformer.transform(
        x, y, return_status=True, return_failures=True
    )

for i in range(len(x)):
    print(i, (x[i], y[i]), (out_x[i], out_y[i]), status[i], cause[i])

Check the first row for an OK status and coordinates near (500000, 0) metres. Use the second row’s observed status and cause to decide whether to correct the source row and retry.

For OUT_OF_DOMAIN, distinguish an operation boundary, grid extent, grid nodata and an implementation limit. Investigate a grid only if the route has a grid stage. A reference PROJ calculation can return a finite value beyond a cuGeo implementation limit. For the meaning of a specific exception, enum name or ABI code, see Errors and per-point statuses.