cartodb-postgresql/doc/CDB_MakeHexagon.md

22 lines
426 B
Markdown
Raw Permalink Normal View History

2015-07-01 22:01:50 +08:00
Return an Hexagon with given center and side (or maximal radius)
#### Using the function
Running the following SQL
```sql
SELECT CDB_MakeHexagon(ST_MakePoint(0,0),10000000)
```
Would give you back a single hexagon geometry,
![hexagon](http://i.imgur.com/6jeGStb.png)
2015-07-01 22:03:13 +08:00
#### Arguments
2015-07-01 22:01:50 +08:00
CDB_MakeHexagon(center, radius)
* **center** geometry
* **radius** float. Radius of hexagon measured in same projection as **center**