ST_PixelWidth — Gibt die Pixelbreite in den Einheiten des Koordinatenreferenzsystems aus.
double precision ST_PixelWidth(
raster rast)
;
Gibt die Pixelbreite in den Einheiten des Koordinatenreferenzsystems aus. Beim üblichen Fall ohne Versatz entspricht die Pixelbreite dem Maßstabsverhältnis zwischen den geometrischen Koordinaten und den Rasterpixel.
Das folgende Schema zeigt die Beziehungen:
SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth, ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy FROM dummy_rast; rastwidth | pixwidth | scalex | scaley | skewx | skewy -----------+----------+--------+--------+-------+---------- 10 | 2 | 2 | 3 | 0 | 0 5 | 0.05 | 0.05 | -0.05 | 0 | 0
SELECT ST_Width(rast) As rastwidth, ST_PixelWidth(rast) As pixwidth, ST_ScaleX(rast) As scalex, ST_ScaleY(rast) As scaley, ST_SkewX(rast) As skewx, ST_SkewY(rast) As skewy FROM (SELECT ST_SetSkew(rast,0.5,0.5) As rast FROM dummy_rast) As skewed; rastwidth | pixwidth | scalex | scaley | skewx | skewy -----------+-------------------+--------+--------+-------+---------- 10 | 2.06155281280883 | 2 | 3 | 0.5 | 0.5 5 | 0.502493781056044 | 0.05 | -0.05 | 0.5 | 0.5