RT_CellSizeX takes a raster column and returns a numeric value that represents the dimension on a raster cell in the horizontal direction (x-coordinate).
| Function | Syntax |
|---|---|
| Python | cell |
| SQL | RT |
| Scala | cell |
For more details, go to the GeoAnalytics Engine API reference for cell_size_x.
Examples
from geoanalytics.raster import functions as RT
data = [([1,2,3,4], )]
df = spark.createDataFrame(data, ["pixels"]) \
.withColumn("raster", RT.create_raster("pixels", 2, 2, "int32"))
df.select(RT.cell_size_x("raster").alias("cell_size_x")).show()Result
+-----------+
|cell_size_x|
+-----------+
| 1.0|
+-----------+Version table
| Release | Notes |
|---|---|
2.0.0 | Python, SQL, and Scala functions introduced |