Skip to main content

Miscellaneous

migrate​

Converts a cell ID from the legacy v0 A5 index to the format supported by A5 v1+. The mapping is fast because it only operates on the bit representation. The shape and positions of the cells do not change, so there is no need to re-index data from its original coordinates.

Note this function will be retired in a future version, there is no plan to support the legacy v0 A5 index going forward

a5_migrate(cell UBIGINT) -> UBIGINT

Parameters​

  • cell (bigint) A cell ID from the legacy v0 A5 index

Return value​

  • (bigint) The ID of the same cell in the v1 index

Example​

-- Resolution 8 cell in the legacy v0 A5 index
SELECT a5_u64_to_hex(a5_migrate(a5_hex_to_u64('59c4780000000000'))); -- '59c4280000000000'