geodetic_engine.bingrid.matching

Find the stored bin grid a legacy seismic dataset is on.

An optional companion to the bin grid core, not re-exported by geodetic_engine.bingrid: import it from here.

Legacy datasets often arrive with only their own four corners, and the SDU note (“How to detect if a dataset is on an already defined bin grid”) asks that they be assigned to a grid already in the store rather than stored as yet another definition. Its algorithm, as implemented by match_bin_grid():

  1. Compute where each stored grid puts the dataset’s corner numbers, and the largest distance from those points to the dataset’s corner coordinates.

  2. Keep the grids within half a bin: half the smaller “real” spacing between the dataset’s loaded traces, which accounts for its node increments.

  3. Prefer, in order: a grid in the dataset’s own CRS, a grid stored at the dataset’s node increments, and the smallest distance.

The note allows one exception to comparing grids in the dataset’s own CRS: NAD27 coordinates in US survey feet against a grid stored in metres (EPSG:32065 against 26715, and 32066 against 26716). This module allows the general form of it – a stored grid in any projected CRS on the dataset’s datum, compared after an exact conversion – and never compares across a datum change, which would need a transformation that a match must not choose.

Functions

match_bin_grid

Find the stored grids a dataset is on, by the SDU note's algorithm.

Classes

BinGridMatch

A stored grid the dataset is on.

MatchResult

The stored grids a dataset is on, best first.

StoredBinGrid

A grid in a store of technically assured bin grids.