Class: GSfc4qLbl

GSfc4qLbl(level, base, id0, id0_maxBits)

Labeled GSfc4q. Uses a SizeBigInt to express GSfc4q keys as human-readable hierarchical codes. Also extends internal representation to unically identify keys of multiple grids, concatenating the ID0 of the grid. Provides method chaining for set ID.

Constructor

new GSfc4qLbl(level, base, id0, id0_maxBits)

Parameters:
Name Type Description
level float

hierarchical level of aperture-4 hierarchical grid. Valid integer and "half levels".

base string

the abbreviation of name of standard base (2, 4js, 4h, 16h, 32ghs, etc.)

id0 string

grid ID used as prefix in the cell ID.

id0_maxBits string

maximum number of bits in an ID0.

Source:

Methods

id_toString(otherbase) → {string}

Labelling. Assignment of human-readle and hierarchical label for a cell of the grid. ... CHECK BUG: not returning correct number of bits (start-padding zeros) Provides a standard base-encoded (String) representation of the (BigInt) cell identifier (ID). The ID is obtained by setID chaining methods.

Parameters:
Name Type Default Description
otherbase string null

none (standard) or other base.

Source:
Returns:
  • the human-readable ID.
Type
string

key_toString(otherbase)

Returns string representation of a key. STUB method.

Parameters:
Name Type Default Description
otherbase int null

null or base label (e.g. "16h").

Source:

setBkey()

Set by bkey.

Parameters:
Name Type Description
bkey. bigint
Source:

setBkey_byIJ(i, j)

Set ID by (i,j) or array IJ. Numbers, not BigInt's.

Parameters:
Name Type Description
i int

array or Integer X coordinate (scan columns from left to right).

j int

Integer Y coordinate (scan lines from bottom to up).

Source:

setId(id)

Set ID by ID.

Parameters:
Name Type Description
id bigint

the cell ID. Int or BigInt.

Source:

setId0(id0, id0_maxBits)

Set ID0. Must be used before setId().

Parameters:
Name Type Description
id0 int

grid ID used as prefix in the cell ID.

id0_maxBits int

optional, maximum number of bits in an ID0.

Source:

setID_byKey(key)

Set ID by key.

Parameters:
Name Type Description
key bigint

Int or BigInt.

Source:

setKey()

Set by key.

Parameters:
Name Type Description
key. bigint
Source: