Linearization/Delinearization, Z-Order, Hilbert and Morton Curves
Maintainer(s):
rustyconover
Installing and Loading
INSTALL lindel FROM community;
LOAD lindel;
About lindel
For more information regarding usage, see the documentation.
Added Functions
| function_name | function_type | description | comment | examples |
|---|---|---|---|---|
| hilbert_decode | scalar | Decodes a Hilbert-encoded unsigned integer back into an array of values. The number of output elements and their type are determined by the parameters. | NULL | [hilbert_decode(123::UBIGINT, 2, false, true)] |
| hilbert_encode | scalar | Encodes an array of integers or floats into a single unsigned integer using Hilbert curve mapping. Hilbert curves preserve locality better than Morton encoding, making them ideal for spatial indexing. | NULL | [hilbert_encode([1, 2, 3]::INTEGER[3])] |
| morton_decode | scalar | Decodes a Morton (Z-order) encoded unsigned integer back into an array of values. The number of output elements and their type are determined by the parameters. | NULL | [morton_decode(123::UBIGINT, 2, false, true)] |
| morton_encode | scalar | Encodes an array of integers or floats into a single unsigned integer using Morton (Z-order) curve mapping. Morton encoding interleaves bits and is computationally simpler than Hilbert encoding. | NULL | [morton_encode([1, 2, 3]::INTEGER[3])] |
Overloaded Functions
| function_name | function_type | description | comment | examples | |—————|—————|————-|———|———-|
Added Types
| type_name | type_size | logical_type | type_category | internal | |———–|———-:|————–|—————|———-|
Added Settings
| name | description | input_type | scope | aliases | |——|————-|————|——-|———|