17.10 - Tessellate_Search Syntax - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Geospatial Data Types

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)
Tessellate_Search (
  o_xmin, o_ymin, o_xmax, o_ymax
  u_xmin, u_ymin, u_xmax, u_ymax,
  g_nx, g_ny, levels, scale, shift

Syntax Elements

A key that is passed back in the result rows to allow joining back to the proper object.

The data type of in_key is DECIMAL(18,0) or VARCHAR(32). The data type of the argument you pass in determines the data type of the out_key column in the result row.

o_xmin, o_ymin, o_xmax, o_ymax
The coordinates of the object rectangle.

The data type of o_xmin, o_ymin, o_xmax, and o_ymax is FLOAT.

u_xmin, u_ymin, u_xmax, u_ymax
The coordinates of the universe of interest.

The data type of u_xmin, u_ymin, u_xmax, and u_ymax is FLOAT.

g_nx, g_ny
The number of grid cells to divide the universe into in the X and Y dimensions. The maximum number of grid cells is 228.

The data type of g_nx and g_ny is INTEGER.

If g_nx or g_ny is less than or equal to zero, Tessellate_Search returns an error.

The number of levels in the two-dimensional grid. There are always levels + 1 levels, where level 0 is the entire universe. Higher levels are more granular.

The data type of levels is INTEGER and the range of values is 1 to 15.

The scaling factor between grid levels. For example, if g_nx * g_ny is 100x100 and level is 2 and scale is 0.1, you have a 3 level grid (100x100, 10x10, 1x1).

The data type of scale is FLOAT.

The value of scale must be greater than 0.0 and less than 1.0.

A numeric value that represents the number of times to shift the grid at each level. If the value of shift is 0, the method performs no shifting. If the value of shift is 1, the method creates four grids for each level, where it shifts each of the four grids in a unique manner.

Shifting the grid helps to avoid assigning smaller spatial objects to large cells if they cross a grid cell boundary.

The data type of shift is INTEGER.