ST_Square — 使用提供的边缘大小和正方形网格空间内的单元格坐标返回单个正方形。
geometry ST_Square(
float8 size, integer cell_i, integer cell_j, geometry origin='POINT(0 0)')
;
使用与ST_SquareGrid相同的正方形格网概念,但仅在所需的单元格坐标处生成一个正方形。(可选)可以调整平铺的原点坐标,默认原点为 0,0。
Squares are generated with the SRID of the given origin. Use ST_SetSRID to set the SRID if the given origin has an unknown SRID (as is the case by default).
可用性:3.1.0
SELECT ST_AsText(ST_SetSRID(ST_Square(1.0, 0, 0), 3857)); POLYGON((0 0,0 1,1 1,1 0,0 0))