itacart.boundary
Boundary behaviour: prime meridian, antemeridian, extension zones.
This module is what makes the domain global, complete and unique, and so carries OGC DGGS Core requirements 8, 9 and 10 on its own.
Three departures from the uniform parallelogram grid are specified in section 3.2 of the paper:
Prime meridian. Cells straddling 0 degrees are isosceles triangles
whose base is twice their height, mirrored about the meridian. This
applies at resolution 1; finer resolutions subdivide the adjacent eastern
cells rather than creating separate western ones. Consequently
resolution-1 cells with X = 0 in the western quadrants do not exist.
Antemeridian. Uniform areas cannot be held everywhere at 180 degrees, so the eastern quadrants are extended over the inhabited landmasses that the meridian crosses: Fiji and the Chukotka/Wrangel group. Antarctica is excluded. Cells in the oceans and in Antarctica along that boundary therefore have unequal areas.
Trapezoids. Where a parallelogram vertex on the side opposite the prime meridian would cross a boundary line, that side is clipped to the line, extending the longer base into a trapezoid. The rule applies only to the cells in that condition, not to their subdivisions.
The model
Every cell has a nominal ring on the parallels plane – a parallelogram in the ordinary case, an isosceles triangle in the prime-meridian column – and an effective ring, which is the nominal one clipped to its quadrant’s domain. An eastern quadrant is bounded by the meridian its extension reaches: 180 degrees outside a zone, 182 or 190.5 degrees inside one. A western quadrant is bounded by the same line seen from the other side, so it gives up exactly what the eastern one gains. Both are bounded by the pole as well.
Clipping is the single mechanism. A cell exists when its clipped ring still has area; it is a trapezoid when the clip changed the ring; it honours the nominal area when the clip left it alone. Every predicate here is a reading of that one construction.
Triangle refinement
The children of a meridian triangle are triangles, at every resolution.
Figure 4(c) labels all 25 children of one triangle, and the arrangement
it draws is the ordinary grid folded onto itself about its diagonal:
child (row i, column j) sits in triangle row min(i, j), at
|i - j| steps east of the meridian when j >= i and the same
number of steps west when j < i. The diagonal children – A1,
B2, C3, D4, E5 – straddle the meridian and are
themselves isosceles triangles with base twice height, so the
construction is closed under refinement and no western cell is ever
created.
Module constants
Resolution-1 row span each zone is realized on, inclusive. |
Functions
Whether a cell's outer side has been carried onto the domain border. |
|
Geometric class of a cell. |
|
Refinement code of a child at one row and column. |
|
Row and column of a refinement code inside its parent, zero-based. |
|
Whether a geometry spans the 180th meridian. |
|
Geodetic bounds of an extension zone. |
|
Which extension zone contains a cell, if any. |
|
Which extension zone contains a geodetic position, if any. |
|
Whether a cell touches any grid discontinuity. |
|
Whether a cell honours the nominal area of its resolution. |
|
Whether a cell lies inside an eastern-quadrant extension. |
|
Whether a cell has been clipped at a boundary line. |
|
Whether a cell is a prime-meridian isosceles triangle. |
|
Whether a cell exists in the ITACaRT domain. |
|
Greatest column of a square lattice row that exists inside the border. |
|
Sub-row and signed offset of a child inside a prime-meridian triangle. |
|
Grid row and column of a child. |
|
Descend the prime-meridian column of one atomic index. |
|
Effective plane ring of one atomic cell, and the shape it takes. |
|
Unsigned area of a plane ring, in square metres. |
|
Area centroid of a plane ring, in metres. |
|
Invert a plane vertex, answering the pole itself at the quadrant. |