16.20 - Return Value - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Geospatial Data Types

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1181-162K
Language
English (United States)

The cell ID that is returned is an INTEGER value that codes for the cell number and level. The upper 28 bits identifies the cell number, and the lower four bits identifies the level.



To derive the cell number from the returned cell ID value using SQL, use:

return_value  / 16

To derive the level from the returned cell ID using SQL, use:

return_value  MOD 16

Here is an example that shows the cell numbering of a single-level grid (of unspecified size) that contains 16 cells.