corners_from_p6

geodetic_engine.bingrid.corners_from_p6(parameters, *, inline_range, crossline_range)[source]

The four corners of a grid defined by its P6 parameters.

This is the four-point definition of a grid the P6/11 method defined, as the SDU note requires to be stored alongside it.

Parameters:
  • parameters (P6Parameters) – The grid.

  • inline_range (tuple[int, int]) – Minimum and maximum inline number of the corners.

  • crossline_range (tuple[int, int]) – Minimum and maximum crossline number of the corners.

Return type:

BinGridCorners

Returns:

The corners, at the map grid coordinates the parameters give them.

Raises:

InvalidCornersError – If a range is not two integers, minimum first, or spans a number of inlines or crosslines that is not a multiple of the grid’s node increment, so that its ends cannot both be nodes.