v.20.5Experimental Feature

Add Point and Polygon Data Types to ClickHouse

Add data type Point (Tuple(Float64, Float64)) and Polygon (Array(Array(Tuple(Float64, Float64))). #10678 (Alexey Ilyukhov).
Introduces new geometric data types Point and Polygon for representing spatial coordinates and shapes using tuples and arrays of tuples.

Why it matters

These new data types enable efficient storage and manipulation of spatial data within ClickHouse, allowing users to handle geometric points and polygons natively. This simplifies working with spatial data for applications such as location-based analytics and geographic information systems.

How to use it

Use the Point data type as a Tuple(Float64, Float64) to represent a coordinate pair (x, y). Use the Polygon data type as an Array(Array(Tuple(Float64, Float64))) to represent polygons, where each inner array represents a ring of points. Define columns with these types when creating tables to store geometric data.