mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Update polygon.md
Add WKT function to documentation
This commit is contained in:
parent
ab3bb77ef8
commit
e1b2e0a00b
@ -4,6 +4,34 @@ sidebar_label: Polygons
|
||||
title: "Functions for Working with Polygons"
|
||||
---
|
||||
|
||||
## WKT
|
||||
|
||||
Returns a WKT (Well Known Text) geometric object from tuples which represent point coordinates.
|
||||
|
||||
**Syntax**
|
||||
|
||||
```sql
|
||||
WKT(points)
|
||||
```
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `points`: a [tuple](../../data-types/tuple.md) representing coordinate point (x, y) or an [array](../../data-types/array.md) of tuples, or an array of tuple arrays.
|
||||
|
||||
**Returned value**
|
||||
|
||||
WKT (Well Known Text) geometric object.
|
||||
|
||||
**Example**
|
||||
|
||||
```sql
|
||||
SELECT wkt([[(0., 0.), (10., 0.), (10., 10.), (0., 10.)], [(4., 4.), (5., 4.), (5., 5.), (4., 5.)]]);
|
||||
```
|
||||
|
||||
```response
|
||||
POLYGON((0 0,10 0,10 10,0 10,0 0),(4 4,5 4,5 5,4 5,4 4))
|
||||
```
|
||||
|
||||
## readWKTMultiPolygon
|
||||
|
||||
Converts a WKT (Well Known Text) MultiPolygon into a MultiPolygon type.
|
||||
|
Loading…
Reference in New Issue
Block a user