Return the parent cell at the given coarser resolution. The static form takes a single quadbin; the temporal form returns the parent of each cell in a trajectory.
quadbinCellToParent(quadbin,integer) → quadbin
tquadbinCellToParent(tquadbin,integer) → tquadbin
SELECT quadbinCellToParent(quadbin '48a6227affffffff', 5); -- 485623ffffffffff SELECT tquadbinGetResolution( tquadbinCellToParent(tquadbin '48a6227affffffff@2001-01-01', 5)); -- 5@2001-01-01
Return the four child cells at the requested finer resolution as a quadbinset. This is a static set-returning helper on a single quadbin; it has no temporal lift (children are a per-instant set, deferred pending a tset<T> primitive).
quadbinCellToChildren(quadbin,integer) → quadbinset
SELECT quadbinCellToChildren(quadbin '480fffffffffffff', 1);
-- {4813ffffffffffff, 4817ffffffffffff, 481bffffffffffff, 481fffffffffffff}
Return the neighbouring cell at the same resolution in the given direction (up / down / left / right)
quadbinCellSibling(quadbin,text) → quadbin
SELECT quadbinCellSibling( quadbinCellSibling(quadbin '48427fffffffffff', 'right'), 'left') = quadbin '48427fffffffffff'; -- true
Return all cells within k grid steps of the origin (inclusive of the origin at k=0), as a quadbinset. On the square grid the disk at step k is the (2k+1)×(2k+1) square block of cells centred on the origin.
quadbinGridDisk(quadbin,integer) → quadbinset
SELECT numValues(quadbinGridDisk(quadbin '48a6227affffffff', 0)); -- 1 SELECT numValues(quadbinGridDisk(quadbin '48a6227affffffff', 1)); -- 9 SELECT numValues(quadbinGridDisk(quadbin '48a6227affffffff', 2)); -- 25