Coordinate systems and operation selection#

Use these lookups to construct a CRS, select an operation, and reproduce that selection. For complete Python signatures and other Python objects, see Python API.

CRS definitions and exports#

Call or property

Behavior

CRS.from_epsg(code) or CRS.from_authority(auth_name, code)

Construct from an EPSG or other authority identifier.

CRS.from_wkt(wkt)

Construct from WKT. Coordinate metadata containing an epoch is refused here. Supply an epoch during operation selection.

CRS.from_proj4(text) or CRS.from_string(text)

Construct from PROJ text or another accepted definition string.

CRS.from_dict(initialdata=None, **kwargs)

Construct from a mapping of parameters or a PROJJSON definition.

CRS.from_user_input(value, *, memory_budget_bytes=None, retained_input_bytes=0)

Accepts supported definitions and CRS objects. An existing CRS is returned unchanged. For a foreign object, to_wkt is called once and must return text.

Metadata and equality

Inspect axes, units and component CRSs. equals(other) preserves declared axis order. CRS objects are immutable and unhashable. Serialize calls sharing one value.

to_authority() or to_epsg()

Identification uses confidence_threshold=70 by default.

to_wkt(version=None)

Defaults to WKT1_GDAL. WKT2_2015 and WKT2_2019 are available. Export checks for semantic loss.

to_wkt_into(buffer=None, *, version=None)

Reports required UTF-8 bytes including the terminating NUL. Supplied storage must be writable and C-contiguous. A short buffer raises BufferError without writes.

to_dict(projjson=False) or to_proj4()

The legacy mapping is explicitly lossy. PROJ text can also lose modern metadata and axes. projjson=True returns fresh PROJJSON. Check the representation before relying on a round trip.

Native CRS calls

The CRS header specifies string sizing, optional retained preparation storage and native ownership. See Native API and device interchange.

Columns and selection#

Input or call

Behavior

Transformer.from_crs(source, target, *, always_xy=True, area_of_interest=None, resource_directory=None, operation=None, epoch=None, reference_epoch=False, device_resource=None)

Source and target accept a CRS, integer or text definition. Selection chooses a supported route. It does not provide an arbitrary CUDA PROJ fallback.

always_xy

Defaults to True. For EPSG:4326, (3, 0) with XY order and (0, 3) with always_xy=False describe the same point in longitude/latitude and native latitude/longitude order respectively.

Dimensions

dimensions reports 3 when both CRSs are 3D, otherwise 2. Supply the required number of ordinates to the transform call.

area_of_interest

West, south, east and north in degrees.

resource_directory

Supplies the grid resource directory used for selection.

operation

Pins an authority operation or candidate.

epoch or reference_epoch

Select a decimal-year epoch or reference epoch. An authority definition such as EPSG:9989@2020.0 contributes a definition epoch applying to every row. Conflicting epochs raise InvalidArgumentError.

Records and admission#

Call or field

Behavior

Resolution.resolve(source, target, *, area_of_interest=None, resource_directory=None, operation=None, epoch=None, reference_epoch=False)

Resolves a selection before row execution.

explain() or prepared_explain()

Explain the selected route and the prepared route respectively. Selected and prepared stages need not be described at the same phase. row_choice is a prepared/explanation concept and is optional in a saved record.

record() or Resolution.from_record(record, *, resource_directory=None)

Export and verify a selection for replay. Schema 3 contains schema_version, request, source_crs, target_crs, operation, grids, resource_directory_grids, epoch, database, and pick_region. Grid entries contain name and sha256.

Record request and operation

request contains source, target, area_of_interest, epoch, and pinned. operation contains rank, name, identifier, definition, stages, steps, and accuracy_metres. The instantiated CRS definitions, epoch, selected operation and pick_region support verification before rows run.

Transformer.to_record() or Transformer.from_record(record, *, resource_directory=None, always_xy=None, device_resource=None)

Transformer records add always_xy. Replay verifies and preserves the saved axis choice. A bare resolution record defaults to XY, and an explicit override is allowed.

Transformer.from_resolution(resolution, *, always_xy=True, device_resource=None)

Borrows the resolution owner. Keep it open while the transformer uses it.

Admission and row choice

A prepared single choice may refuse a row outside its region. Direct projection plans reject per-point alternatives. General transformers can admit supported multi-choice routes. For exact profiles, directions and bounds, see Supported coordinate operations.

See the resolution record implementation and Python resolution interface for the exported fields and calls.

Rectangle certification#

Query or outcome

Behavior

cugeo_proj_host_transform_certify_rectangle(transform, min_first, min_second, max_first, max_second, error)

Certifies the closed rectangle in the selected executor’s input axes and units. An inverse host transform reuses the same selection.

SUCCESS

Establishes continuity across the rectangle when enclosure succeeds for selected noop, regular WGS84 UTM or spherical Web Mercator stages and supported surrounding axis/unit steps. It does not establish a full-rectangle accuracy promise.

INVALID_ARGUMENT

Bounds are nonfinite or reversed, or the transform is 3D.

UNSUPPORTED

A stage, domain or enclosure cannot be proved, or selection varies per row. A refusal is conservative.

Output

This host metadata query transforms no rows, produces no envelope and performs no CUDA work. Successful corner transforms establish only those individual rows. Continuity over the rectangle remains unestablished.

The native declaration is in resolution.h.