ST_TransScale — Translates and scales a geometry by given offsets and factors.
geometry ST_TransScale(geometry geomA, float deltaX, float deltaY, float XFactor, float YFactor);
Translates the geometry using the deltaX and deltaY args, then scales it using the XFactor, YFactor args, working in 2D only.
|
|
|
|
|
|
|
Prior to 1.3.4, this function crashes if used with geometries that contain CURVES. This is fixed in 1.3.4+ |
Availability: 1.1.0.
Questa funzione supporta il 3d e non distrugge gli z-index.
Questo metodo supporta le Curve e le Circular String.
SELECT ST_AsEWKT(ST_TransScale(ST_GeomFromEWKT('LINESTRING(1 2 3, 1 1 1)'), 0.5, 1, 1, 2));
LINESTRING(1.5 6 3,1.5 4 1)
This example buffers a point to approximate a circle, converts it to a curve, translates it by 1,2, and scales it by 3,4.
SELECT ST_AsText(ST_TransScale(ST_LineToCurve(ST_Buffer('POINT(234 567)', 3)),1,2,3,4));
CURVEPOLYGON(CIRCULARSTRING(714 2276,696 2276,714 2276))