BinGridResult

class geodetic_engine.bingrid.BinGridResult[source]

Bases: object

A bin grid checked, optionally converted, and squared up.

source_crs

CRS the input corners are in.

crs

CRS of the converted and squared grid: the target CRS if one was given on another map grid, or a bound one on the same map grid; else the source CRS.

input_corners

The corners as given.

converted_corners

The input corners converted to crs, before squaring; None when no conversion was applied.

squaring

The rectangle fitted in crs, and the mis-location.

outline

Outline of the squared corners in crs.

wgs84_corners

Longitude and latitude of the squared corners, in order A, B, C, D; None when WGS 84 coordinates were not asked for.

wgs84_outline

The ring of outline through wgs84_corners, or None. Each edge runs the short way round in longitude: across the antimeridian the longitudes continue past 180 (-179.9 becomes 180.1), and a ring round a pole closes along the pole’s latitude through two points labelled "pole".

conversion

The conversion to crs, or None.

wgs84_conversion

The conversion to WGS 84, or None.

property parameters: P6Parameters

The P6 parameters of the squared grid, anchored at corner A.

property squared_corners: BinGridCorners

Corners of the squared grid in crs.

property max_mislocation: MaxMislocation

How far the corners were from a rectangle, in crs.

property converted: bool

Whether the corners were converted to another CRS.

property linear_unit: str

Unit of crs’s coordinates and of the bin widths.

applied_operations()[source]

What was done to the corners, one sentence per step, in order.

Return type:

tuple[str, ...]

to_json_dict()[source]

Render the result as plain data, for logging or serialisation.

Return type:

dict[str, Any]

__init__(source_crs, crs, input_corners, converted_corners, squaring, outline, wgs84_corners, wgs84_outline, conversion, wgs84_conversion)