ST_TransScale — 按给定的偏移和因子平移和缩放几何图形。
geometry ST_TransScale(
geometry geomA, float deltaX, float deltaY, float XFactor, float YFactor)
;
使用增量X和增量Y参数转换几何图形,然后使用仅在二维中工作的X系数和Y系数参数对其进行缩放。
![]() | |
|
![]() | |
在1.3.4之前的版本中,如果与包含曲线的几何体一起使用,此函数会崩溃。这在1.3.4+中已修复 |
可用性:1.1.0。
This function supports 3d and will not drop the z-index.
This method supports Circular Strings and Curves
SELECT ST_AsEWKT(ST_TransScale(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), 0.5, 1, 1, 2)); st_asewkt ----------------------------- LINESTRING(1.5 6 3,1.5 4 1) --Buffer a point to get an approximation of a circle, convert to curve and then translate 1,2 and scale it 3,4 SELECT ST_AsText(ST_Transscale(ST_LineToCurve(ST_Buffer('POINT(234 567)', 3)),1,2,3,4)); st_astext ------------------------------------------------------------------------------------------------------------------------------ CURVEPOLYGON(CIRCULARSTRING(714 2276,711.363961030679 2267.51471862576,705 2264,698.636038969321 2284.48528137424,714 2276))