跳转至
🎉 Apache Sedona 1.9.1 已正式发布!🗺️ 新增 Geography SQL 函数、Box2D 与 Box3D 类型、栅格 Python UDF 等。查看发布说明 →

RS_GeoTransform

Introduction: Returns a struct of parameters that represent the GeoTransformation of the raster. The struct has the following schema:

  • magnitudeI: size of a pixel along the transformed i axis
  • magnitudeJ: size of a pixel along the transformed j axis
  • thetaI: angle by which the raster is rotated (Radians positive clockwise)
  • thetaIJ: angle from transformed i axis to transformed j axis (Radians positive counter-clockwise)
  • offsetX: X ordinate of the upper-left corner of the upper-left pixel
  • offsetY: Y ordinate of the upper-left corner of the upper-left pixel

Note

Refer to this image for a clear understanding between i & j axis and x & y-axis.

Format: RS_GeoTransform(raster: Raster)

Return type: Struct<Double, Double, Double, Double, Double, Double>

Since: v1.5.1

SQL Example

SELECT RS_GeoTransform(
        RS_MakeEmptyRaster(2, 10, 15, 1, 2, 1, -2, 1, 2, 0)
       )

Output:

{2.23606797749979, 2.23606797749979, -1.1071487177940904, -2.214297435588181, 1.0, 2.0}