1

I am just wondering what the exact function of skewX and skewY in raster constructors is. According to the documentation linked:

ST_MakeEmptyRaster — Returns an empty raster (having no bands) of given dimensions (width & height), upperleft X and Y, pixel size and rotation (scalex, scaley, skewx & skewy) and reference system (srid).

It seems that altogether (scalex, scaley, skewx & skewy) defines rotation. But obviously, scalex and scaley also defines the scale operation. This makes me wonder what exactly do these four parameters define.

Is the defined function/transformation equivalent to an affine transformation?

If it's just rotation and scaling, wouldn't it be more efficient to use scalex, scaley and the angle of rotation, e.g. theta?

  • Theta does not handle the case when skewx must be different from skewy, I suppose. – user30184 Jan 17 '16 at 10:21
  • @user30184 I am not sure. scalex and scaley can also account for the difference in the x and y direction. So what do skew{x/y} handle, do you know how they are defined in terms of trigonometry? – tinlyx Jan 17 '16 at 11:33
  • Just guessing but perhaps rotation is not involved but "shear" like in this image en.wikipedia.org/wiki/Affine_transformation#/media/…. – user30184 Jan 17 '16 at 16:37
1

After rotating a raster, the pixelwidth (x) given is not the real pixelwidth anymore but consists of a vector in x direction (scale) and a vector in y direction (skew). There is a good picture (and somewhat difficult explanation) given over here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.